docs(modal): update type definition (#5478)
							parent
							
								
									23f56561e9
								
							
						
					
					
						commit
						d645ad6eda
					
				|  | @ -19,7 +19,7 @@ When requiring users to interact with the application, but without jumping to a | |||
| | bodyStyle | Body style for modal body element. Such as height, padding etc. | object | {} |  | | ||||
| | cancelButtonProps | The cancel button props | [ButtonProps](/components/button/#API) | - |  | | ||||
| | cancelText | Text of the Cancel button | string\|slot | `Cancel` |  | | ||||
| | centered | Centered Modal | Boolean | `false` |  | | ||||
| | centered | Centered Modal | boolean | `false` |  | | ||||
| | closable | Whether a close (x) button is visible on top right of the modal dialog or not | boolean | true |  | | ||||
| | closeIcon | custom close icon | VNode \| slot | - |  | | ||||
| | 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 | |||
| | footer | Footer content, set as `:footer="null"` when you don't need default buttons | string\|slot | OK and Cancel buttons |  | | ||||
| | forceRender | Force render Modal | boolean | false |  | | ||||
| | getContainer | Return the mount node for Modal | (instance): HTMLElement | () => document.body |  | | ||||
| | mask | Whether show mask or not. | Boolean | true |  | | ||||
| | 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 | {} |  | | ||||
| | 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 | |||
| | 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 |  | | ||||
| | zIndex | The `z-index` of the Modal | number | 1000 |  | | ||||
| 
 | ||||
| ### events | ||||
| 
 | ||||
|  | @ -67,24 +67,24 @@ The items listed above are all functions, expecting a settings object as paramet | |||
| | Property | Description | Type | Default | Version | | ||||
| | --- | --- | --- | --- | --- | | ||||
| | appContext | The context of the pop-up window is generally used to obtain content such as global registered components, vuex, etc. | - | - |  | | ||||
| | autoFocusButton | Specify which button to autofocus | null\|string: `ok` `cancel` | `ok` |  | | ||||
| | autoFocusButton | Specify which button to autofocus | `null` \| `ok` \| `cancel` | `ok` |  | | ||||
| | cancelButtonProps | The cancel button props | [ButtonProps](/components/button) | - |  | | ||||
| | cancelText | Text of the Cancel button | string | `Cancel` |  | | ||||
| | centered | Centered Modal | Boolean | `false` |  | | ||||
| | centered | Centered Modal | boolean | `false` |  | | ||||
| | class | class of container | string | - |  | | ||||
| | closable | Whether a close (x) button is visible on top right of the modal dialog or not | boolean | `false` |  | | ||||
| | content | Content | string\|vNode \|function(h) | - |  | | ||||
| | content | Content | string\|VNode \|function(h) | - |  | | ||||
| | icon | custom icon (`Added in 1.14.0`) | VNode \|()=>VNode | - |  | | ||||
| | keyboard | Whether support press esc to close | Boolean | true |  | | ||||
| | 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 | `false` |  | | ||||
| | keyboard | Whether support press esc to close | boolean | true |  | | ||||
| | 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 | `false` |  | | ||||
| | okButtonProps | The ok button props | [ButtonProps](/components/button) | - |  | | ||||
| | okText | Text of the OK button | string | `OK` |  | | ||||
| | okType | Button `type` of the OK button | string | `primary` |  | | ||||
| | title | Title | string\|vNode \|function(h) | - |  | | ||||
| | title | Title | string\|VNode \|function(h) | - |  | | ||||
| | width | Width of the modal dialog | string\|number | 416 |  | | ||||
| | wrapClassName | The class name of the container of the modal dialog | string | - | 3.0 | | ||||
| | zIndex | The `z-index` of the Modal | Number | 1000 |  | | ||||
| | 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 | - |  | | ||||
| 
 | ||||
|  |  | |||
|  | @ -22,7 +22,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/3StSdUlSH/Modal.svg | |||
| | bodyStyle | Modal body 样式 | object | {} |  | | ||||
| | cancelButtonProps | cancel 按钮 props | [ButtonProps](/components/button/#API) | - |  | | ||||
| | cancelText | 取消按钮文字 | string\| slot | 取消 |  | | ||||
| | centered | 垂直居中展示 Modal | Boolean | `false` |  | | ||||
| | centered | 垂直居中展示 Modal | boolean | `false` |  | | ||||
| | closable | 是否显示右上角的关闭按钮 | boolean | true |  | | ||||
| | closeIcon | 自定义关闭图标 | VNode \| slot | - |  | | ||||
| | confirmLoading | 确定按钮 loading | boolean | 无 |  | | ||||
|  | @ -33,7 +33,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/3StSdUlSH/Modal.svg | |||
| | forceRender | 强制渲染 Modal | boolean | false |  | | ||||
| | getContainer | 指定 Modal 挂载的 HTML 节点 | (instance): HTMLElement | () => document.body |  | | ||||
| | keyboard | 是否支持键盘 esc 关闭 | boolean | true |  | | ||||
| | mask | 是否展示遮罩 | Boolean | true |  | | ||||
| | mask | 是否展示遮罩 | boolean | true |  | | ||||
| | maskClosable | 点击蒙层是否允许关闭 | boolean | true |  | | ||||
| | maskStyle | 遮罩样式 | object | {} |  | | ||||
| | okButtonProps | ok 按钮 props | [ButtonProps](/components/button/#API) | - |  | | ||||
|  | @ -43,7 +43,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/3StSdUlSH/Modal.svg | |||
| | visible(v-model) | 对话框是否可见 | boolean | 无 |  | | ||||
| | width | 宽度 | string\|number | 520 |  | | ||||
| | wrapClassName | 对话框外层容器的类名 | string | - |  | | ||||
| | zIndex | 设置 Modal 的 `z-index` | Number | 1000 |  | | ||||
| | zIndex | 设置 Modal 的 `z-index` | number | 1000 |  | | ||||
| 
 | ||||
| ### 事件 | ||||
| 
 | ||||
|  | @ -71,24 +71,24 @@ cover: https://gw.alipayobjects.com/zos/alicdn/3StSdUlSH/Modal.svg | |||
| | 参数 | 说明 | 类型 | 默认值 | 版本 | | ||||
| | --- | --- | --- | --- | --- | | ||||
| | appContext | 弹窗的上下文,一般用于获取全局注册组件、vuex 等内容 | - | - |  | | ||||
| | autoFocusButton | 指定自动获得焦点的按钮 | null\|string: `ok` `cancel` | `ok` |  | | ||||
| | autoFocusButton | 指定自动获得焦点的按钮 | `null` \| `ok` \| `cancel` | `ok` |  | | ||||
| | cancelButtonProps | cancel 按钮 props | [ButtonProps](/components/button) | - |  | | ||||
| | cancelText | 取消按钮文字 | string | 取消 |  | | ||||
| | centered | 垂直居中展示 Modal | Boolean | `false` |  | | ||||
| | centered | 垂直居中展示 Modal | boolean | `false` |  | | ||||
| | class | 容器类名 | string | - |  | | ||||
| | closable | 是否显示右上角的关闭按钮 | boolean | `false` |  | | ||||
| | content | 内容 | string \|vNode \|function(h) | 无 |  | | ||||
| | content | 内容 | string \|VNode \|function(h) | 无 |  | | ||||
| | icon | 自定义图标(1.14.0 新增) | VNode \| ()=>VNode | - |  | | ||||
| | keyboard | 是否支持键盘 esc 关闭 | boolean | true |  | | ||||
| | mask | 是否展示遮罩 | Boolean | true |  | | ||||
| | maskClosable | 点击蒙层是否允许关闭 | Boolean | `false` |  | | ||||
| | mask | 是否展示遮罩 | boolean | true |  | | ||||
| | maskClosable | 点击蒙层是否允许关闭 | boolean | `false` |  | | ||||
| | okButtonProps | ok 按钮 props | [ButtonProps](/components/button) | - |  | | ||||
| | okText | 确认按钮文字 | string | 确定 |  | | ||||
| | okType | 确认按钮类型 | string | primary |  | | ||||
| | title | 标题 | string\|vNode \|function(h) | 无 |  | | ||||
| | title | 标题 | string\|VNode \|function(h) | 无 |  | | ||||
| | width | 宽度 | string\|number | 416 |  | | ||||
| | wrapClassName | 对话框外层容器的类名 | string | - | 3.0 | | ||||
| | zIndex | 设置 Modal 的 `z-index` | Number | 1000 |  | | ||||
| | zIndex | 设置 Modal 的 `z-index` | number | 1000 |  | | ||||
| | onCancel | 取消回调,参数为关闭函数,返回 promise 时 resolve 后自动关闭 | function | 无 |  | | ||||
| | onOk | 点击确定回调,参数为关闭函数,返回 promise 时 resolve 后自动关闭 | function | 无 |  | | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 bqy_fe
						bqy_fe