fix: menu
parent
de922bebba
commit
adad60e933
|
@ -4,7 +4,7 @@ import { connect } from '../_util/store';
|
||||||
import BaseMixin from '../_util/BaseMixin';
|
import BaseMixin from '../_util/BaseMixin';
|
||||||
import KeyCode from '../_util/KeyCode';
|
import KeyCode from '../_util/KeyCode';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import { getKeyFromChildrenIndex, loopMenuItem, noop, isMobileDevice } from './util';
|
import { getKeyFromChildrenIndex, loopMenuItem, noop, isMobileDevice, menuAllProps } from './util';
|
||||||
import DOMWrap from './DOMWrap';
|
import DOMWrap from './DOMWrap';
|
||||||
import { cloneElement } from '../_util/vnode';
|
import { cloneElement } from '../_util/vnode';
|
||||||
import { initDefaultProps, getOptionProps, getComponent, splitAttrs } from '../_util/props-util';
|
import { initDefaultProps, getOptionProps, getComponent, splitAttrs } from '../_util/props-util';
|
||||||
|
@ -342,6 +342,7 @@ const SubPopupMenu = {
|
||||||
this.instanceArray = [];
|
this.instanceArray = [];
|
||||||
this.instanceArrayKeyIndexMap = {};
|
this.instanceArrayKeyIndexMap = {};
|
||||||
const className = classNames(props.class, props.prefixCls, `${props.prefixCls}-${props.mode}`);
|
const className = classNames(props.class, props.prefixCls, `${props.prefixCls}-${props.mode}`);
|
||||||
|
menuAllProps.forEach(key => delete props[key]);
|
||||||
// Otherwise, the propagated click event will trigger another onClick
|
// Otherwise, the propagated click event will trigger another onClick
|
||||||
delete onEvents.onClick;
|
delete onEvents.onClick;
|
||||||
const domWrapProps = {
|
const domWrapProps = {
|
||||||
|
|
|
@ -109,6 +109,7 @@ export const menuAllProps = [
|
||||||
'onTitleMouseenter',
|
'onTitleMouseenter',
|
||||||
'onTitleMouseleave',
|
'onTitleMouseleave',
|
||||||
'onTitleClick',
|
'onTitleClick',
|
||||||
|
'__propsSymbol__',
|
||||||
];
|
];
|
||||||
|
|
||||||
// ref: https://github.com/ant-design/ant-design/issues/14007
|
// ref: https://github.com/ant-design/ant-design/issues/14007
|
||||||
|
|
Loading…
Reference in New Issue