const routes = [
{
path: '/about',
name: 'About',
component: () => import('../views/About.vue'),
//嵌套开始
children: [
{
path: 'child', //注意!!此处不需要加 /
name: 'child',
component: () => import('../views/AboutChild.vue'),
}
]
//嵌套结束
}
]
以 / 开头的嵌套路径会被当作根路径
网友评论