一个运用 React18, react-router-dom v6,Redux/toolkit,Vite5, TypeScript, Antd和 UnoCSS的清新优雅、高颜值且功能强大的React后台管理模板。A clean, elegant, beautiful and powerful react-admin template, based on React18, Vite5, TypeScript, react-router-dom v6, Antd,Redux/toolkit and UnoCSS.。
167
stars
31
forks
source link
[功能]: 子路由下面的roles 如果一个都不匹配的时候 会报错, #17
Open
hslsh2297 opened 5 days ago
描述
{ name: 'manage', path: '/manage', component: 'layout.base', meta: { title: 'manage', i18nKey: 'route.manage', icon: 'carbon:cloud-service-management', order: 9, }, children: [ { name: 'manage_menu', path: 'menu', component: 'view.manage_menu', meta: { title: 'manage_menu', i18nKey: 'route.manage_menu', icon: 'material-symbols:route', order: 3, roles: ['R_SUPER'], } }, { name: 'manage_role', path: 'role', component: 'view.manage_role', meta: { title: 'manage_role', i18nKey: 'route.manage_role', icon: 'carbon:user-role', order: 2, roles: ['R_SUPER'] } }, { name: 'manage_user', path: 'user', component: 'view.manage_user', meta: { title: 'manage_user', i18nKey: 'route.manage_user', icon: 'ic:round-manage-accounts', order: 1, roles: ['R_ADMIN'] } }, { name: 'manage_user-detail', path: 'user-detail/:id', component: 'view.manage_user-detail', meta: { title: 'manage_user-detail', i18nKey: 'route.manage_user-detail', hideInMenu: true, roles: ['R_ADMIN'], activeMenu: 'manage_user' } } ] },
建议的解决方案
1
替代方案
No response
额外的上下文