Browse Source
fix: LayoutMap cannot get correctly (#398)
传过来的 route.component 是小写的时候
pull/431/head
最后
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
1 deletions
-
src/router/helper/routeHelper.ts
|
|
|
@ -58,7 +58,8 @@ export function transformObjToRoute<T = AppRouteModule>(routeList: AppRouteModul |
|
|
|
routeList.forEach((route) => { |
|
|
|
if (route.component) { |
|
|
|
if ((route.component as string).toUpperCase() === 'LAYOUT') { |
|
|
|
route.component = LayoutMap.get(route.component as LayoutMapKey); |
|
|
|
//route.component = LayoutMap.get(route.component as LayoutMapKey);
|
|
|
|
route.component = LayoutMap.get((route.component as string).toUpperCase() as LayoutMapKey); |
|
|
|
} else { |
|
|
|
route.children = [cloneDeep(route)]; |
|
|
|
route.component = LAYOUT; |
|
|
|
|