add hover demo

This commit is contained in:
yiminghe 2015-06-08 19:21:17 +08:00
parent ac2899efbb
commit 3267c220aa
3 changed files with 32 additions and 2 deletions

View File

@ -2,7 +2,7 @@
- order: 0
点击
点击
---

View File

@ -0,0 +1,30 @@
# 基本
- order: 1
鼠标触发
---
````jsx
var Menu = antd.Menu;
var Dropdown = antd.Dropdown;
function onClick(key){
alert('select ' + key);
}
var menu = <Menu style={{width:140}} onClick={onClick}>
<Menu.Item disabled>disabled</Menu.Item>
<Menu.Item key="1">第一个菜单项</Menu.Item>
<Menu.Divider/>
<Menu.Item key="2">第二个菜单项</Menu.Item>
</Menu>;
React.render(
<Dropdown overlay={menu} trigger="hover">
<button className="ant-btn ant-btn-ghost">hover <span className="anticon anticon-caret-down"></span></button>
</Dropdown>
, document.getElementById('components-dropdown-demo-hover'));
````

View File

@ -18,7 +18,7 @@
| 成员 | 说明 | 类型 | 默认值 |
|----------|----------------|------------------|--------------|
| animation | 动画名称 | String ("slide-up") | 无 |
| trigger | 触发下来行为 | "click" or "mouse" | 无 |
| trigger | 触发下来行为 | "click" or "hover" | 无 |
| overlay | 菜单节点 | React.Element | 无 |