Commit 118959f9 authored by 张伯涛's avatar 张伯涛

修改

parent c317f741
...@@ -50,8 +50,6 @@ router.beforeEach((to, from, next) => { ...@@ -50,8 +50,6 @@ router.beforeEach((to, from, next) => {
} }
}) })
router.addRoutes(routers.accessedRoutes) // 动态添加可访问路由表 router.addRoutes(routers.accessedRoutes) // 动态添加可访问路由表
console.log('...to', to)
console.log('routers.accessedRoutes', routers.accessedRoutes)
next({ path: routers.accessedRoutes[0].children[0].path, replace: true }) // 没有首页,自动切换跳转到下一级 next({ path: routers.accessedRoutes[0].children[0].path, replace: true }) // 没有首页,自动切换跳转到下一级
// next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 // next({ ...to, replace: true }) // hack方法 确保addRoutes已完成
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment