From 4f1f343f157c1b503b32da184feda929e237a5eb Mon Sep 17 00:00:00 2001 From: wyc001122 Date: Sat, 17 May 2025 10:35:41 +0800 Subject: [PATCH] fix: in mixed layout mode, the sidebar does not display when the first child node is an external link --- packages/effects/layouts/src/basic/menu/use-mixed-menu.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/effects/layouts/src/basic/menu/use-mixed-menu.ts b/packages/effects/layouts/src/basic/menu/use-mixed-menu.ts index dc727447c63..8424c386a3d 100644 --- a/packages/effects/layouts/src/basic/menu/use-mixed-menu.ts +++ b/packages/effects/layouts/src/basic/menu/use-mixed-menu.ts @@ -140,7 +140,10 @@ function useMixedMenu() { watch( () => route.path, (path) => { - const currentPath = (route?.meta?.activePath as string) ?? path; + const currentPath = route?.meta?.activePath ?? route?.meta?.link ?? path; + if (willOpenedByWindow(currentPath)) { + return; + } calcSideMenus(currentPath); if (rootMenuPath.value) defaultSubMap.set(rootMenuPath.value, currentPath);