Explorar o código

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

RuoYi hai 1 ano
pai
achega
73f881c7d3
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      ruoyi-ui/src/store/modules/permission.js

+ 4 - 0
ruoyi-ui/src/store/modules/permission.js

@@ -98,6 +98,10 @@ function filterChildren(childrenMap, lastRouter = false) {
     }
     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)
   })