diff --git a/src/utils/routerHelper.ts b/src/utils/routerHelper.ts index 83aa39ef..b65f93a0 100644 --- a/src/utils/routerHelper.ts +++ b/src/utils/routerHelper.ts @@ -120,7 +120,7 @@ export const generateRoute = (routes: AppCustomRouteRecordRaw[]): AppRouteRecord data.children = [childrenData] } else { // 目录 - if (route.children) { + if (route.children?.length) { data.component = Layout data.redirect = getRedirect(route.path, route.children) // 外链