From c870103d4c6f1998e8ccb8774edd4db2aa50cdcc Mon Sep 17 00:00:00 2001 From: K <1175047471@qq.com> Date: Thu, 16 May 2024 10:31:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20asyncImportRoute=20=E8=8E=B7=E5=8F=96=20?= =?UTF-8?q?Layout=20=E7=BB=84=E4=BB=B6=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/helper/routeHelper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/router/helper/routeHelper.ts b/src/router/helper/routeHelper.ts index 5d997bd0..c8407bf3 100644 --- a/src/router/helper/routeHelper.ts +++ b/src/router/helper/routeHelper.ts @@ -30,7 +30,7 @@ function asyncImportRoute(routes: AppRouteRecordRaw[] | undefined) { const { component, name } = item const { children } = item if (component) { - const layoutFound = LayoutMap.get(component.toUpperCase()) + const layoutFound = LayoutMap.get(component.replace('/index.vue', '').toUpperCase()) if (layoutFound) item.component = layoutFound else