Add comment for menu openKeys

This commit is contained in:
afc163 2015-12-27 13:34:59 +08:00
parent b55d43924d
commit a277669aba
2 changed files with 6 additions and 3 deletions

View File

@ -24,7 +24,7 @@ const Sider = React.createClass({
openKeys: e.keyPath.slice(1)
});
},
onToggle(info){
onToggle(info) {
this.setState({
openKeys: info.open ? info.keyPath : info.keyPath.slice(1)
});

View File

@ -31,13 +31,13 @@ const AntMenu = React.createClass({
this.setState({
openKeys: e.openKeys
});
this.props.onOpen();
this.props.onOpen(e);
},
handleCloseKeys(e) {
this.setState({
openKeys: e.openKeys
});
this.props.onClose();
this.props.onClose(e);
},
render() {
let openAnimation = '';
@ -54,6 +54,9 @@ const AntMenu = React.createClass({
default:
}
//
//
// 使
let props = {
openKeys: this.state.openKeys,
onClick: this.handleClick,