fix: 外链
parent
9fbd37241a
commit
4807fa65ef
|
@ -81,11 +81,24 @@ export function transformObjToRoute<T = AppRouteModule>(routeList: AppRouteModul
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isUrl(route.path)) {
|
if (isUrl(route.path)) {
|
||||||
console.info(route)
|
|
||||||
route.component = 'IFRAME'
|
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
|
const component = route.component as string
|
||||||
if (component) {
|
if (component && !isUrl(route.path)) {
|
||||||
if (component.toUpperCase() === 'LAYOUT') {
|
if (component.toUpperCase() === 'LAYOUT') {
|
||||||
route.component = LayoutMap.get('LAYOUT'.toUpperCase())
|
route.component = LayoutMap.get('LAYOUT'.toUpperCase())
|
||||||
const meta = route.meta || {}
|
const meta = route.meta || {}
|
||||||
|
|
Loading…
Reference in New Issue