线路:通用menuBar

问题:点击空白关闭多级菜单时,所有层级都关闭。
This commit is contained in:
ival 2021-03-08 09:41:07 +08:00
parent 46d139e8a5
commit faaded9b1e

View File

@ -89,6 +89,13 @@ export default {
'mode'
])
},
watch: {
index(val) {
if (val == -1) {
this.active = -1;
}
}
},
methods:{
getDomId(item) {
if (item && item.operate) {
@ -121,6 +128,7 @@ export default {
type: 'bar',
operation: item.operate.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$emit('active', index);