|
@@ -128,6 +128,16 @@ export default {
|
|
// When there is only one child router, the child router is displayed by default
|
|
// When there is only one child router, the child router is displayed by default
|
|
|
|
|
|
if (showingChildren.length === 1) {
|
|
if (showingChildren.length === 1) {
|
|
|
|
+ let filterRouter = ['/commentManagerWrap', 'teamMananger', '/vipManager', '/accompanyManager']
|
|
|
|
+ let tempOnlyChild = this.onlyOneChild
|
|
|
|
+ // 如果包含上面几个菜单,并且只有一个
|
|
|
|
+ if(filterRouter.includes(tempOnlyChild.path) && tempOnlyChild.children.length == 1) {
|
|
|
|
+ let child = tempOnlyChild.children[0]
|
|
|
|
+ if(!this.checkPathUrl(child.path)) {
|
|
|
|
+ child.path = tempOnlyChild.path + '/' + child.path
|
|
|
|
+ }
|
|
|
|
+ this.onlyOneChild = child
|
|
|
|
+ }
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -139,6 +149,9 @@ export default {
|
|
|
|
|
|
return false;
|
|
return false;
|
|
},
|
|
},
|
|
|
|
+ checkPathUrl(path) {
|
|
|
|
+ return path.indexOf('/') === 0 ? true : false
|
|
|
|
+ },
|
|
resolvePath(routePath) {
|
|
resolvePath(routePath) {
|
|
if (isExternal(routePath)) {
|
|
if (isExternal(routePath)) {
|
|
return routePath;
|
|
return routePath;
|