Browse Source

update menu API doc

pull/7226/merge
afc163 7 years ago
parent
commit
53640c3f18
  1. 10
      components/menu/index.en-US.md
  2. 10
      components/menu/index.zh-CN.md

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

@ -35,10 +35,10 @@ More layouts with navigation: [layout](/components/layout).
| defaultSelectedKeys | array with the keys of default selected menu items | string[] | |
| openKeys | array with the keys of currently opened sub menus | string[] | |
| defaultOpenKeys | array with the keys of default opened sub menus | | |
| onOpenChange | called when open/close sub menu | Function(openKeys: string[]) | noop |
| onSelect | callback of the selected item | Function({ item, key, selectedKeys }) | none |
| onDeselect | callback of the deselected item, only supported for multiple mode | Function({ item, key, selectedKeys }) | - |
| onClick | callback of the clicked menu item, params: {item, key, keyPath} | function | - |
| onOpenChange | called when open/close sub menu | function(openKeys: string[]) | noop |
| onSelect | callback of the selected item | function({ item, key, selectedKeys }) | none |
| onDeselect | callback of the deselected item, only supported for multiple mode | function({ item, key, selectedKeys }) | - |
| onClick | callback when click menu item, params: {item, key, keyPath} | function({ item, key, keyPath }) | - |
| 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 |
@ -61,7 +61,7 @@ More layouts with navigation: [layout](/components/layout).
| key | unique id of the menu item | string | |
| title | title of the sub menu | string\|ReactNode | |
| children | sub menus or sub menu items | Array<MenuItem\|SubMenu> | |
| onTitleClick | callback of the clicked sub menu title | Function({ key, domEvent }) | |
| onTitleClick | callback of the clicked sub menu title | function({ key, domEvent }) | |
### Menu.ItemGroup

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

@ -35,10 +35,10 @@ subtitle: 导航菜单
| defaultSelectedKeys | 初始选中的菜单项 key 数组 | string[] | |
| openKeys | 当前展开的 SubMenu 菜单项 key 数组 | string[] | |
| defaultOpenKeys | 初始展开的 SubMenu 菜单项 key 数组 | | |
| onOpenChange | SubMenu 展开/关闭的回调 | Function(openKeys: string[]) | noop |
| onSelect | 被选中时调 | Function({ item, key, selectedKeys }) | 无 |
| onDeselect | 取消选中时调用,仅在 multiple 生效 | Function({ item, key, selectedKeys }) | - |
| onClick | 点击 menuitem 调用此函数,参数为 {item, key, keyPath} | function | - |
| onOpenChange | SubMenu 展开/关闭的回调 | function(openKeys: string[]) | noop |
| onSelect | 被选中时调 | function({ item, key, selectedKeys }) | 无 |
| onDeselect | 取消选中时调用,仅在 multiple 生效 | function({ item, key, selectedKeys }) | - |
| onClick | 点击 MenuItem 调用此函数 | function({ item, key, keyPath }) | - |
| style | 根节点样式 | object | |
| inlineIndent | inline 模式的菜单缩进宽度 | number | 24 |
| multiple | 是否允许多选 | boolean | false |
@ -61,7 +61,7 @@ subtitle: 导航菜单
| key | 唯一标志 | string | |
| title | 子菜单项值 | string\|ReactNode | |
| children | 子菜单的菜单项 | Array<MenuItem\|SubMenu> | |
| onTitleClick | 点击子菜单标题 | Function({ key, domEvent }) | |
| onTitleClick | 点击子菜单标题 | function({ key, domEvent }) | |
### Menu.ItemGroup

Loading…
Cancel
Save