From e0bc260fc1195b6fbae3864b58293f47c7b51ac1 Mon Sep 17 00:00:00 2001 From: preschooler Date: Thu, 28 Nov 2024 11:20:48 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=88=20perf:=E4=BC=98=E5=8C=96=E8=B7=AF?= =?UTF-8?q?=E7=94=B1=E7=9B=AE=E5=BD=95=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/routerHelper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) // 外链