优化:异步路由配置兼容;

optimize: the configuration format of asynchronous routing is compatible;
This commit is contained in:
chenghongxing 2020-12-06 10:26:49 +08:00
parent df7e9f2d1c
commit 6371f1e6db

View File

@ -50,10 +50,10 @@ function parseRoutes(routesConfig, routerMap) {
component: router.component,
redirect: routeCfg.redirect || router.redirect,
meta: {
authority: routeCfg.authority || router.authority || '*',
icon: routeCfg.icon || router.icon,
page: routeCfg.page || router.page,
link: routeCfg.link || router.link
authority: routeCfg.authority || router.authority || routeCfg.meta?.authority || router.meta?.authority || '*',
icon: routeCfg.icon || router.icon || routeCfg.meta?.icon || router.meta?.icon,
page: routeCfg.page || router.page || routeCfg.meta?.page || router.meta?.page,
link: routeCfg.link || router.link || routeCfg.meta?.link || router.meta?.link
}
}
if (routeCfg.invisible || router.invisible) {