嵌套路由子路由对应组件怎样覆盖父路由的原有组件 #12138
Unanswered
Alextale777
asked this question in
Q&A
Replies: 1 comment 2 replies
-
展示什么内容要看你自己怎么编写代码,这个时候路径 你可能需要的是: {
path: '/node',
routes: [
{
path: '',
component: 'node/index'
},
{
path: 'group',
component: 'node/group'
}
]
} 不添加 关于 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
如图,我在顶层路由对应的页面设置了一张表,现点击表中的任一一行按钮进入详情页,该详情页属于/node的子路由。但是显示结果如下
父页面组件将子页面组件覆盖住了。
现我想在路由结构不变的情况下,正确显示子组件,即在/node/group路径中只显示子页面,请问我该如何在umi/max中调整。
我的路由如下
{ name: '用户信息', path: '/node', component: './Node', hideInBreadcrumb: false, routes: [ { name: '甘雨', path: 'group', component: './Group', hideInMenu: true, } ], }
Beta Was this translation helpful? Give feedback.
All reactions