This commit is contained in:
les 2020-10-07 13:03:01 +02:00
parent 663eff8474
commit 5f86239f2c

View file

@ -6,7 +6,7 @@
:max-width='options.width' :max-width='options.width'
:style="{ zIndex: options.zIndex, position: 'absolute' }" :style="{ zIndex: options.zIndex, position: 'absolute' }"
@keydown.esc='cancel') @keydown.esc='cancel')
v-card v-card(color='secondary')
v-card-title {{ title }} v-card-title {{ title }}
v-card-text(v-show='!!message') {{ message }} v-card-text(v-show='!!message') {{ message }}
v-card-actions v-card-actions
@ -61,9 +61,9 @@ export default {
this.$root.$confirm = this.open this.$root.$confirm = this.open
}, },
methods: { methods: {
open (message, options) { open (message, options = {}) {
this.dialog = true this.dialog = true
this.title = option.title || 'Confirm' this.title = options.title || 'Confirm'
this.message = this.$t(message, options) this.message = this.$t(message, options)
this.options = Object.assign(this.options, options) this.options = Object.assign(this.options, options)
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {