mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-03 20:47:56 +08:00
fix: submenu trigger double click event #1450
This commit is contained in:
parent
5d17c7f435
commit
910a62eb4a
@ -308,6 +308,7 @@ 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,
|
||||||
@ -333,7 +334,9 @@ const SubPopupMenu = {
|
|||||||
...extraProps,
|
...extraProps,
|
||||||
},
|
},
|
||||||
on: {
|
on: {
|
||||||
click: e => {
|
click: isSubMenu
|
||||||
|
? noop
|
||||||
|
: e => {
|
||||||
(childListeners.click || noop)(e);
|
(childListeners.click || noop)(e);
|
||||||
this.onClick(e);
|
this.onClick(e);
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user