소스 검색

fix: 路由变化添加标签页 (#243)

一万 3 년 전
부모
커밋
db1f26e9da
2개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  1. 7 0
      src/layout/components/sidebar/horizontal.vue
  2. 1 0
      src/layout/components/sidebar/vertical.vue

+ 7 - 0
src/layout/components/sidebar/horizontal.vue

@@ -47,6 +47,13 @@ watch(
   }
 );
 
+watch(
+  () => route.path,
+  () => {
+    menuSelect(route.path, routers);
+  }
+);
+
 function translationCh() {
   instance.locale = { locale: "zh" };
   locale.value = "zh";

+ 1 - 0
src/layout/components/sidebar/vertical.vue

@@ -51,6 +51,7 @@ watch(
   () => route.path,
   () => {
     getSubMenuData(route.path);
+    menuSelect(route.path, routers);
   }
 );
 </script>