mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 14:13:37 +08:00
update dropdown demos
This commit is contained in:
parent
c4fd66340d
commit
e7c90a5124
@ -12,19 +12,18 @@ var Dropdown = antd.Dropdown;
|
||||
|
||||
var menu = <Menu>
|
||||
<Menu.Item key="0">
|
||||
<a href="http://www.alipay.com/">第一个菜单项</a>
|
||||
<a target="_blank" href="http://www.alipay.com/">第一个菜单项</a>
|
||||
</Menu.Item>
|
||||
<Menu.Item key="1">
|
||||
<a href="http://www.taobao.com/">第二个菜单项</a>
|
||||
<a target="_blank" href="http://www.taobao.com/">第二个菜单项</a>
|
||||
</Menu.Item>
|
||||
<Menu.Divider/>
|
||||
<Menu.Item key="3">第三个菜单项</Menu.Item>
|
||||
</Menu>;
|
||||
|
||||
React.render(
|
||||
<Dropdown overlay={menu}>
|
||||
<button className="ant-btn ant-btn-default">
|
||||
点我下来 <i className="anticon anticon-caret-down"></i>
|
||||
某按钮 <i className="anticon anticon-caret-down"></i>
|
||||
</button>
|
||||
</Dropdown>
|
||||
, document.getElementById('components-dropdown-demo-basic'));
|
||||
|
@ -1,6 +1,6 @@
|
||||
# 基本
|
||||
|
||||
- order: 1
|
||||
- order: 3
|
||||
|
||||
点击菜单项后会触发事件,用户可以通过相应的菜单项 key 进行不同的操作。
|
||||
|
||||
@ -17,7 +17,6 @@ var menu = <Menu onClick={onClick}>
|
||||
<Menu.Item key="1">第一个菜单项</Menu.Item>
|
||||
<Menu.Item key="2">第二个菜单项</Menu.Item>
|
||||
<Menu.Item key="3">第三个菜单项</Menu.Item>
|
||||
<Menu.Item key="4" disabled>第四个菜单项</Menu.Item>
|
||||
</Menu>;
|
||||
|
||||
React.render(
|
||||
|
31
components/dropdown/demo/item.md
Normal file
31
components/dropdown/demo/item.md
Normal file
@ -0,0 +1,31 @@
|
||||
# 其他元素
|
||||
|
||||
- order: 1
|
||||
|
||||
分割线和不可用菜单项。
|
||||
|
||||
---
|
||||
|
||||
````jsx
|
||||
var Menu = antd.Menu;
|
||||
var Dropdown = antd.Dropdown;
|
||||
|
||||
var menu = <Menu>
|
||||
<Menu.Item key="0">
|
||||
<a target="_blank" href="http://www.alipay.com/">第一个菜单项</a>
|
||||
</Menu.Item>
|
||||
<Menu.Item key="1">
|
||||
<a target="_blank" href="http://www.taobao.com/">第二个菜单项</a>
|
||||
</Menu.Item>
|
||||
<Menu.Divider/>
|
||||
<Menu.Item key="3" disabled>第三个菜单项(不可用)</Menu.Item>
|
||||
</Menu>;
|
||||
|
||||
React.render(
|
||||
<Dropdown overlay={menu}>
|
||||
<button className="ant-btn ant-btn-default">
|
||||
鼠标移入 <i className="anticon anticon-caret-down"></i>
|
||||
</button>
|
||||
</Dropdown>
|
||||
, document.getElementById('components-dropdown-demo-item'));
|
||||
````
|
@ -1,6 +1,6 @@
|
||||
# 触发方式
|
||||
|
||||
- order: 1
|
||||
- order: 2
|
||||
|
||||
点击或鼠标移入触发。
|
||||
|
||||
|
@ -572,7 +572,10 @@ footer ul li > a {
|
||||
border-spacing: 0px;
|
||||
empty-cells: show;
|
||||
border: 1px solid #e9e9e9;
|
||||
width: 75%;
|
||||
}
|
||||
|
||||
.markdown > table th {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.markdown > table th,
|
||||
|
Loading…
Reference in New Issue
Block a user