Commit 159be3e269794c75fdd0a3959a6078fdab540c19

Authored by 谭毅彬
1 parent a472f3a4

解决三级路由缓存问题

Signed-off-by: TanYibin <5491541@qq.com>
ant-design-vue-jeecg/src/permission.js
... ... @@ -13,6 +13,13 @@ const whiteList = [&#39;/user/login&#39;, &#39;/user/register&#39;, &#39;/user/register-result&#39;, &#39;/u
13 13 whiteList.push(OAUTH2_LOGIN_PAGE_PATH)
14 14  
15 15 router.beforeEach((to, from, next) => {
  16 + //update-begin---author:scott ---date:2022-10-13 for:[jeecg-boot/issues/4091]多级路由缓存问题 #4091-----------
  17 + //解决三级菜单无法缓存问题
  18 + //参考: https://blog.csdn.net/qq_37322135/article/details/126013301
  19 + //参考: https://blog.csdn.net/cwin8951/article/details/106644118
  20 + if (to.matched && to.matched.length > 3) {
  21 + to.matched.splice(2, to.matched.length - 3)
  22 + }
16 23 NProgress.start() // start progress bar
17 24 if (Vue.ls.get(ACCESS_TOKEN)) {
18 25 /* has token */
... ...