mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-25 03:29:59 +08:00
* feat: Modal.confirm add maskClosable option (#4488) * feat: Modal.confirm add maskClosable option (#4488)
This commit is contained in:
parent
c6f6de3605
commit
a2bef2b87e
@ -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}
|
||||
>
|
||||
|
@ -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 {
|
||||
|
@ -54,6 +54,7 @@ title: Modal
|
||||
| iconType | 图标 Icon 类型 | String | question-circle |
|
||||
| okText | 确认按钮文字 | String | 确定 |
|
||||
| cancelText | 取消按钮文字 | String | 取消 |
|
||||
| maskClosable | 点击蒙层是否允许关闭 | Boolean | `false` |
|
||||
|
||||
<style>
|
||||
.code-box-demo .ant-btn {
|
||||
|
Loading…
Reference in New Issue
Block a user