mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-11-30 02:57:50 +08:00
chore: add menu onClick ts type (#2758)
* chore: add menu click type * chore: change menu onClick definition * chore: update menu onClick type
This commit is contained in:
parent
05a6f82644
commit
19c4ec819a
13
types/menu/menu.d.ts
vendored
13
types/menu/menu.d.ts
vendored
@ -14,7 +14,7 @@ export declare class Menu extends AntdComponent {
|
||||
static SubMenu: typeof SubMenu;
|
||||
static ItemGroup: typeof MenuItemGroup;
|
||||
static Divider: typeof Divider;
|
||||
$props: AntdProps & {
|
||||
$props: Omit<AntdProps, 'onClick'> & {
|
||||
/**
|
||||
* Allow selection of multiple items
|
||||
* @default false
|
||||
@ -106,5 +106,16 @@ export declare class Menu extends AntdComponent {
|
||||
* @type boolean
|
||||
*/
|
||||
inlineCollapsed?: boolean;
|
||||
|
||||
/**
|
||||
* set the handler to handle click event
|
||||
* @param params
|
||||
*/
|
||||
onClick?: (params: {
|
||||
key: string | number;
|
||||
keyPath: string[] | number[];
|
||||
item: any;
|
||||
domEvent: MouseEvent;
|
||||
}) => void;
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user