2015-06-08 19:10:47 +08:00
|
|
|
# 基本
|
|
|
|
|
|
|
|
- order: 0
|
|
|
|
|
2015-06-09 13:46:47 +08:00
|
|
|
最简单的下拉菜单。
|
2015-06-08 19:10:47 +08:00
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
````jsx
|
|
|
|
var Menu = antd.Menu;
|
|
|
|
var Dropdown = antd.Dropdown;
|
|
|
|
|
2015-06-09 13:46:47 +08:00
|
|
|
var menu = <Menu>
|
|
|
|
<Menu.Item key="0">
|
|
|
|
<a href="http://www.alipay.com/">第一个菜单项</a>
|
|
|
|
</Menu.Item>
|
|
|
|
<Menu.Item key="1">
|
|
|
|
<a href="http://www.taobao.com/">第二个菜单项</a>
|
|
|
|
</Menu.Item>
|
2015-06-08 19:10:47 +08:00
|
|
|
<Menu.Divider/>
|
2015-06-09 13:46:47 +08:00
|
|
|
<Menu.Item key="3">第三个菜单项</Menu.Item>
|
2015-06-08 19:10:47 +08:00
|
|
|
</Menu>;
|
|
|
|
|
|
|
|
React.render(
|
2015-06-09 14:46:51 +08:00
|
|
|
<Dropdown overlay={menu}>
|
2015-06-09 13:46:47 +08:00
|
|
|
<button className="ant-btn ant-btn-ghost">
|
|
|
|
点我下来 <i className="anticon anticon-caret-down"></i>
|
|
|
|
</button>
|
2015-06-08 19:10:47 +08:00
|
|
|
</Dropdown>
|
|
|
|
, document.getElementById('components-dropdown-demo-basic'));
|
|
|
|
````
|