|
@ -20,35 +20,24 @@ export interface ClickParam { |
|
|
|
|
|
|
|
|
export interface MenuProps { |
|
|
export interface MenuProps { |
|
|
id?: string; |
|
|
id?: string; |
|
|
/** 主题颜色*/ |
|
|
/** `light` `dark` */ |
|
|
theme?: 'light' | 'dark'; |
|
|
theme?: 'light' | 'dark'; |
|
|
/** 菜单类型 enum: `vertical` `horizontal` `inline`*/ |
|
|
/** enum: `vertical` `horizontal` `inline` */ |
|
|
mode?: 'vertical' | 'horizontal' | 'inline'; |
|
|
mode?: 'vertical' | 'horizontal' | 'inline'; |
|
|
/** 当前选中的菜单项 key 数组*/ |
|
|
|
|
|
selectedKeys?: Array<string>; |
|
|
selectedKeys?: Array<string>; |
|
|
/** 初始选中的菜单项 key 数组*/ |
|
|
|
|
|
defaultSelectedKeys?: Array<string>; |
|
|
defaultSelectedKeys?: Array<string>; |
|
|
/** 当前展开的菜单项 key 数组*/ |
|
|
|
|
|
openKeys?: Array<string>; |
|
|
openKeys?: Array<string>; |
|
|
/** 初始展开的菜单项 key 数组*/ |
|
|
|
|
|
defaultOpenKeys?: Array<string>; |
|
|
defaultOpenKeys?: Array<string>; |
|
|
onOpenChange?: (openKeys: string[]) => void; |
|
|
onOpenChange?: (openKeys: string[]) => void; |
|
|
/** |
|
|
|
|
|
* 被选中时调用 |
|
|
|
|
|
* |
|
|
|
|
|
* @type {(item: any, key: string, selectedKeys: Array<string>) => void} |
|
|
|
|
|
*/ |
|
|
|
|
|
onSelect?: (param: SelectParam) => void; |
|
|
onSelect?: (param: SelectParam) => void; |
|
|
/** 取消选中时调用*/ |
|
|
|
|
|
onDeselect?: (param: SelectParam) => void; |
|
|
onDeselect?: (param: SelectParam) => void; |
|
|
/** 点击 menuitem 调用此函数*/ |
|
|
|
|
|
onClick?: (param: ClickParam) => void; |
|
|
onClick?: (param: ClickParam) => void; |
|
|
/** 根节点样式*/ |
|
|
|
|
|
style?: React.CSSProperties; |
|
|
style?: React.CSSProperties; |
|
|
openAnimation?: string | Object; |
|
|
openAnimation?: string | Object; |
|
|
openTransitionName?: string | Object; |
|
|
openTransitionName?: string | Object; |
|
|
className?: string; |
|
|
className?: string; |
|
|
prefixCls?: string; |
|
|
prefixCls?: string; |
|
|
|
|
|
multiple?: boolean; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
export default class Menu extends React.Component<MenuProps, any> { |
|
|
export default class Menu extends React.Component<MenuProps, any> { |
|
|