this$confirm
This code is a method call in Vue.js framework. The $confirm() method is used to display a confirm dialog box with a message and two buttons - OK and Cancel. It returns a Promise that resolves to true if the user clicks OK and false if the user clicks Cancel or closes the dialog box.
Here's an example usage:
this.$confirm('Are you sure you want to delete this item?', 'Delete Item', {
confirmButtonText: 'Yes',
cancelButtonText: 'No',
type: 'warning'
}).then(() => {
// user clicked OK
}).catch(() => {
// user clicked Cancel or closed the dialog box
});
In this example, the confirm dialog box will display a warning icon and the message "Are you sure you want to delete this item?" with two buttons labeled "Yes" and "No". If the user clicks "Yes", the then() callback will be executed, and if the user clicks "No" or closes the dialog box, the catch() callback will be executed.
原文地址: https://www.cveoy.top/t/topic/bpmU 著作权归作者所有。请勿转载和采集!