|
|
|
@ -164,7 +164,13 @@ function combineRoutes(routers, fromRoutes) {
|
|
|
|
fromRoutes.forEach(frouter => {
|
|
|
|
fromRoutes.forEach(frouter => {
|
|
|
|
const findex = routers.findIndex(r => r.path === frouter.path);
|
|
|
|
const findex = routers.findIndex(r => r.path === frouter.path);
|
|
|
|
if (findex > -1) {
|
|
|
|
if (findex > -1) {
|
|
|
|
combineRoutes(routers[findex].children, frouter.children);
|
|
|
|
if (frouter.children) {
|
|
|
|
|
|
|
|
if (!routers[findex].children || routers[findex].children.length === 0) {
|
|
|
|
|
|
|
|
routers[findex].children = frouter.children;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
combineRoutes(routers[findex].children, frouter.children);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
routers.push(frouter);
|
|
|
|
routers.push(frouter);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|