From b7995bc055667902b095646f53fbba92a44ebb52 Mon Sep 17 00:00:00 2001 From: hky <1499449886@qq.com> Date: Tue, 7 Jan 2025 10:56:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=8F=9C=E5=8D=95=E6=80=BB?= =?UTF-8?q?=E6=98=AF=E6=98=BE=E7=A4=BA=E6=97=A0=E6=95=88=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= 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 9da868187..f9f95c43e 100644 --- a/src/utils/routerHelper.ts +++ b/src/utils/routerHelper.ts @@ -73,7 +73,7 @@ export const generateRoute = (routes: AppCustomRouteRecordRaw[]): AppRouteRecord noCache: !route.keepAlive, alwaysShow: route.children && - route.children.length === 1 && + route.children.length > 0 && (route.alwaysShow !== undefined ? route.alwaysShow : true) } as any // 特殊逻辑:如果后端配置的 MenuDO.component 包含 ?,则表示需要传递参数