Skip to content

Commit d645ad6

Browse files
authored
docs(modal): update type definition (#5478)
1 parent 23f5656 commit d645ad6

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

components/modal/index.en-US.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ When requiring users to interact with the application, but without jumping to a
1919
| bodyStyle | Body style for modal body element. Such as height, padding etc. | object | {} | |
2020
| cancelButtonProps | The cancel button props | [ButtonProps](/components/button/#API) | - | |
2121
| cancelText | Text of the Cancel button | string\|slot | `Cancel` | |
22-
| centered | Centered Modal | Boolean | `false` | |
22+
| centered | Centered Modal | boolean | `false` | |
2323
| closable | Whether a close (x) button is visible on top right of the modal dialog or not | boolean | true | |
2424
| closeIcon | custom close icon | VNode \| slot | - | |
2525
| confirmLoading | Whether to apply loading visual effect for OK button or not | boolean | false | |
@@ -29,7 +29,7 @@ When requiring users to interact with the application, but without jumping to a
2929
| footer | Footer content, set as `:footer="null"` when you don't need default buttons | string\|slot | OK and Cancel buttons | |
3030
| forceRender | Force render Modal | boolean | false | |
3131
| getContainer | Return the mount node for Modal | (instance): HTMLElement | () => document.body | |
32-
| mask | Whether show mask or not. | Boolean | true | |
32+
| mask | Whether show mask or not. | boolean | true | |
3333
| maskClosable | Whether to close the modal dialog when the mask (area outside the modal) is clicked | boolean | true | |
3434
| maskStyle | Style for modal's mask element. | object | {} | |
3535
| okButtonProps | The ok button props | [ButtonProps](/components/button/#API) | - | |
@@ -39,7 +39,7 @@ When requiring users to interact with the application, but without jumping to a
3939
| visible | Whether the modal dialog is visible or not | boolean | false | |
4040
| width | Width of the modal dialog | string\|number | 520 | |
4141
| wrapClassName | The class name of the container of the modal dialog | string | - | |
42-
| zIndex | The `z-index` of the Modal | Number | 1000 | |
42+
| zIndex | The `z-index` of the Modal | number | 1000 | |
4343

4444
### events
4545

@@ -67,24 +67,24 @@ The items listed above are all functions, expecting a settings object as paramet
6767
| Property | Description | Type | Default | Version |
6868
| --- | --- | --- | --- | --- |
6969
| appContext | The context of the pop-up window is generally used to obtain content such as global registered components, vuex, etc. | - | - | |
70-
| autoFocusButton | Specify which button to autofocus | null\|string: `ok` `cancel` | `ok` | |
70+
| autoFocusButton | Specify which button to autofocus | `null` \| `ok` \| `cancel` | `ok` | |
7171
| cancelButtonProps | The cancel button props | [ButtonProps](/components/button) | - | |
7272
| cancelText | Text of the Cancel button | string | `Cancel` | |
73-
| centered | Centered Modal | Boolean | `false` | |
73+
| centered | Centered Modal | boolean | `false` | |
7474
| class | class of container | string | - | |
7575
| closable | Whether a close (x) button is visible on top right of the modal dialog or not | boolean | `false` | |
76-
| content | Content | string\|vNode \|function(h) | - | |
76+
| content | Content | string\|VNode \|function(h) | - | |
7777
| icon | custom icon (`Added in 1.14.0`) | VNode \|()=>VNode | - | |
78-
| keyboard | Whether support press esc to close | Boolean | true | |
79-
| mask | Whether show mask or not. | Boolean | true | |
80-
| maskClosable | Whether to close the modal dialog when the mask (area outside the modal) is clicked | Boolean | `false` | |
78+
| keyboard | Whether support press esc to close | boolean | true | |
79+
| mask | Whether show mask or not. | boolean | true | |
80+
| maskClosable | Whether to close the modal dialog when the mask (area outside the modal) is clicked | boolean | `false` | |
8181
| okButtonProps | The ok button props | [ButtonProps](/components/button) | - | |
8282
| okText | Text of the OK button | string | `OK` | |
8383
| okType | Button `type` of the OK button | string | `primary` | |
84-
| title | Title | string\|vNode \|function(h) | - | |
84+
| title | Title | string\|VNode \|function(h) | - | |
8585
| width | Width of the modal dialog | string\|number | 416 | |
8686
| wrapClassName | The class name of the container of the modal dialog | string | - | 3.0 |
87-
| zIndex | The `z-index` of the Modal | Number | 1000 | |
87+
| zIndex | The `z-index` of the Modal | number | 1000 | |
8888
| 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 | - | |
8989
| 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 | - | |
9090

components/modal/index.zh-CN.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/3StSdUlSH/Modal.svg
2222
| bodyStyle | Modal body 样式 | object | {} | |
2323
| cancelButtonProps | cancel 按钮 props | [ButtonProps](/components/button/#API) | - | |
2424
| cancelText | 取消按钮文字 | string\| slot | 取消 | |
25-
| centered | 垂直居中展示 Modal | Boolean | `false` | |
25+
| centered | 垂直居中展示 Modal | boolean | `false` | |
2626
| closable | 是否显示右上角的关闭按钮 | boolean | true | |
2727
| closeIcon | 自定义关闭图标 | VNode \| slot | - | |
2828
| confirmLoading | 确定按钮 loading | boolean || |
@@ -33,7 +33,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/3StSdUlSH/Modal.svg
3333
| forceRender | 强制渲染 Modal | boolean | false | |
3434
| getContainer | 指定 Modal 挂载的 HTML 节点 | (instance): HTMLElement | () => document.body | |
3535
| keyboard | 是否支持键盘 esc 关闭 | boolean | true | |
36-
| mask | 是否展示遮罩 | Boolean | true | |
36+
| mask | 是否展示遮罩 | boolean | true | |
3737
| maskClosable | 点击蒙层是否允许关闭 | boolean | true | |
3838
| maskStyle | 遮罩样式 | object | {} | |
3939
| okButtonProps | ok 按钮 props | [ButtonProps](/components/button/#API) | - | |
@@ -43,7 +43,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/3StSdUlSH/Modal.svg
4343
| visible(v-model) | 对话框是否可见 | boolean || |
4444
| width | 宽度 | string\|number | 520 | |
4545
| wrapClassName | 对话框外层容器的类名 | string | - | |
46-
| zIndex | 设置 Modal 的 `z-index` | Number | 1000 | |
46+
| zIndex | 设置 Modal 的 `z-index` | number | 1000 | |
4747

4848
### 事件
4949

@@ -71,24 +71,24 @@ cover: https://gw.alipayobjects.com/zos/alicdn/3StSdUlSH/Modal.svg
7171
| 参数 | 说明 | 类型 | 默认值 | 版本 |
7272
| --- | --- | --- | --- | --- |
7373
| appContext | 弹窗的上下文,一般用于获取全局注册组件、vuex 等内容 | - | - | |
74-
| autoFocusButton | 指定自动获得焦点的按钮 | null\|string: `ok` `cancel` | `ok` | |
74+
| autoFocusButton | 指定自动获得焦点的按钮 | `null` \| `ok` \| `cancel` | `ok` | |
7575
| cancelButtonProps | cancel 按钮 props | [ButtonProps](/components/button) | - | |
7676
| cancelText | 取消按钮文字 | string | 取消 | |
77-
| centered | 垂直居中展示 Modal | Boolean | `false` | |
77+
| centered | 垂直居中展示 Modal | boolean | `false` | |
7878
| class | 容器类名 | string | - | |
7979
| closable | 是否显示右上角的关闭按钮 | boolean | `false` | |
80-
| content | 内容 | string \|vNode \|function(h) || |
80+
| content | 内容 | string \|VNode \|function(h) || |
8181
| icon | 自定义图标(1.14.0 新增) | VNode \| ()=>VNode | - | |
8282
| keyboard | 是否支持键盘 esc 关闭 | boolean | true | |
83-
| mask | 是否展示遮罩 | Boolean | true | |
84-
| maskClosable | 点击蒙层是否允许关闭 | Boolean | `false` | |
83+
| mask | 是否展示遮罩 | boolean | true | |
84+
| maskClosable | 点击蒙层是否允许关闭 | boolean | `false` | |
8585
| okButtonProps | ok 按钮 props | [ButtonProps](/components/button) | - | |
8686
| okText | 确认按钮文字 | string | 确定 | |
8787
| okType | 确认按钮类型 | string | primary | |
88-
| title | 标题 | string\|vNode \|function(h) || |
88+
| title | 标题 | string\|VNode \|function(h) || |
8989
| width | 宽度 | string\|number | 416 | |
9090
| wrapClassName | 对话框外层容器的类名 | string | - | 3.0 |
91-
| zIndex | 设置 Modal 的 `z-index` | Number | 1000 | |
91+
| zIndex | 设置 Modal 的 `z-index` | number | 1000 | |
9292
| onCancel | 取消回调,参数为关闭函数,返回 promise 时 resolve 后自动关闭 | function || |
9393
| onOk | 点击确定回调,参数为关闭函数,返回 promise 时 resolve 后自动关闭 | function || |
9494

0 commit comments

Comments
 (0)