Browse Source

Fix missing API document of Menu[multiple]

pull/5153/head
afc163 8 years ago
parent
commit
c1cb365eca
  1. 1
      components/menu/index.en-US.md
  2. 17
      components/menu/index.tsx
  3. 1
      components/menu/index.zh-CN.md

1
components/menu/index.en-US.md

@ -40,6 +40,7 @@ More layout and samples: [layout](/docs/spec/layout).
| onClick | callback of the clicked menu item, params: {item, key, keyPath} | function | - |
| style | style of the root node | object | |
| inlineIndent | indent px of inline menu item on each level | number | 24 |
| multiple | Allow select multiple item | boolean | false |
> More options in [rc-menu](https://github.com/react-component/menu#api)

17
components/menu/index.tsx

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

1
components/menu/index.zh-CN.md

@ -41,6 +41,7 @@ subtitle: 导航菜单
| onClick | 点击 menuitem 调用此函数,参数为 {item, key, keyPath} | function | - |
| style | 根节点样式 | object | |
| inlineIndent | inline 模式的菜单缩进宽度 | number | 24 |
| multiple | 是否允许多选 | boolean | false |
> More options in [rc-menu](https://github.com/react-component/menu#api)

Loading…
Cancel
Save