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

route容错

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