左边和上面有导航,
希望跳转时导航不动,
在右下渲染子路由的内容,
本来是想用 v-if 绑在父路由元素上
点击链接后用 else 渲染子路由
但是好像不行,点击进去后路径跳转了,但是页面空白
这是路由配置:
{
path: '/industries',
name: 'Industry',
component: Industry,
meta: {
requireAuth: true
},
children: [
{path: '/:id', component: Modify_industry}
]
}
因为下面第一个div里很多元素,所以直接截图了
那为啥不把那一块改成路由呢?
为啥是白的,估计是你没配对,children子路由路径最好不要用绝对路径。
/demo, children: /test
-> #/test是子路由/demo, children: test
-> #/demo/test是子路由,你明白了吗。还有: