feat: add closable option for confirm dialog (#798)

pull/800/head
Yuga Sun 6 years ago committed by tangjinzhou
parent d478653673
commit 00656b5ce9

@ -21,6 +21,7 @@ export default {
maskStyle,
okButtonProps,
cancelButtonProps,
closable = false,
} = props;
const iconType = props.iconType || 'question-circle';
const okType = props.okType || 'primary';
@ -62,6 +63,7 @@ export default {
wrapClassName={classNames({ [`${contentPrefixCls}-centered`]: !!centered })}
onCancel={e => close({ triggerCancel: true }, e)}
visible={visible}
closable={closable}
title=""
transitionName="zoom"
footer=""

@ -53,6 +53,7 @@ The properties of the object are follows:
| autoFocusButton | Specify which button to autofocus | null\|string: `ok` `cancel` | `ok` |
| cancelText | Text of the Cancel button | string | `Cancel` |
| centered | Centered Modal | Boolean | `false` |
| closable | Whether a close (x) button is visible on top right of the modal dialog or not | boolean | `false` |
| class | class of container | string | - |
| content | Content | string\|vNode | - |
| iconType | Icon `type` of the Icon component | string | `question-circle` |

@ -52,6 +52,7 @@
| autoFocusButton | 指定自动获得焦点的按钮 | null\|string: `ok` `cancel` | `ok` |
| cancelText | 取消按钮文字 | string | 取消 |
| centered | 垂直居中展示 Modal | Boolean | `false` |
| closable | 是否显示右上角的关闭按钮 | boolean | `false` |
| class | 容器类名 | string | - |
| content | 内容 | string\|vNode | 无 |
| iconType | 图标 Icon 类型 | string | question-circle |

@ -7,10 +7,6 @@
display: none;
}
.@{ant-prefix}-modal-close {
display: none;
}
.@{ant-prefix}-modal-body {
padding: 32px 32px 24px;
}

Loading…
Cancel
Save