feat: Modal.confirm add maskClosable option (#4488) (#4490)

* feat: Modal.confirm add maskClosable option (#4488)

* feat: Modal.confirm add maskClosable option (#4488)
This commit is contained in:
Pixy Yuan 2017-01-07 15:17:27 +08:00 committed by afc163
parent c6f6de3605
commit a2bef2b87e
3 changed files with 6 additions and 1 deletions

View File

@ -16,6 +16,9 @@ export default function confirm(config) {
let width = props.width || 416;
let style = props.style || {};
// 默认为 false保持旧版默认行为
const maskClosable = props.maskClosable === undefined ? false : props.maskClosable;
// 默认为 true保持向下兼容
if (!('okCancel' in props)) {
props.okCancel = true;
@ -77,7 +80,7 @@ export default function confirm(config) {
transitionName="zoom"
footer=""
maskTransitionName="fade"
maskClosable={false}
maskClosable={maskClosable}
style={style}
width={width}
>

View File

@ -56,6 +56,7 @@ The properties of the object are follows:
| iconType | Type of Icon component | String | question-circle |
| okText | Text of OK button | String | OK |
| cancelText | Text of cancel button | String | Cancel |
| maskClosable | Determine whether to close the modal dialog when clicked mask of it. | Boolean | `false` |
<style>
.code-box-demo .ant-btn {

View File

@ -54,6 +54,7 @@ title: Modal
| iconType | 图标 Icon 类型 | String | question-circle |
| okText | 确认按钮文字 | String | 确定 |
| cancelText | 取消按钮文字 | String | 取消 |
| maskClosable | 点击蒙层是否允许关闭 | Boolean | `false` |
<style>
.code-box-demo .ant-btn {