0.1.0 • Published 5 years ago

vuetify-confirm-dialog v0.1.0

Weekly downloads
6
License
GPL-3.0-only
Repository
-
Last release
5 years ago

vuetify-confirm-dialog

vuetify-confirm-dialog is a Vuetify UI component for showing confirm dialogs. Uses ES6 Promises.

Installation

Install the package from npm:

npm install --save vuetify-confirm-dialog

Add the package to your app entry point:

import Vue from 'vue'
import VConfirmDialog from 'vuetify-confirm-dialog'

Vue.use(VConfirmDialog);

Usage

Once the plugin has been installed, you may call the $confirm method on the root instance.

<script>
export default {
	methods: {
		async onSave() {
			try {
				await this.$confirm();
				// when dialog is confirmed...
			}
			catch (err) {
				// when dialog is rejected...
			}
		}
	},
};
</script>

$confirm Method Syntax

this.$confirm({ 
	message = '',
	title = 'Confirmation', 
	okButton = 'Confirm', 
	cancelButton = 'Cancel',
});