未验证 提交 7c16c2fa 编写于 作者: 最后 提交者: GitHub

fix: LayoutMap cannot get correctly (#398)

传过来的 route.component 是小写的时候
上级 3520fd94
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册