chore: add menu onClick ts type (#2758)
* chore: add menu click type * chore: change menu onClick definition * chore: update menu onClick typepull/2820/head
parent
05a6f82644
commit
19c4ec819a
|
@ -14,7 +14,7 @@ export declare class Menu extends AntdComponent {
|
||||||
static SubMenu: typeof SubMenu;
|
static SubMenu: typeof SubMenu;
|
||||||
static ItemGroup: typeof MenuItemGroup;
|
static ItemGroup: typeof MenuItemGroup;
|
||||||
static Divider: typeof Divider;
|
static Divider: typeof Divider;
|
||||||
$props: AntdProps & {
|
$props: Omit<AntdProps, 'onClick'> & {
|
||||||
/**
|
/**
|
||||||
* Allow selection of multiple items
|
* Allow selection of multiple items
|
||||||
* @default false
|
* @default false
|
||||||
|
@ -106,5 +106,16 @@ export declare class Menu extends AntdComponent {
|
||||||
* @type boolean
|
* @type boolean
|
||||||
*/
|
*/
|
||||||
inlineCollapsed?: 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