fix: menu click not trigger #1470

pull/1483/head
tanjinzhou 2019-11-28 17:32:46 +08:00
parent 16ec40a012
commit 586dc46d90
1 changed files with 6 additions and 7 deletions

View File

@ -308,7 +308,6 @@ const SubPopupMenu = {
this.instanceArrayKeyIndexMap[key] = Object.keys(this.instanceArrayKeyIndexMap).length;
}
const childListeners = getEvents(child);
const isSubMenu = child.componentOptions && child.componentOptions.Ctor.options.isSubMenu;
const newChildProps = {
props: {
mode: childProps.mode || props.mode,
@ -334,12 +333,12 @@ const SubPopupMenu = {
...extraProps,
},
on: {
click: isSubMenu
? noop
: e => {
(childListeners.click || noop)(e);
this.onClick(e);
},
click: e => {
if ('keyPath' in e) {
(childListeners.click || noop)(e);
this.onClick(e);
}
},
itemHover: this.onItemHover,
openChange: this.onOpenChange,
deselect: this.onDeselect,