mirror of
https://gitee.com/ElemeFE/element.git
synced 2024-12-02 20:28:52 +08:00
Menu: fix indexPath of undefined
This commit is contained in:
parent
d3334476c2
commit
eb02763837
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user