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

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 visible: false
}); });
}, },
handleCancel() {
console.log('点击了取消');
this.setState({
visible: false
});
},
render() { render() {
return <div> return <div>
<button className="ant-btn ant-btn-primary" onClick={this.showModal}>显示对话框</button> <button className="ant-btn ant-btn-primary" onClick={this.showModal}>显示对话框</button>

View File

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

View File

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