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
Name
Type
Description
overlayClass
string | Object | Array<string>
The class name(s) to be added to the root node of the confirm dialog overlay.
ok
function(): Promise<void>
The function to be called when the "OK" button is clicked. If the Promise returned by this function is resolved, the dialog will be closed, otherwise it will not.
cancel
function(): Promise<void>
The function to be called when the "Cancel" button is clicked. If the Promise returned by this function is resolved, the dialog will be closed, otherwise it will not.
okLabel
string
The text content of the "OK" button.
cancelLabel
string
The text content of the "Cancel" button.
theme
string
The theme of the confirm box. Can be 'd20' / 'd22' / 'ai'.