Vue 路由的嵌套
1.配置路由
const routes = [
{
path: '/User',
component: User,
children: [{ path: 'OP1', component: OP1 },//注意子路由的路径写法这里不加/
{ path: 'OP2', component: OP2 }
]
}
]
2.父路由里配置子路由显示的地方<router-view></router-view>
posted on 2018-06-25 10:47 changedman 阅读(115) 评论(0) 编辑 收藏 举报