|
@@ -1,7 +1,22 @@
|
|
<template>
|
|
<template>
|
|
<div v-if="!item.hidden">
|
|
<div v-if="!item.hidden">
|
|
<!-- <template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren) && !item.alwaysShow"> -->
|
|
<!-- <template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren) && !item.alwaysShow"> -->
|
|
- <template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren || (onlyOneChild.children && onlyOneChild.children.length < 1 && (onlyOneChild.name == 'issue_index' || onlyOneChild.name == 'notice_index' || onlyOneChild.name == 'dashboard'))) && !item.alwaysShow">
|
|
|
|
|
|
+ <template
|
|
|
|
+ v-if="hasOneShowingChild(item.children,item) &&
|
|
|
|
+ (
|
|
|
|
+ !onlyOneChild.children ||
|
|
|
|
+ onlyOneChild.noShowingChildren ||
|
|
|
|
+ (
|
|
|
|
+ onlyOneChild.children &&
|
|
|
|
+ onlyOneChild.children.length < 1 &&
|
|
|
|
+ (
|
|
|
|
+ onlyOneChild.name == 'issue_index' ||
|
|
|
|
+ onlyOneChild.name == 'notice_index' ||
|
|
|
|
+ onlyOneChild.name == 'dashboard'
|
|
|
|
+ )
|
|
|
|
+ )
|
|
|
|
+ ) &&
|
|
|
|
+ !item.alwaysShow">
|
|
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
|
|
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
|
|
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
|
|
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
|
|
<item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" />
|
|
<item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" />
|
|
@@ -87,6 +102,7 @@ export default {
|
|
this.onlyOneChild = { ... parent, path: '', noShowingChildren: true }
|
|
this.onlyOneChild = { ... parent, path: '', noShowingChildren: true }
|
|
return true
|
|
return true
|
|
}
|
|
}
|
|
|
|
+
|
|
return false
|
|
return false
|
|
},
|
|
},
|
|
resolvePath(routePath) {
|
|
resolvePath(routePath) {
|