mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-28 05:05:48 +08:00
support promise for modal
This commit is contained in:
parent
dac8bc14c6
commit
82913b8610
@ -28,6 +28,9 @@ var Test = React.createClass({
|
||||
},
|
||||
handleCancel() {
|
||||
console.log('点击了取消');
|
||||
this.setState({
|
||||
visible: false
|
||||
});
|
||||
},
|
||||
render() {
|
||||
return <div>
|
||||
|
@ -34,6 +34,9 @@ var Test = React.createClass({
|
||||
},
|
||||
handleCancel() {
|
||||
console.log('点击了取消');
|
||||
this.setState({
|
||||
visible: false
|
||||
});
|
||||
},
|
||||
render() {
|
||||
return <div>
|
||||
|
@ -22,7 +22,7 @@
|
||||
|------------|----------------|------------------|--------------|
|
||||
| title | 标题 | React.Element | 无 |
|
||||
| onOk | 点击确定回调 | function | 无 |
|
||||
| onCancel | 点击遮罩层或右上角叉或取消按钮的回调,返回 promise 时 resolve 后自动关闭 | function | 无 |
|
||||
| onCancel | 点击遮罩层或右上角叉或取消按钮的回调 | function | 无 |
|
||||
| width | 宽度 | String or Number | 500 |
|
||||
| footer | 底部内容 | React.Element | 确定取消按钮 |
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user