fix: update dialog related events

This commit is contained in:
Justineo
2022-02-01 15:33:20 +08:00
parent 99b00ff3ce
commit 9d6277d215
11 changed files with 22 additions and 13 deletions

View File

@@ -63,6 +63,7 @@ The contextual type of the alert box.
| Name | Description |
| -- | -- |
| ``ok`` | Triggered when the “OK” button is clicked. |
| ``afteropen`` | Triggered after the box overlay is opened. The box content won't be rendered until after the overlay is opened, so if there is logic that depends on content rendering, please execute it after this event is triggered. |
| ``afterclose`` | Triggered after the box overlay is closed. If leaving transition is provided by the theme, the event will be triggered after the transition completes. |
### Icons

View File

@@ -44,4 +44,5 @@ Whether the confirm box is displayed.
| -- | -- |
| `ok` | Triggered when the “OK” button is clicked. |
| `cancel` | Triggered when the “Cancel” button is clicked. |
| ``afteropen`` | Triggered after the box overlay is opened. The box content won't be rendered until after the overlay is opened, so if there is logic that depends on content rendering, please execute it after this event is triggered. |
| `afterclose` | Triggered after the box overlay is closed. If leaving transition is provided by the theme, the event will be triggered after the transition completes. |

View File

@@ -109,9 +109,9 @@ methods: {
| Name | Description |
| -- | -- |
| `default` | The content of the dialog. |
| `title` | The title of the dialog. Will ignore the [`title`](#props-title) prop if this slot is specified. |
| `foot` | [^slot-foot] |
| ``default`` | The content of the dialog. |
| ``title`` | The title of the dialog. Will ignore the [`title`](#props-title) prop if this slot is specified. |
| ``foot`` | [^slot-foot] |
^^^slot-foot
The foot of the dialog. Displays “OK” and “Cancel” buttons by default.
@@ -128,10 +128,11 @@ The foot of the dialog. Displays “OK” and “Cancel” buttons by default.
| Name | Description |
| -- | -- |
| `ok` | Triggered after the “OK” button is clicked or the dialog is closed with the slot scope function call `close('ok')`. |
| `cancel` | Triggered after the “Cancel” button or the close button is clicked, or <kbd>esc</kbd> is pressed, or the dialog is closed with the slot scope function call `close('cancel')`. |
| ``ok`` | Triggered after the “OK” button is clicked or the dialog is closed with the slot scope function call `close('ok')`. |
| ``cancel`` | Triggered after the “Cancel” button or the close button is clicked, or <kbd>esc</kbd> is pressed, or the dialog is closed with the slot scope function call `close('cancel')`. |
| <var>&lt;value&gt;</var> | Triggered when the dialog is closed with the slot scope function call `close(value)`. |
| `afterclose` | Triggered after the dialog is closed. If leave transition is provided by theme, then `afterclose` will be triggered when the transition finishes. |
| ``afteropen`` | Triggered after the dialog is opened. The dialog content won't be rendered until after the dialog is opened, so if there is logic that depends on content rendering, please execute it after this event is triggered. |
| ``afterclose`` | Triggered after the dialog is closed. If leave transition is provided by theme, then `afterclose` will be triggered when the transition finishes. |
### Icons

View File

@@ -96,7 +96,7 @@ The style expression applied to the root element of the overlay. Supports all va
| Name | Description |
| -- | -- |
| ``locate`` | Triggered when the overlay updated its location. |
| ``afteropen`` | Triggered after the overlay is opened. If leave transition is provided by theme, then `afteropen` will be triggered when the transition finishes. |
| ``afteropen`` | Triggered after the overlay is opened. The overlay content won't be rendered until after the overlay is opened, so if there is logic that depends on content rendering, please execute it after this event is triggered. |
| ``afterclose`` | Triggered after the overlay is closed. If leave transition is provided by theme, then `afterclose` will be triggered when the transition finishes. |
### Configs

View File

@@ -53,6 +53,7 @@ The value of the prompt input.
| ``input`` | [^event-input] |
| ``ok`` | Triggered when the “OK” button is clicked. |
| ``cancel`` | Triggered when the “Cancel” button is clicked. |
| ``afteropen`` | Triggered after the box overlay is opened. The box content won't be rendered until after the overlay is opened, so if there is logic that depends on content rendering, please execute it after this event is triggered. |
| ``afterclose`` | Triggered after the box overlay is closed. If leaving transition is provided by the theme, the event will be triggered after the transition completes. |
^^^event-input