|
|
|
@ -82,9 +82,11 @@ export function transformObjToRoute(menuList: MenuItem[]): AppRouteModule[] {
|
|
|
|
|
const routeList: AppRouteModule[] = [] |
|
|
|
|
menuList.forEach((item) => { |
|
|
|
|
const route = { ...item } as unknown as AppRouteModule |
|
|
|
|
const flag = (route.children || []).every(item => item.visible) |
|
|
|
|
|
|
|
|
|
if (isHttpUrl(route.path)) |
|
|
|
|
route.component = 'IFrame' |
|
|
|
|
else if (route.children && route.children.length && route.parentId === '0') |
|
|
|
|
else if (route.children && route.children.length && route.parentId === '0' && flag) |
|
|
|
|
route.component = 'LAYOUT' |
|
|
|
|
else if (!route.children) |
|
|
|
|
route.component = route.component as string |
|
|
|
|