Add comment for menu openKeys

pull/700/head
afc163 9 years ago
parent b55d43924d
commit a277669aba

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

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

Loading…
Cancel
Save