
获得徽章 6
- 我遇到一个问题,身边的人都没人能够解答,就是 这个一级路由为什么都要用 component: Layout, 使用插槽不好嘛,一直有这样的疑虑,我看到别人这样用,但我自己说服不了自己
```
{
path: '/home',
component: Layout,
meta: {
icon: 'home'
},
redirect: '/home/index',
children: [
{
path: 'index',
component: () => import('@/pages/home/index.vue'),
meta: {
hidden: true
}
}
]
},
{
path: '/patient',
component: Layout,
meta: {
icon: 'user'
},
redirect: '/patient/index',
children: [
{
path: 'index',
name: 'patientList',
component: () => import('@/pages/patient/index.vue'),
meta: {
hidden: true
},
children: patientRoutes
}
]
}
```展开等人赞过64