mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-04 04:08:34 +08:00
docs(components): message-box (#14179)
update message-box options closed #14178
This commit is contained in:
parent
86beacee50
commit
ce2315d734
@ -159,16 +159,16 @@ The corresponding methods are: `ElMessageBox`, `ElMessageBox.alert`, `ElMessageB
|
||||
### Options
|
||||
|
||||
| Name | Description | Type | Default |
|
||||
|------------------------------| ---------------------------------------------------------------------------------------------------------------------------------------- |------------------------------------------------------------------------------------| ------------------------------------------------ |
|
||||
| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ------------------------------------------------ |
|
||||
| autofocus | auto focus when open MessageBox | ^[boolean] | true |
|
||||
| title | title of the MessageBox | ^[string] | '' |
|
||||
| message | content of the MessageBox | ^[string] / ^[VNode] / ^[Function]`() => VNode` ^(2.2.17) | — |
|
||||
| dangerouslyUseHTMLString | whether `message` is treated as HTML string | ^[boolean] | false |
|
||||
| type | message type, used for icon display | ^[enum]`'success' \ | 'info' \| 'warning' \| 'error'` | '' |
|
||||
| type | message type, used for icon display | ^[enum]`'success' \| 'info' \| 'warning' \| 'error'` | '' |
|
||||
| icon | custom icon component, overrides `type` | ^[string] / ^[Component] | '' |
|
||||
| custom-class | custom class name for MessageBox | ^[string] | '' |
|
||||
| custom-style | custom inline style for MessageBox | ^[CSSProperties] | {} |
|
||||
| callback | MessageBox closing callback if you don't prefer Promise | ^[Function]`(value: string, action: Action) => any \ | (action: Action) => any` | null |
|
||||
| callback | MessageBox closing callback if you don't prefer Promise | ^[Function]`(value: string, action: Action) => any \| (action: Action) => any` | null |
|
||||
| showClose | whether to show close icon of MessageBox | ^[boolean] | true |
|
||||
| before-close | callback before MessageBox closes, and it will prevent MessageBox from closing | ^[Function]`(action: Action, instance: MessageBoxState, done: () => void) => void` | null |
|
||||
| distinguish-cancel-and-close | whether to distinguish canceling and closing the MessageBox | ^[boolean] | false |
|
||||
|
Loading…
Reference in New Issue
Block a user