From 7988fd2106b00826c9ecf2719b59919ab45d5367 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Tue, 25 Jun 2024 09:53:26 +0800 Subject: [PATCH] =?UTF-8?q?fix(X-Pack):=20=E5=90=8C=E6=AD=A5=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E8=8F=9C=E5=8D=95=E6=97=A0=E6=B3=95=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-frontend/src/router/establish.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/core-frontend/src/router/establish.ts b/core/core-frontend/src/router/establish.ts index 271dc4f375..c7e5023466 100644 --- a/core/core-frontend/src/router/establish.ts +++ b/core/core-frontend/src/router/establish.ts @@ -4,6 +4,7 @@ import { XpackComponent } from '@/components/plugin' const modules = import.meta.glob('../views/**/*.vue') export const Layout = () => import('@/layout/index.vue') const xpackComName = 'components/plugin' +export const LayoutTransition = () => import('@/layout/components/LayoutTransition.vue') // 后端控制路由生成 export const generateRoutesFn2 = (routes: AppCustomRouteRecordRaw[]): AppRouteRecordRaw[] => { const res: AppRouteRecordRaw[] = [] @@ -37,12 +38,14 @@ export const generateRoutesFn2 = (routes: AppCustomRouteRecordRaw[]): AppRouteRe let comModule = null if (route.component === xpackComName) { comModule = XpackComponent - } else { + } else if (!route.component.startsWith('Layout')) { comModule = modules[`../views/${route.component}/index.vue`] } if (route.component === 'Layout') { data.component = Layout + } else if (route.component === 'LayoutTransition') { + data.component = LayoutTransition } else if (!comModule) { } else { data.component = comModule