Menu: save menu state when change collapse and expand menu(#10622) (#12178)

pull/12159/merge
Harlan 2018-08-02 15:05:21 +08:00 committed by Jikkai Xiao
parent f75ba78cd4
commit 6bb49b9590
1 changed files with 2 additions and 2 deletions

View File

@ -153,8 +153,8 @@
}
},
methods: {
updateActiveIndex() {
const item = this.items[this.defaultActive];
updateActiveIndex(val) {
const item = this.items[val] || this.items[this.activeIndex] || this.items[this.defaultActive];
if (item) {
this.activeIndex = item.index;
this.initOpenedMenu();