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