mirror of
https://github.com/jeecgboot/ant-design-vue-jeecg.git
synced 2026-02-27 01:01:47 +08:00
解决多级路由缓存问题 #4091【待观察是否会导致其他功能问题】
This commit is contained in:
@@ -13,6 +13,16 @@ const whiteList = ['/user/login', '/user/register', '/user/register-result','/us
|
||||
whiteList.push(OAUTH2_LOGIN_PAGE_PATH)
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
//update-begin---author:scott ---date:2022-10-13 for:[jeecg-boot/issues/4091]多级路由缓存问题 #4091-----------
|
||||
//解决三级菜单无法缓存问题
|
||||
//参考: https://blog.csdn.net/qq_37322135/article/details/126013301
|
||||
//参考: https://blog.csdn.net/cwin8951/article/details/106644118
|
||||
if (to.matched && to.matched.length>2) {
|
||||
to.matched.splice(1, to.matched.length - 2)
|
||||
}
|
||||
//update-end---author:scott ---date::2022-10-13 for:[jeecg-boot/issues/4091]多级路由缓存问题 #4091--------------
|
||||
|
||||
|
||||
NProgress.start() // start progress bar
|
||||
|
||||
if (Vue.ls.get(ACCESS_TOKEN)) {
|
||||
|
||||
Reference in New Issue
Block a user