update menu

This commit is contained in:
yiminghe 2015-08-15 00:07:40 +08:00
parent 1edb882aaa
commit fea0870a41
5 changed files with 14 additions and 14 deletions

View File

@ -16,10 +16,10 @@ var App = React.createClass({
current: 'mail'
}
},
handleClick(item) {
console.log('click ', item);
handleClick(e) {
console.log('click ', e);
this.setState({
current: item.key
current: e.key
});
},
render() {

View File

@ -16,10 +16,10 @@ var Sider = React.createClass({
current: 'mail'
}
},
handleClick(item) {
console.log('click ', item);
handleClick(e) {
console.log('click ', e);
this.setState({
current: item.key
current: e.key
});
},
render() {

View File

@ -11,8 +11,8 @@ var Menu = antd.Menu;
var MenuItem = Menu.Item;
var SubMenu = Menu.SubMenu;
function handleClick(item) {
console.log('click', item);
function handleClick(e) {
console.log('click', e);
}
React.render(<Menu onClick={handleClick} style={{width:240}} mode="vertical">

View File

@ -27,10 +27,10 @@
| 参数 | 说明 | 类型 | 默认值 |
|----------|----------------|----------|--------------|
| mode | 菜单类型 | enum: 'vertical', 'horizontal', 'inline' | false |
| mode | 菜单类型 | enum: 'vertical', 'horizontal', 'inline' | vertical |
| multiple | 支持多选 | | false |
| selectedKeys | 选中的菜单项 key 数组 | | |
| defaultSelectedKeys | 选中的菜单项 key 数组 | | |
| selectedKeys | 当前选中的菜单项 key 数组 | | |
| defaultSelectedKeys | 初始选中的菜单项 key 数组 | | |
| onSelect | 被选中时调用,参数 {item, key, selectedKeys} 对象 | function | 无 |
| onDeselect | 取消选中时调用,参数 {item, key, selectedKeys} 对象,仅在 multiple 生效 | function | 无 |
| onClick | 点击 menuitem 调用此函数,参数为 {item, key} | function | 无 |

View File

@ -119,7 +119,7 @@
text-rendering: auto;
position: absolute;
transition: transform .3s ease;
content: "\e600";
content: "\e611";
right: 16px;
.iconfont-size-under-12px(8px);
}
@ -129,8 +129,8 @@
display: block;
}
&.@{menuPrefixCls}-submenu-inline > .@{menuPrefixCls}-submenu-title:after {
.ie-rotate(2);
transform: rotate(180deg) scale(0.75);
.ie-rotate(1);
transform: rotate(90deg) scale(0.75);
}
}
}