Skip to content

Commit

Permalink
修复BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
easonyq committed May 16, 2018
1 parent 30ac3a5 commit 6173853
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions packages/lavas-core-vue/core/route-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,18 @@ export default class RouteManager {
});

// mixin with config, rewrites path, add lazyLoading, meta
routeConfigArr.forEach(routeConfig => {
let routeConfig;
if (routeConfigArr.length !== 0) {
if (routeConfigArr.length === 1) {
routeConfig = routeConfigArr[0];
}
else {
routeConfig = {};
routeConfigArr.forEach(tmpRouteConfig => Object.assign(routeConfig, tmpRouteConfig));
}
}

if (routeConfig) {
let {
path: routePath,
lazyLoading,
Expand All @@ -115,7 +126,7 @@ export default class RouteManager {
rewritePath: routePath || route.rewritePath,
lazyLoading: lazyLoading || !!chunkname
});
});
}

/**
* generate hash for each route which will be used in routes.js template,
Expand Down

0 comments on commit 6173853

Please sign in to comment.