|
|
@ -13,8 +13,8 @@ const IFRAME = () => import('/@/views/sys/iframe/FrameBlank.vue'); |
|
|
|
|
|
|
|
|
|
|
|
/** 布局组件Map */ |
|
|
|
/** 布局组件Map */ |
|
|
|
const LayoutMap = new Map<string, () => Promise<typeof import('*.vue')>>(); |
|
|
|
const LayoutMap = new Map<string, () => Promise<typeof import('*.vue')>>(); |
|
|
|
LayoutMap.set('LAYOUT', LAYOUT); |
|
|
|
LayoutMap.set('Layout', LAYOUT); |
|
|
|
LayoutMap.set('IFRAME', IFRAME); |
|
|
|
LayoutMap.set('Iframe', IFRAME); |
|
|
|
/** 性能优化,避免多次加载views下的组件 */ |
|
|
|
/** 性能优化,避免多次加载views下的组件 */ |
|
|
|
let dynamicViewsModules: Record<string, () => Promise<Recordable>>; |
|
|
|
let dynamicViewsModules: Record<string, () => Promise<Recordable>>; |
|
|
|
|
|
|
|
|
|
|
@ -43,7 +43,7 @@ export function transformObjToRoute<T = AppRouteModule>(routeList: AppRouteModul |
|
|
|
dynamicViewsModules = dynamicViewsModules || import.meta.glob('../../views/**/*.{vue,tsx}'); |
|
|
|
dynamicViewsModules = dynamicViewsModules || import.meta.glob('../../views/**/*.{vue,tsx}'); |
|
|
|
routeList.forEach((item) => { |
|
|
|
routeList.forEach((item) => { |
|
|
|
if (!item.component && item.meta?.frameSrc) { |
|
|
|
if (!item.component && item.meta?.frameSrc) { |
|
|
|
item.component = 'IFRAME'; |
|
|
|
item.component = 'Iframe'; |
|
|
|
} |
|
|
|
} |
|
|
|
const { component, name, children } = item; |
|
|
|
const { component, name, children } = item; |
|
|
|
if (component) { |
|
|
|
if (component) { |
|
|
|