|
@@ -36,7 +36,7 @@
|
|
:default-openeds="defaultOpenSubMenus"
|
|
:default-openeds="defaultOpenSubMenus"
|
|
>
|
|
>
|
|
<el-submenu
|
|
<el-submenu
|
|
- v-for="group in filterSubMenus"
|
|
|
|
|
|
+ v-for="group in newFilterSubMenus"
|
|
:key="group._compute._uniqueIndexes[1]"
|
|
:key="group._compute._uniqueIndexes[1]"
|
|
:index="group._compute._uniqueIndexes[0] + '-' + group._compute._uniqueIndexes[1]"
|
|
:index="group._compute._uniqueIndexes[0] + '-' + group._compute._uniqueIndexes[1]"
|
|
>
|
|
>
|
|
@@ -114,8 +114,11 @@ export default {
|
|
'filterSubMenus',
|
|
'filterSubMenus',
|
|
'defaultOpenSubMenus',
|
|
'defaultOpenSubMenus',
|
|
'activeMenu'
|
|
'activeMenu'
|
|
- ])
|
|
|
|
-
|
|
|
|
|
|
+ ]),
|
|
|
|
+ // 过滤三级分类为空的二级分类
|
|
|
|
+ newFilterSubMenus () {
|
|
|
|
+ return this.filterSubMenus.filter(v => v.child && v.child.length > 0)
|
|
|
|
+ }
|
|
},
|
|
},
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
@@ -124,8 +127,6 @@ export default {
|
|
openedSubMenu: [] // 鼠标悬浮默认打开的子菜单索引(index)列表
|
|
openedSubMenu: [] // 鼠标悬浮默认打开的子菜单索引(index)列表
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- created () {
|
|
|
|
- },
|
|
|
|
methods: {
|
|
methods: {
|
|
...mapMutations('work-bench/menu', [
|
|
...mapMutations('work-bench/menu', [
|
|
'setActiveOfType'
|
|
'setActiveOfType'
|
|
@@ -218,7 +219,7 @@ export default {
|
|
const noChild = !menu.child || (menu.child && menu.child.length === 0)
|
|
const noChild = !menu.child || (menu.child && menu.child.length === 0)
|
|
const isActive = index === this.active?.apex
|
|
const isActive = index === this.active?.apex
|
|
if (noChild || isActive) return this.showFloatMenus = false
|
|
if (noChild || isActive) return this.showFloatMenus = false
|
|
- this.floatMenusList = menu.child
|
|
|
|
|
|
+ this.floatMenusList = menu.child.filter(v => v.child.length > 0)
|
|
const arr = []
|
|
const arr = []
|
|
menu.child.forEach(v => {
|
|
menu.child.forEach(v => {
|
|
arr.push(v._compute._key)
|
|
arr.push(v._compute._key)
|