Merge pull request #456 from QingWei-Li/fix/menu/active

Menu: fix indexPath of undefined
pull/460/head
baiyaaaaa 2016-10-17 16:58:55 +08:00 committed by GitHub
commit 426ce5da36
1 changed files with 2 additions and 0 deletions

View File

@ -46,6 +46,7 @@
watch: {
defaultActive(value) {
this.activeIndex = value;
if (!this.menuItems[value]) return;
let indexPath = this.menuItems[value].indexPath;
this.handleSelect(value, indexPath);
@ -97,6 +98,7 @@
},
openActiveItemMenus() {
let index = this.activeIndex;
if (!this.menuItems[index]) return;
if (index && this.mode === 'vertical') {
let indexPath = this.menuItems[index].indexPath;