Browse Source

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

pull/141/head
afc163 9 years ago
parent
commit
539ac64998
  1. 6
      components/modal/demo/basic.md
  2. 3
      components/modal/demo/custom.md
  3. 3
      components/modal/index.jsx

6
components/modal/demo/basic.md

@ -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>

3
components/modal/demo/custom.md

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

3
components/modal/index.jsx

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

Loading…
Cancel
Save