wu
2023-12-11 7f1806c6a01318f3b1eff38da7c7c41ae82ff8c0
CanadaMes-ui/src/layout/index.vue
@@ -228,15 +228,15 @@
      });
    }
  },
  watch: {
    '$route'(to) {
      // 切换路由时更新激活的标签
      const tag = this.menuList.some(item => item.menuLists.some(menu => '/' + menu.router === to.path));
      if (tag) {
        this.activeTag = tag;
      }
    }
  }
  // watch: {
  //   '$route'(to) {
  //     // 切换路由时更新激活的标签
  //     const tag = this.menuList.some(item => item.menuLists.some(menu => '/' + menu.router === to.path));
  //     if (tag) {
  //       this.activeTag = tag;
  //     }
  //   }
  // }
}
</script>