2015-08-14 18:16:41 +08:00
|
|
|
# 垂直菜单
|
2015-08-06 16:49:54 +08:00
|
|
|
|
2015-09-16 12:18:04 +08:00
|
|
|
- order: 3
|
2015-08-06 16:49:54 +08:00
|
|
|
|
2015-08-14 18:16:41 +08:00
|
|
|
子菜单是弹出的形式。
|
2015-08-06 16:49:54 +08:00
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
````jsx
|
|
|
|
var Menu = antd.Menu;
|
|
|
|
var MenuItem = Menu.Item;
|
|
|
|
var SubMenu = Menu.SubMenu;
|
|
|
|
|
2015-08-15 00:07:40 +08:00
|
|
|
function handleClick(e) {
|
|
|
|
console.log('click', e);
|
2015-08-06 16:49:54 +08:00
|
|
|
}
|
|
|
|
|
2015-08-14 18:16:41 +08:00
|
|
|
React.render(<Menu onClick={handleClick} style={{width:240}} mode="vertical">
|
|
|
|
<SubMenu key="sub1" title={<span><i className="anticon anticon-mail"></i><span>导航一</span></span>}>
|
2015-08-06 16:49:54 +08:00
|
|
|
<MenuItem key="1">选项1</MenuItem>
|
|
|
|
<MenuItem key="2">选项2</MenuItem>
|
|
|
|
<MenuItem key="3">选项3</MenuItem>
|
|
|
|
<MenuItem key="4">选项4</MenuItem>
|
|
|
|
</SubMenu>
|
2015-08-19 11:31:14 +08:00
|
|
|
<SubMenu key="sub2" title={<span><i className="anticon anticon-appstore"></i><span>导航二</span></span>}>
|
2015-08-06 16:49:54 +08:00
|
|
|
<MenuItem key="5">选项5</MenuItem>
|
|
|
|
<MenuItem key="6">选项6</MenuItem>
|
2015-08-14 18:16:41 +08:00
|
|
|
<SubMenu key="sub3" title="三级导航">
|
|
|
|
<MenuItem key="7">选项7</MenuItem>
|
|
|
|
<MenuItem key="8">选项8</MenuItem>
|
|
|
|
</SubMenu>
|
2015-08-06 16:49:54 +08:00
|
|
|
</SubMenu>
|
2015-08-14 18:16:41 +08:00
|
|
|
<SubMenu key="sub4" title={<span><i className="anticon anticon-setting"></i><span>导航三</span></span>}>
|
2015-08-06 16:49:54 +08:00
|
|
|
<MenuItem key="9">选项9</MenuItem>
|
|
|
|
<MenuItem key="10">选项10</MenuItem>
|
|
|
|
<MenuItem key="11">选项11</MenuItem>
|
|
|
|
<MenuItem key="12">选项12</MenuItem>
|
|
|
|
</SubMenu>
|
2015-08-14 18:16:41 +08:00
|
|
|
</Menu>
|
|
|
|
, document.getElementById('components-menu-demo-vertical'));
|
2015-08-06 16:49:54 +08:00
|
|
|
````
|