feat: menu event args add item #4290

v3-button^2
tangjinzhou 3 years ago
parent 9a86d1b54d
commit 0c3d9d535d

@ -94,6 +94,10 @@ export default defineComponent({
keyPath: keysPath.value,
eventKeyPath: [...parentEventKeys.value, eventKey],
domEvent: e,
item: {
...props,
...attrs,
},
};
};

@ -1,4 +1,5 @@
import type { Key } from '../../_util/type';
import type { MenuItemProps } from './MenuItem';
export type MenuTheme = 'light' | 'dark';
@ -24,6 +25,7 @@ export interface MenuInfo {
keyPath?: Key[];
eventKeyPath: string[];
domEvent: MouseEvent | KeyboardEvent;
item: MenuItemProps & { [key: string]: any };
}
export interface MenuTitleInfo {

@ -7,8 +7,8 @@ import addEventListener from '../vc-util/Dom/addEventListener';
import { getConfirmLocale } from './locale';
import CloseOutlined from '@ant-design/icons-vue/CloseOutlined';
import Button from '../button';
import type { ButtonProps as ButtonPropsType } from '../button/buttonTypes';
import buttonTypes, { ButtonType } from '../button/buttonTypes';
import type { ButtonProps as ButtonPropsType, ButtonType } from '../button/buttonTypes';
import buttonTypes from '../button/buttonTypes';
import LocaleReceiver from '../locale-provider/LocaleReceiver';
import { getComponent, getSlot } from '../_util/props-util';
import initDefaultProps from '../_util/props-util/initDefaultProps';

Loading…
Cancel
Save