update package.json
This commit is contained in:
@@ -32,7 +32,6 @@ router.beforeEach((to, from, next) => {
|
||||
const asyncRouter = filterAsyncRouter(res)
|
||||
asyncRouter.push({ path: '*', redirect: '/404', hidden: true })
|
||||
store.dispatch('GenerateRoutes', asyncRouter).then(() => { // 存储路由
|
||||
console.log(asyncRouter)
|
||||
router.addRoutes(asyncRouter) // 动态添加可访问路由表
|
||||
next({ ...to, replace: true })// hack方法 确保addRoutes已完成
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user