Commit 18cbf254 authored by 张俊's avatar 张俊

route容错

parent 8d339879
...@@ -89,9 +89,11 @@ router.beforeEach((to, from, next) => { ...@@ -89,9 +89,11 @@ router.beforeEach((to, from, next) => {
// }) // })
function addRoute(router,routers){ function addRoute(router,routers){
routers.forEach(e => { routers.forEach(e => {
router.addRoute(e) if(e.path[0]=='/'){
if(e.children&&e.children.length){ router.addRoute(e)
addRoute(router,e.children) if(e.children&&e.children.length){
addRoute(router,e.children)
}
} }
}); });
} }
......
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