mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-03 04:30:06 +08:00
除了自定义页脚外,点击取消不需要手动设置关闭
This commit is contained in:
parent
4af25dffb2
commit
539ac64998
@ -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>
|
||||
|
@ -34,9 +34,6 @@ var Test = React.createClass({
|
||||
},
|
||||
handleCancel() {
|
||||
console.log('点击了取消');
|
||||
this.setState({
|
||||
visible: false
|
||||
});
|
||||
},
|
||||
render() {
|
||||
return <div>
|
||||
|
@ -12,8 +12,7 @@ export default React.createClass({
|
||||
},
|
||||
|
||||
handleCancel() {
|
||||
var d = this.refs.d;
|
||||
d.requestClose();
|
||||
this.refs.d.requestClose();
|
||||
},
|
||||
|
||||
getDefaultProps() {
|
||||
|
Loading…
Reference in New Issue
Block a user