mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-25 03:29:59 +08:00
Add comment for menu openKeys
This commit is contained in:
parent
b55d43924d
commit
a277669aba
@ -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)
|
||||
});
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user