mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-01 11:39:28 +08:00
rerun api-sort script
This commit is contained in:
parent
990d9c6192
commit
fe19a9b124
@ -16,28 +16,28 @@ and so on.
|
||||
|
||||
## API
|
||||
|
||||
| Property | Description | Type | Default |
|
||||
|------------|----------------|------------------|--------------|
|
||||
| visible | Whether the modal dialog is visible or not | boolean | false |
|
||||
| confirmLoading | Whether to apply loading visual effect for OK button or not | boolean | false |
|
||||
| title | The modal dialog's title | string\|ReactNode | - |
|
||||
| closable | Whether a close (x) button is visible on top right of the modal dialog or not | boolean | true |
|
||||
| onOk | Specify a function that will be called when a user clicks the OK button | function(e) | - |
|
||||
| onCancel | Specify a function that will be called when a user clicks mask, close button on top right or Cancel button | function(e) | - |
|
||||
| width | Width of the modal dialog | string\|number | 520 |
|
||||
| footer | Footer content, set as `footer={null}` when you don't need default buttons | string\|ReactNode | OK and Cancel buttons |
|
||||
| okText | Text of the OK button | string | `OK` |
|
||||
| okType | Button `type` of the OK button | string | `primary` |
|
||||
| cancelText | Text of the Cancel button | string | `Cancel` |
|
||||
| maskClosable | Whether to close the modal dialog when the mask (area outside the modal) is clicked | boolean | true |
|
||||
| style | Style of floating layer, typically used at least for adjusting the position. | object | - |
|
||||
| wrapClassName | The class name of the container of the modal dialog | string | - |
|
||||
| bodyStyle | Body style for modal body element. Such as height, padding etc. | object | {} |
|
||||
| maskStyle | Style for modal's mask element. | object | {} |
|
||||
| mask | Whether show mask or not. | Boolean | true |
|
||||
| Property | Description | Type | Default |
|
||||
| -------- | ----------- | ---- | ------- |
|
||||
| afterClose | Specify a function that will be called when modal is closed completely. | function | - |
|
||||
| bodyStyle | Body style for modal body element. Such as height, padding etc. | object | {} |
|
||||
| cancelText | Text of the Cancel button | string | `Cancel` |
|
||||
| closable | Whether a close (x) button is visible on top right of the modal dialog or not | boolean | true |
|
||||
| confirmLoading | Whether to apply loading visual effect for OK button or not | boolean | false |
|
||||
| footer | Footer content, set as `footer={null}` when you don't need default buttons | string\|ReactNode | OK and Cancel buttons |
|
||||
| getContainer | Return the mount node for Modal | (instance): HTMLElement | () => document.body |
|
||||
| mask | Whether show mask or not. | Boolean | true |
|
||||
| maskClosable | Whether to close the modal dialog when the mask (area outside the modal) is clicked | boolean | true |
|
||||
| maskStyle | Style for modal's mask element. | object | {} |
|
||||
| okText | Text of the OK button | string | `OK` |
|
||||
| okType | Button `type` of the OK button | string | `primary` |
|
||||
| style | Style of floating layer, typically used at least for adjusting the position. | object | - |
|
||||
| title | The modal dialog's title | string\|ReactNode | - |
|
||||
| visible | Whether the modal dialog is visible or not | boolean | false |
|
||||
| width | Width of the modal dialog | string\|number | 520 |
|
||||
| wrapClassName | The class name of the container of the modal dialog | string | - |
|
||||
| zIndex | The `z-index` of the Modal | Number | 1000 |
|
||||
| onCancel | Specify a function that will be called when a user clicks mask, close button on top right or Cancel button | function(e) | - |
|
||||
| onOk | Specify a function that will be called when a user clicks the OK button | function(e) | - |
|
||||
|
||||
#### Destroy on close
|
||||
|
||||
@ -57,19 +57,19 @@ There are five ways to display the information based on the content's nature:
|
||||
The items listed above are all functions, expecting a settings object as parameter.
|
||||
The properties of the object are follows:
|
||||
|
||||
| Property | Description | Type | Default |
|
||||
|------------|----------------|------------------|---------------|
|
||||
| title | Title | string\|ReactNode | - |
|
||||
| content | Content | string\|ReactNode | - |
|
||||
| onOk | Specify a function that will be called when the user clicks the OK button. The parameter of this function is a function whose execution should include closing the dialog. You can also just return a promise and when the promise is resolved, the modal dialog will also be closed | function | - |
|
||||
| onCancel | Specify a function that will be called when the user clicks the Cancel button. The parameter of this function is a function whose execution should include closing the dialog. You can also just return a promise and when the promise is resolved, the modal dialog will also be closed | function | - |
|
||||
| width | Width of the modal dialog | string\|number | 416 |
|
||||
| iconType | Icon `type` of the Icon component | string | `question-circle` |
|
||||
| okText | Text of the OK button | string | `OK` |
|
||||
| okType | Button `type` of the OK button | string | `primary` |
|
||||
| cancelText | Text of the Cancel button | string | `Cancel` |
|
||||
| maskClosable | Whether to close the modal dialog when the mask (area outside the modal) is clicked | Boolean | `false` |
|
||||
| Property | Description | Type | Default |
|
||||
| -------- | ----------- | ---- | ------- |
|
||||
| cancelText | Text of the Cancel button | string | `Cancel` |
|
||||
| content | Content | string\|ReactNode | - |
|
||||
| iconType | Icon `type` of the Icon component | string | `question-circle` |
|
||||
| maskClosable | Whether to close the modal dialog when the mask (area outside the modal) is clicked | Boolean | `false` |
|
||||
| okText | Text of the OK button | string | `OK` |
|
||||
| okType | Button `type` of the OK button | string | `primary` |
|
||||
| title | Title | string\|ReactNode | - |
|
||||
| width | Width of the modal dialog | string\|number | 416 |
|
||||
| zIndex | The `z-index` of the Modal | Number | 1000 |
|
||||
| onCancel | Specify a function that will be called when the user clicks the Cancel button. The parameter of this function is a function whose execution should include closing the dialog. You can also just return a promise and when the promise is resolved, the modal dialog will also be closed | function | - |
|
||||
| onOk | Specify a function that will be called when the user clicks the OK button. The parameter of this function is a function whose execution should include closing the dialog. You can also just return a promise and when the promise is resolved, the modal dialog will also be closed | function | - |
|
||||
|
||||
All the `Modal.method`s will return a reference, and then we can close the modal dialog by the reference.
|
||||
|
||||
@ -82,4 +82,4 @@ ref.destroy();
|
||||
.code-box-demo .ant-btn {
|
||||
margin-right: 8px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -15,28 +15,28 @@ title: Modal
|
||||
|
||||
## API
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 |
|
||||
|------------|----------------|------------------|--------------|
|
||||
| visible | 对话框是否可见 | boolean | 无 |
|
||||
| confirmLoading | 确定按钮 loading | boolean | 无 |
|
||||
| title | 标题 | string\|ReactNode | 无 |
|
||||
| closable | 是否显示右上角的关闭按钮 | boolean | true |
|
||||
| onOk | 点击确定回调 | function(e) | 无 |
|
||||
| onCancel | 点击遮罩层或右上角叉或取消按钮的回调 | function(e) | 无 |
|
||||
| width | 宽度 | string\|number | 520 |
|
||||
| footer | 底部内容,当不需要默认底部按钮时,可以设为 `footer={null}` | string\|ReactNode | 确定取消按钮 |
|
||||
| okText | 确认按钮文字 | string | 确定 |
|
||||
| okType | 确认按钮类型 | string | primary |
|
||||
| cancelText | 取消按钮文字 | string | 取消 |
|
||||
| maskClosable | 点击蒙层是否允许关闭 | boolean | true |
|
||||
| style | 可用于设置浮层的样式,调整浮层位置等 | object | - |
|
||||
| wrapClassName | 对话框外层容器的类名 | string | - |
|
||||
| bodyStyle | Modal body 样式 | object | {} |
|
||||
| maskStyle | 遮罩样式 | object | {} |
|
||||
| mask | 是否展示遮罩 | Boolean | true |
|
||||
| 参数 | 说明 | 类型 | 默认值 |
|
||||
| --- | --- | --- | --- |
|
||||
| afterClose | Modal 完全关闭后的回调 | function | 无 |
|
||||
| bodyStyle | Modal body 样式 | object | {} |
|
||||
| cancelText | 取消按钮文字 | string | 取消 |
|
||||
| closable | 是否显示右上角的关闭按钮 | boolean | true |
|
||||
| confirmLoading | 确定按钮 loading | boolean | 无 |
|
||||
| footer | 底部内容,当不需要默认底部按钮时,可以设为 `footer={null}` | string\|ReactNode | 确定取消按钮 |
|
||||
| getContainer | 指定 Modal 挂载的 HTML 节点 | (instance): HTMLElement | () => document.body |
|
||||
| mask | 是否展示遮罩 | Boolean | true |
|
||||
| maskClosable | 点击蒙层是否允许关闭 | boolean | true |
|
||||
| maskStyle | 遮罩样式 | object | {} |
|
||||
| okText | 确认按钮文字 | string | 确定 |
|
||||
| okType | 确认按钮类型 | string | primary |
|
||||
| style | 可用于设置浮层的样式,调整浮层位置等 | object | - |
|
||||
| title | 标题 | string\|ReactNode | 无 |
|
||||
| visible | 对话框是否可见 | boolean | 无 |
|
||||
| width | 宽度 | string\|number | 520 |
|
||||
| wrapClassName | 对话框外层容器的类名 | string | - |
|
||||
| zIndex | 设置 Modal 的 `z-index` | Number | 1000 |
|
||||
| onCancel | 点击遮罩层或右上角叉或取消按钮的回调 | function(e) | 无 |
|
||||
| onOk | 点击确定回调 | function(e) | 无 |
|
||||
|
||||
#### 清空旧数据
|
||||
|
||||
@ -55,19 +55,19 @@ title: Modal
|
||||
|
||||
以上均为一个函数,参数为 object,具体属性如下:
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 |
|
||||
|------------|----------------|------------------|--------------|
|
||||
| title | 标题 | string\|ReactNode | 无 |
|
||||
| content | 内容 | string\|ReactNode | 无 |
|
||||
| onOk | 点击确定回调,参数为关闭函数,返回 promise 时 resolve 后自动关闭 | function | 无 |
|
||||
| onCancel | 取消回调,参数为关闭函数,返回 promise 时 resolve 后自动关闭 | function | 无 |
|
||||
| width | 宽度 | string\|number | 416 |
|
||||
| iconType | 图标 Icon 类型 | string | question-circle |
|
||||
| okText | 确认按钮文字 | string | 确定 |
|
||||
| okType | 确认按钮类型 | string | primary |
|
||||
| cancelText | 取消按钮文字 | string | 取消 |
|
||||
| maskClosable | 点击蒙层是否允许关闭 | Boolean | `false` |
|
||||
| 参数 | 说明 | 类型 | 默认值 |
|
||||
| --- | --- | --- | --- |
|
||||
| cancelText | 取消按钮文字 | string | 取消 |
|
||||
| content | 内容 | string\|ReactNode | 无 |
|
||||
| iconType | 图标 Icon 类型 | string | question-circle |
|
||||
| maskClosable | 点击蒙层是否允许关闭 | Boolean | `false` |
|
||||
| okText | 确认按钮文字 | string | 确定 |
|
||||
| okType | 确认按钮类型 | string | primary |
|
||||
| title | 标题 | string\|ReactNode | 无 |
|
||||
| width | 宽度 | string\|number | 416 |
|
||||
| zIndex | 设置 Modal 的 `z-index` | Number | 1000 |
|
||||
| onCancel | 取消回调,参数为关闭函数,返回 promise 时 resolve 后自动关闭 | function | 无 |
|
||||
| onOk | 点击确定回调,参数为关闭函数,返回 promise 时 resolve 后自动关闭 | function | 无 |
|
||||
|
||||
以上函数调用后,会返回一个引用,可以通过该引用关闭弹窗。
|
||||
|
||||
@ -80,4 +80,4 @@ ref.destroy();
|
||||
.code-box-demo .ant-btn {
|
||||
margin-right: 8px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue
Block a user