成功vue路由多级菜单实现
export const asyncRoutes = [
{
path: '/patient',
component: MainLayout,//当前病例
children: [
{
path: 'SystemManage',
name: 'SystemManage',
alwaysShow: true,
component: Layout,
meta: { title: '系统管理' },
hidden: false,
children: [
{
path: 'UserTable_list',
component: () => import('@/views/UserTableF/'),
name: 'UserTable_list',
meta: { title: '用户列表' },
alwaysShow:true,
children: [
{
path: 'UserTable_list',
component: () => import('@/views/UserTableF/list'),
name: 'UserTable_list',
meta: { title: '用户列表2' },
children: [
{
path: 'UserTable_list1',
component: () => import('@/views/UserTableF/list'),
name: 'UserTable_list1',
meta: { title: '用户列表2-1' },
},
{
path: 'UserTable_list2',
component: () => import('@/views/UserTableF/list'),
name: 'UserTable_list2',
meta: { title: '用户列表2-2' },
alwaysShow:true,
children: [
{
path: 'UserTable_list2-1',
component: () => import('@/views/UserTableF/list'),
name: 'UserTable_list2-1',
meta: { title: '用户列表2-2-1' },
alwaysShow:true,
children: [
{
path: 'UserTable_list2-1-1',
component: () => import('@/views/UserTableF/list'),
name: 'UserTable_list2-1-1',
meta: { title: '用户列表2-2-1-1' },
},
]
},
]
},
]
},
]
},