From 7faea8c3414202ed7641ecc5795dcaa534860bdb Mon Sep 17 00:00:00 2001 From: chenting <1016830869@qq.com> Date: Thu, 2 Jan 2025 05:55:11 +0000 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 Signed-off-by: chenting <1016830869@qq.com> --- 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 b65f93a0..a4b22958 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 包含 ?,则表示需要传递参数