-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
Open
Description
现在有三级路由:
routes: [{
path: '/role',
component: Layout,
meta: { title: '角色管理' },
children: [{
path: 'role-manage',
component: () => import('@/views/roleManage.vue'),
meta: { title: '角色管理' },
children: [{
path: 'role-edit',
component: () => import('@/views/roleEdit.vue'),
meta: { title: '角色编辑' },
},
{
path: 'role-detail',
component: () => import('@/views/roleDetail.vue'),
meta: { title: '角色详情' },
}
]
}]
}]
预期实现:要求配置的role-edit不会在菜单里显示为role-manage的二级菜单,是通过点击role-manage的页面的【详情按钮】来跳转到配置的子路由role-edit页面,并且面包屑显示 【角色管理/角色编辑】,地址显示:【http://localhost:8080/#/role/role-manage/role-edit】。
实际以上配置后的效果:面包屑导航会显示 【角色管理/角色编辑】,地址栏也可以这样拼起来,但是实际在role-manage页面点击【详情按钮】跳转完之后还是在role-manage页面,而没有进入到配置的child的role-edit路由页面,除非在role-manage的页面中加一个,才会在当前的role-manage页面中一起显示role-edit的页面,想要实现预期的效果,有什么办法通过配置实现吗,
Metadata
Metadata
Assignees
Labels
No labels