fix: menu click not trigger #1470
parent
16ec40a012
commit
586dc46d90
|
@ -308,7 +308,6 @@ const SubPopupMenu = {
|
||||||
this.instanceArrayKeyIndexMap[key] = Object.keys(this.instanceArrayKeyIndexMap).length;
|
this.instanceArrayKeyIndexMap[key] = Object.keys(this.instanceArrayKeyIndexMap).length;
|
||||||
}
|
}
|
||||||
const childListeners = getEvents(child);
|
const childListeners = getEvents(child);
|
||||||
const isSubMenu = child.componentOptions && child.componentOptions.Ctor.options.isSubMenu;
|
|
||||||
const newChildProps = {
|
const newChildProps = {
|
||||||
props: {
|
props: {
|
||||||
mode: childProps.mode || props.mode,
|
mode: childProps.mode || props.mode,
|
||||||
|
@ -334,11 +333,11 @@ const SubPopupMenu = {
|
||||||
...extraProps,
|
...extraProps,
|
||||||
},
|
},
|
||||||
on: {
|
on: {
|
||||||
click: isSubMenu
|
click: e => {
|
||||||
? noop
|
if ('keyPath' in e) {
|
||||||
: e => {
|
|
||||||
(childListeners.click || noop)(e);
|
(childListeners.click || noop)(e);
|
||||||
this.onClick(e);
|
this.onClick(e);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
itemHover: this.onItemHover,
|
itemHover: this.onItemHover,
|
||||||
openChange: this.onOpenChange,
|
openChange: this.onOpenChange,
|
||||||
|
|
Loading…
Reference in New Issue