Fix Modal onCancel argument, ref #980

This commit is contained in:
afc163 2016-02-02 14:54:34 +08:00
parent df1b174583
commit 6700dbba2a
4 changed files with 6 additions and 6 deletions

View File

@ -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() {

View File

@ -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
}); });

View File

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

View File

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