Просмотр исходного кода

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

一万 3 лет назад
Родитель
Сommit
db1f26e9da

+ 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>