异步路由中增加对beforeEnter的解析

异步路由中增加对beforeEnter的解析
This commit is contained in:
fqucuo 2021-01-24 00:19:22 +08:00 committed by GitHub
parent 9ddd117d5e
commit f0d60a8242
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,6 +56,9 @@ function parseRoutes(routesConfig, routerMap) {
link: routeCfg.link || router.link || routeCfg.meta?.link || router.meta?.link
}
}
if (router.beforeEnter) {
route.beforeEnter = router.beforeEnter
}
if (routeCfg.invisible || router.invisible) {
route.meta.invisible = true
}