除了自定义页脚外,点击取消不需要手动设置关闭

This commit is contained in:
afc163 2015-08-17 16:42:33 +08:00
parent 4af25dffb2
commit 539ac64998
3 changed files with 1 additions and 11 deletions

View File

@ -26,12 +26,6 @@ var Test = React.createClass({
visible: false
});
},
handleCancel() {
console.log('点击了取消');
this.setState({
visible: false
});
},
render() {
return <div>
<button className="ant-btn ant-btn-primary" onClick={this.showModal}>显示对话框</button>

View File

@ -34,9 +34,6 @@ var Test = React.createClass({
},
handleCancel() {
console.log('点击了取消');
this.setState({
visible: false
});
},
render() {
return <div>

View File

@ -12,8 +12,7 @@ export default React.createClass({
},
handleCancel() {
var d = this.refs.d;
d.requestClose();
this.refs.d.requestClose();
},
getDefaultProps() {