Commit 7c16c2fa9e6cb2e87894666d6687eed3fc744b64
Committed by
GitHub
1 parent
3520fd94
fix: LayoutMap cannot get correctly (#398)
传过来的 route.component 是小写的时候
Showing
1 changed file
with
2 additions
and
1 deletions
src/router/helper/routeHelper.ts
... | ... | @@ -58,7 +58,8 @@ export function transformObjToRoute<T = AppRouteModule>(routeList: AppRouteModul |
58 | 58 | routeList.forEach((route) => { |
59 | 59 | if (route.component) { |
60 | 60 | if ((route.component as string).toUpperCase() === 'LAYOUT') { |
61 | - route.component = LayoutMap.get(route.component as LayoutMapKey); | |
61 | + //route.component = LayoutMap.get(route.component as LayoutMapKey); | |
62 | + route.component = LayoutMap.get((route.component as string).toUpperCase() as LayoutMapKey); | |
62 | 63 | } else { |
63 | 64 | route.children = [cloneDeep(route)]; |
64 | 65 | route.component = LAYOUT; | ... | ... |