fix: 外链

pull/4/MERGE
xingyuv 2023-04-13 16:37:07 +08:00
parent 9fbd37241a
commit 4807fa65ef
1 changed files with 15 additions and 2 deletions

View File

@ -81,11 +81,24 @@ export function transformObjToRoute<T = AppRouteModule>(routeList: AppRouteModul
}
if (isUrl(route.path)) {
console.info(route)
route.component = 'IFRAME'
const path = route.path
route.path = '/' + route.name
const childRoute = [
{
path: path,
name: route.name,
component: 'IFRAME',
meta: {
title: route.name,
icon: route.icon
}
}
]
route.children = childRoute
}
const component = route.component as string
if (component) {
if (component && !isUrl(route.path)) {
if (component.toUpperCase() === 'LAYOUT') {
route.component = LayoutMap.get('LAYOUT'.toUpperCase())
const meta = route.meta || {}