This commit is contained in:
dqjdda
2019-09-07 17:46:50 +08:00
parent d0e72ece9f
commit 1a87035280
13 changed files with 527 additions and 218 deletions

View File

@@ -58,7 +58,7 @@ export const loadMenus = (next, to) => {
asyncRouter.push({ path: '*', redirect: '/404', hidden: true })
store.dispatch('GenerateRoutes', asyncRouter).then(() => { // 存储路由
router.addRoutes(asyncRouter) // 动态添加可访问路由表
next({ ...to, replace: true })// hack方法 确保addRoutes已完成
next({ ...to, replace: true })
})
})
}