mirror of https://github.com/ElemeFE/element
Revert "fix first enter do not active the menu bug (#2399)"
This reverts commit ef06717f64
.
pull/2455/head
parent
663d84bbe6
commit
e27675114b
|
@ -57,15 +57,6 @@
|
||||||
},
|
},
|
||||||
defaultOpeneds(value) {
|
defaultOpeneds(value) {
|
||||||
this.openedMenus = value;
|
this.openedMenus = value;
|
||||||
},
|
|
||||||
'$route': {
|
|
||||||
immediate: true,
|
|
||||||
handler(value) {
|
|
||||||
if (this.router) {
|
|
||||||
this.activedIndex = value.path;
|
|
||||||
this.initOpenedMenu();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -109,7 +100,7 @@
|
||||||
},
|
},
|
||||||
handleItemClick(item) {
|
handleItemClick(item) {
|
||||||
let { index, indexPath } = item;
|
let { index, indexPath } = item;
|
||||||
|
this.activedIndex = item.index;
|
||||||
this.$emit('select', index, indexPath, item);
|
this.$emit('select', index, indexPath, item);
|
||||||
|
|
||||||
if (this.mode === 'horizontal') {
|
if (this.mode === 'horizontal') {
|
||||||
|
@ -118,8 +109,6 @@
|
||||||
|
|
||||||
if (this.router) {
|
if (this.router) {
|
||||||
this.routeToItem(item);
|
this.routeToItem(item);
|
||||||
} else {
|
|
||||||
this.activedIndex = item.index;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 初始化展开菜单
|
// 初始化展开菜单
|
||||||
|
|
Loading…
Reference in New Issue