Преглед на файлове

fix: in mixed layout mode, the sidebar does not display when the first child node is an external link (#6219)

Co-authored-by: wyc001122 <wangyongchao@testor.com.cn>
wyc001122 преди 4 месеца
родител
ревизия
34c4ecb047
променени са 1 файла, в които са добавени 4 реда и са изтрити 1 реда
  1. 4 1
      packages/effects/layouts/src/basic/menu/use-mixed-menu.ts

+ 4 - 1
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);