mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
refactor(projects): 单独路由逻辑重构、路由转换函数优化
This commit is contained in:
@ -30,7 +30,7 @@ export function getViewComponent(routeKey: AuthRoute.RouteKey) {
|
||||
'dashboard_workbench',
|
||||
'about',
|
||||
'multi-menu_first_second',
|
||||
'redirect-not-found'
|
||||
'not-found-page'
|
||||
];
|
||||
|
||||
const key = keys.includes(routeKey as ViewComponentKey) ? (routeKey as ViewComponentKey) : 'not-found';
|
||||
@ -44,7 +44,7 @@ export function getViewComponent(routeKey: AuthRoute.RouteKey) {
|
||||
dashboard_workbench: DashboardWorkbench,
|
||||
about: About,
|
||||
'multi-menu_first_second': MultiMenuFirstSecond,
|
||||
'redirect-not-found': NotFound
|
||||
'not-found-page': NotFound
|
||||
};
|
||||
|
||||
return () => setViewComponentName(viewComponent[key], key) as Promise<Component>;
|
||||
|
Reference in New Issue
Block a user