修复:异步路由加载异常问题;

fix: the loading exception of async routes;
master
chenghongxing 4 years ago
parent 990daf2d27
commit bb7fa9abb6
  1. 2
      src/utils/routerUtil.js

@ -34,7 +34,7 @@ function parseRoutes(routesConfig, routerMap) {
let router = undefined, routeCfg = {} let router = undefined, routeCfg = {}
if (typeof item === 'string') { if (typeof item === 'string') {
router = routerMap[item] router = routerMap[item]
routeCfg = {path: router.path || item, router: item} routeCfg = {path: (router && router.path) || item, router: item}
} else if (typeof item === 'object') { } else if (typeof item === 'object') {
router = routerMap[item.router] router = routerMap[item.router]
routeCfg = item routeCfg = item

Loading…
Cancel
Save