vue 中 router 三层;<router-view>中嵌套了<router-view>

routes: [

{
    path: '/', component: Main,
    children: [
        {
            path: '/help_document',
            component: Help_Document,
        },
        //我的任务-所有工作流
        {
            path: 'work', component: Work_Main,
            children: [
                {
                    path: 'task',
                    component: Work_MyTask
                },
                {
                    path: 'release',
                    component: Work_MyRelease
                }
          }
  }

]

以上是router的设置!
在Main的vue中有一个 <router-view></router-view>
在Work_Main中 也存在一个 <router-view></router-view>

实际操作: ‘/help_document’ 路径下 第一次跳转 ‘work/release’ (渲染没有问题);

   'work/release'跳转到 ‘work/task’ (渲染没有问题);
   “work/task”  跳转到 ‘/help_document’ ;以上渲染都没有问题.

但是: 再次从 ‘/help_document’ 路径下 跳转 ‘work/release’,

   浏览器地址栏地址显示正确,*

渲染出来的画面却是 ‘work/task’中的内容

*.

   
   求大神解答?
阅读 4.6k
1 个回答
新手上路,请多包涵

您好,vue的三级菜单能给个例子么,谢谢

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题