mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-02 12:09:14 +08:00
adjust onCancel
This commit is contained in:
parent
d5f760f9e7
commit
580481221f
@ -13,16 +13,14 @@ var Modal = React.createClass({
|
||||
},
|
||||
|
||||
handleCancel() {
|
||||
this.props.onCancel();
|
||||
this.hide();
|
||||
this.refs.d.requestClose();
|
||||
},
|
||||
|
||||
getDefaultProps() {
|
||||
return {
|
||||
prefixCls: 'ant-modal',
|
||||
onOk: noop,
|
||||
onCancel: noop,
|
||||
onBeforeClose: noop
|
||||
onCancel: noop
|
||||
};
|
||||
},
|
||||
|
||||
@ -48,7 +46,7 @@ var Modal = React.createClass({
|
||||
<button type="button" className="ant-btn-default ant-btn" onClick={this.handleCancel}>取 消</button>,
|
||||
<button type="button" className="ant-btn-primary ant-btn" onClick={this.handleOk}>确 定</button>
|
||||
];
|
||||
return <Dialog animation="zoom" visible={this.state.visible} maskAnimation="fade" width="500" footer={footer} {...props} ref="d"/>;
|
||||
return <Dialog animation="zoom" onBeforeClose={props.onCancel} visible={this.state.visible} maskAnimation="fade" width="500" footer={footer} {...props} ref="d"/>;
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
"gregorian-calendar": "~3.0.0",
|
||||
"gregorian-calendar-format": "~3.0.1",
|
||||
"rc-calendar": "~3.9.0",
|
||||
"rc-dialog": "~4.3.0",
|
||||
"rc-dialog": "~4.3.1",
|
||||
"rc-dropdown": "~1.0.0",
|
||||
"rc-menu": "~3.3.0",
|
||||
"rc-progress": "~1.0.0",
|
||||
|
Loading…
Reference in New Issue
Block a user