diff --git a/src/utils/routerUtil.js b/src/utils/routerUtil.js index 21c077a..5435196 100644 --- a/src/utils/routerUtil.js +++ b/src/utils/routerUtil.js @@ -75,6 +75,9 @@ function parseRoutes(routesConfig, routerMap) { redirect: routeCfg.redirect || router.redirect, meta: {...meta, authority: meta.authority || '*'} } + if (router.beforeEnter) { + route.beforeEnter = router.beforeEnter + } if (routeCfg.invisible || router.invisible) { route.meta.invisible = true }