confirm
Installation
import Vue from 'vue'
import { $alert } from 'veui'
Vue.use($alert)
API
After installation, this plugin provides a $confirm
method on all component instances, with the following signature: function(content, title, options): Promise<boolean>
.
The method returns a Promise
object that is resolved when the confirm dialog is successfully closed. If the user clicks the "OK" button, the resolved value is true
, otherwise it is false
.
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
content | string | The text content displayed in the confirm dialog. | ||||||||||||
title | string | The title of the confirm dialog. | ||||||||||||
options | Object |
| ||||||||||||
okLabel | string | The text content of the "OK" button. | ||||||||||||
cancelLabel | string | The text content of the "Cancel" button. |