arco-design / arco-design-pro-vue

An out-of-the-box solution to quickly build enterprise-level applications based on Arco Design.
https://pro.arco.design
MIT License
1.39k stars 284 forks source link

只有一级菜单的路由该如何配置。使用hideChildrenInMenu后,内页是空白的 #106

Closed Yuxiaogang-Gavin closed 2 years ago

Yuxiaogang-Gavin commented 2 years ago

Basic Info

Extra info

这样配置虽然能出来内页,但是点击菜单,还是会跳回空白页。 export default { path: '/home', name: '门户首页', component: DEFAULT_LAYOUT, meta: { locale: 'menu.home', requiresAuth: true, icon: 'icon-dashboard', order: 0, hideChildrenInMenu:true }, children: [ { path: '', name: '门户首页', component: () => import('@/views/dashboard/workplace/index.vue'), meta: { locale: 'menu.dashboard.workplace', requiresAuth: true, roles: ['*'], hideInMenu:true, }, }, ], };

jmake-zxb commented 2 years ago

@Yuxiaogang-Gavin 例如下图这样就可以 image

Yuxiaogang-Gavin commented 2 years ago

@sqlFC 谢谢,后来自己也发现了。子菜单的hideInMenu不能设为true