소스 검색

fix 修复 五级路由缓存无效问题

疯狂的狮子Li 1 년 전
부모
커밋
0a8c33c3cb
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      src/store/modules/permission.ts

+ 4 - 0
src/store/modules/permission.ts

@@ -100,6 +100,10 @@ export const usePermissionStore = defineStore('permission', () => {
       }
       if (lastRouter) {
         el.path = lastRouter.path + '/' + el.path;
+        if (el.children && el.children.length) {
+          children = children.concat(filterChildren(el.children, el))
+          return
+        }
       }
       children = children.concat(el);
     });