update Dropdown demo code style

This commit is contained in:
afc163 2015-06-09 18:08:56 +08:00
parent 88800524dd
commit 7e142a7aa5
2 changed files with 14 additions and 18 deletions

View File

@ -9,10 +9,9 @@
````jsx
var Menu = antd.Menu;
var Dropdown = antd.Dropdown;
function onClick(key){
var onClick = function (key){
alert('选中了菜单' + key);
}
};
var menu = <Menu onClick={onClick}>
<Menu.Item key="1">第一个菜单项</Menu.Item>
@ -21,7 +20,6 @@ var menu = <Menu onClick={onClick}>
<Menu.Item key="4" disabled>第四个菜单项</Menu.Item>
</Menu>;
React.render(
<Dropdown overlay={menu}>
<button className="ant-btn ant-btn-ghost">

View File

@ -21,18 +21,16 @@ var menu = <Menu>
<Menu.Item key="3">第三个菜单项</Menu.Item>
</Menu>;
React.render(
<div>
<Dropdown overlay={menu} trigger="click">
<button className="ant-btn ant-btn-ghost">
点我下来 <i className="anticon anticon-caret-down"></i>
</button>
</Dropdown>
<Dropdown overlay={menu}>
<button className="ant-btn ant-btn-ghost">
鼠标移入 <i className="anticon anticon-caret-down"></i>
</button>
</Dropdown>
</div>
, document.getElementById('components-dropdown-demo-trigger'));
React.render(<div>
<Dropdown overlay={menu} trigger="click">
<button className="ant-btn ant-btn-ghost">
点我下来 <i className="anticon anticon-caret-down"></i>
</button>
</Dropdown>
<Dropdown overlay={menu}>
<button className="ant-btn ant-btn-ghost">
鼠标移入 <i className="anticon anticon-caret-down"></i>
</button>
</Dropdown>
</div>, document.getElementById('components-dropdown-demo-trigger'));
````