This module extends vuetify confirm dialog.
Install the package from npm
npm install vuetify-confirm
import VuetifyConfirm from 'vuetify-confirm'
Vue.use(VuetifyConfirm)
Install with options or any of them:
import VuetifyConfirm from 'vuetify-confirm'
Vue.use(VuetifyConfirm, {
buttonTrueText: 'OK',
buttonFalseText: 'On, ho',
color: 'warning',
icon: 'warning',
title: 'Warning',
width: 300,
property: '$confirm'
})
property: '$confirm' will create property with this name in Vue prototype
this.$confirm('Do you really want to exit?').then(res => {
})
let res = await this.$confirm('Do you really want to exit?', {title: 'Warning'})
if (res) {
...
}
res will be true or false
You can format your message with arbitrary HTML - make sure you don't include any user-provided content here:
this.$confirm('Please do not do this.<br>Do you really want to exit?'}).then(res => {
})