提交 ffcf55d2 编写于 作者: A afc163

Fix dropdown click usecase, ref #535

上级 de78d5e3
......@@ -8,11 +8,11 @@
````jsx
import { Menu, Dropdown, Button, Icon } from 'antd';
const onSelect = function ({key}){
alert('选中了菜单' + key);
const onClick = function({key}) {
console.log('点击了菜单' + key);
};
const menu = <Menu onSelect={onSelect}>
const menu = <Menu onClick={onClick}>
<Menu.Item key="1">第一个菜单项</Menu.Item>
<Menu.Item key="2">第二个菜单项</Menu.Item>
<Menu.Item key="3">第三个菜单项</Menu.Item>
......
......@@ -20,7 +20,7 @@
|-------------|------------------|--------------------|--------------|
| trigger | 触发下拉的行为 | "click" or "hover" | hover |
| overlay | 菜单节点 | React.Element | 无 |
| onSelect | 选择后的回调 | function(e) {} | 无 |
| onClick | 点击菜单后的回调 | function({key,keyPath,item,domEvent}) {} | 无 |
菜单可由 `antd.Menu` 取得,可设置 `onSelect` 回调,菜单还包括菜单项 `antd.Menu.Item`,分割线 `antd.Menu.Divider`
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册