Browse Source

fix: 修复混合模式导航下调用`initRouter`函数导致左侧导航内存溢出问题

xiaoxian521 1 year ago
parent
commit
d305e6fb1f
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/layout/components/sidebar/vertical.vue

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

@@ -32,6 +32,7 @@ const loading = computed(() =>
 );
 
 function getSubMenuData(path: string) {
+  subMenuData.value = [];
   // path的上级路由组成的数组
   const parentPathArr = getParentPaths(
     path,