嵌套路由
在routes中加个属性children,要嵌套的地址就写进children中
编写关于用户的视图
用户列表
用户列表
用户信息
用户信息
在router中注册路由
{
path: "/main",
component: Main,
children: [{
path: "/user/userList",
component: userList
},
{
path: '/user/userProfile',
component: userProfile
}
]
}
我想在main页面嵌入用户列表,所以在main中嵌入
main页面
导航一
用户列表
用户信息
导航二
分组一
选项1
选项2
选项3
选项4
选项4-1
导航三
分组一
选项1
选项2
选项3
选项4
选项4-1
查看
新增
删除
王小虎
插入的位置
显示的位置
界面效果