Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

Recent questions tagged vue-router

0 votes
1.3k views
1 answer
    类似这个界面 上面是面包屑来点击跳转和展示层级, 下面是<router-view>显示区域,交互都在这里进行, 我看官方的例子,嵌套要在子组件也要写<router-view>, 这样的话如果嵌套多的话就会很复杂,有没有其他办法...
asked Feb 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.4k views
1 answer
    这两天项目里突然就出这个问题了,实在有点摸不着头脑。...
asked Feb 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.3k views
1 answer
    一个spa应用,每个用户权限不同导致后端一二三级导航都会或多或少不太一样 由于页面上百个,这里我们采用命名路由的方式 因为这样不需要考虑给每个路由设置路径,只需要后端传每个导航的名字就够了 可是做到一半,我们发现会有命名重复的问题 ... 但是这样太麻烦,因为涉及到好几个模块下的同名路由,而且不利于后期维护 如果要用命名路由,这种重名问题该如何解决?...
asked Feb 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    router.beforeEach((to, from, next) => { if (to.matched.some(record => record.meta.requiresAuth)) { // this route requires auth, ... 赋值的值,想请求auth验证有什么其他方案? Thanks you in advance....
asked Feb 6, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.2k views
1 answer
    使用Vue-router history模式,为什么npm run dev通过express创建的虚拟服务器可以访问,但是打包之后再本地访问不了,并且,所有需要加载的文件都加载出来了的! 代码和截图如下: 使用的是vue-cli webpack 代 ... 的情景: 所有的JS文件和Css文件以及Hmtl都加载出来了,可就是页面显示不出来,求大神帮帮忙!!!...
asked Feb 6, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    /home/list/listA 如上, 在当前这个路径刷新时, 在home组件中有一些业务判断, 需要用 this.$router 进行跳转, 但是, 此时并没有立即跳转, 而是再执行了, list 跟 listA 页面的代码后才跳转, 怎么能不要执行后面的代码, 而是立即在home组件就跳转到其他页面...
asked Feb 6, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    新人求助 代码如下: import Vue from 'vue'; import App from './App'; import VueRouter from 'vue-router'; import goods from './components/goods/goods.vue ... 啥被注册了但是没用- -)求教大神,应该怎么改写成2.0的语法啊...
asked Feb 6, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.2k views
1 answer
    亼米 2017/4/1 10:17:36 哪位大神帮忙看下 为什么资讯列表进去对应的资讯详情,只有第一次id可以获取到呢 亼米 2017/4/1 10:18:07 还有从资讯列表进去资讯详情后, linkactiveclass也失效了...
asked Feb 6, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    为什么vue-router将mode从hash变成history之后,index.html加载了,引用的资源也全部正确,可就是页面显示不出来? mode = hash OK const router = new VueRouter({ routes, mode: ' ... ' }) 加载的资源都是一样的.就想去掉url中的那个#;求大神们帮帮忙!!!...
asked Feb 6, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.2k views
1 answer
    created () { this.getData() }, watch: { $route (to, from) { // 执行ajax请求,但只希望在进入时请求,离开时不希望进行请求。 this.getData() } } 现在的情况是router在进入或离开都进行了请求,请问这怎么解决不必要的请求呢? Thanks you in advance....
asked Feb 6, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.0k views
1 answer
    入门vue-router的时候遇到一个问题 <router-view> tag 中内容没有渲染出来,查阅了一下vue-router文档,没有搞懂是哪里出的问题. 非常好奇,vue-router的原理是什么 ... </template> <script> export default { data () { return { } } } </script>...
asked Feb 6, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    开发环境: 基于Laravel 5.4 的框架,开发前后端分离的Web App 问题描述: 前端运行yarn run dev 或yarn run watch打包后,访问站点提示如下错误: Uncaught SyntaxError ... : '*', name: 'NotFound', component: NotFound } ] }); 求老司机带路 ...
asked Feb 5, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.2k views
1 answer
    问题描述 用户未登录状态,访问http://localhost:23001/任何URI时,会被导向去http://localhost:23001/任何URI#/login,此时在beforeEach里打印to.name为home 然后 比如: http:// ... 用 为什么转向的时候不会把hash前面的路径名称覆盖,而是在#/后面直接添加...
asked Jan 27, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.0k views
1 answer
    添加统一前缀 test,当地址栏输入 localhost:8000/test/abc与 localhost:8000/abc访问看到的页面是一样的,请问,要如何处理这种情况? const createRouter = () => new Router({ base: '/test/', mode: 'history' routes: routes });...
asked Jan 27, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.2k views
1 answer
    hash模式下 yarn serve之后启动项目 ` http://localhost:8080/zh/#/index ` 此路径可以直接访问 因为项目要求 必须要有 zh路径 但是因为要干 ... }, { path: '/forgotPwd', name: 'ForgotPwd', component: ForgotPwd }, `...
asked Jan 27, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.2k views
1 answer
    vue文档是这么说的,我按着 vue-router文档这么用。 遇到个问题,如果异步组件加载超时,那么这个页面显示的永远都是超时组件,只有刷新浏览器才能重新加载。 我翻了vue-router代码 ),貌似异步组件只会被解析一次? 所以有没有办法让加载超时的异步组件重新加载?...
asked Jan 27, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.0k views
1 answer
    各位大佬,有没有什么办法可以动态设置meta? { path: 'product', component: () => import('@/views/product'), meta: { breadcrumb: '添加产品' } } ... 在面包屑动态设置breadcrumb,当this.$router.query.id有值时,显示编辑产品,否则添加产品...
asked Jan 27, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
3.8k views
1 answer
    ### 问题描述 vue-router ()=>import()懒加载错误 ### 问题出现的环境背景及自己尝试过哪些方法 "vue": "^2.6.11", "vue-router": "^3.2.0", ### 相关代码 import VueRouter ... 是什么?实际看到的错误信息又是什么? 期望按需加载路由正确 昨天还好好的 今天突然就这样了...
asked Jan 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
3.0k views
1 answer
    想做登录的导航守卫 发现获取到的数据是{__ob__: Observer} 并不是想要的数据 vue-router import store from '../store' router.beforeEach((to, from, next ... { return next() } else { return next('/login') } } });...
asked Jan 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
2.7k views
1 answer
    怎么定义一个path 通配 比如说/app 使用组件app.vue 访问/app/user /app/com 也就是/app开头都是一样。 且不会重新刷新渲染。...
asked Jan 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
To see more, click for the full list of questions or popular tags.
Ask a question:
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...