mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 14:13:37 +08:00
Fix Modal onCancel argument, ref #980
This commit is contained in:
parent
df1b174583
commit
6700dbba2a
@ -20,12 +20,12 @@ let AntModal = React.createClass({
|
|||||||
transitionName: 'zoom',
|
transitionName: 'zoom',
|
||||||
maskAnimation: 'fade',
|
maskAnimation: 'fade',
|
||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
visible: false
|
visible: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
handleCancel() {
|
handleCancel(e) {
|
||||||
this.props.onCancel();
|
this.props.onCancel(e);
|
||||||
},
|
},
|
||||||
|
|
||||||
handleOk() {
|
handleOk() {
|
||||||
|
@ -24,7 +24,8 @@ const App = React.createClass({
|
|||||||
visible: false
|
visible: false
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleCancel() {
|
handleCancel(e) {
|
||||||
|
console.log(e);
|
||||||
this.setState({
|
this.setState({
|
||||||
visible: false
|
visible: false
|
||||||
});
|
});
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
| title | 标题 | React.Element | 无 |
|
| title | 标题 | React.Element | 无 |
|
||||||
| closable | 是否显示右上角的关闭按钮 | Boolean | true |
|
| closable | 是否显示右上角的关闭按钮 | Boolean | true |
|
||||||
| onOk | 点击确定回调 | function | 无 |
|
| onOk | 点击确定回调 | function | 无 |
|
||||||
| onCancel | 点击遮罩层或右上角叉或取消按钮的回调 | function | 无 |
|
| onCancel | 点击遮罩层或右上角叉或取消按钮的回调 | function(e) | 无 |
|
||||||
| width | 宽度 | String or Number | 520 |
|
| width | 宽度 | String or Number | 520 |
|
||||||
| footer | 底部内容 | React.Element | 确定取消按钮 |
|
| footer | 底部内容 | React.Element | 确定取消按钮 |
|
||||||
| okText | 确认按钮文字 | String | 确定 |
|
| okText | 确认按钮文字 | String | 确定 |
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
left: -9999px;
|
left: -9999px;
|
||||||
top: -9999px;
|
top: -9999px;
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
min-height: 240px;
|
|
||||||
|
|
||||||
&-wrap * {
|
&-wrap * {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
Loading…
Reference in New Issue
Block a user