Closed selfagency closed 4 years ago
Actually, I'm incorrect, the last example works, but only with the update method.
Hi I think it would be more correct. You simply call the function before you define it.
export
default {
data() {
return {
popup: null
}
},
methods: {
updatePopup() {
this.popup.update({
title: 'Reset Password',
[...]
})
}
},
mounted() {
this.popup = this.$swal({
title: 'Login',
[...]
})
}
}
I've added
'vue-sweetalert2/nuxt'
tomodules
innuxt.config.js
.If I call this in my app, it works just fine:
But if I call this:
I get:
None of the Sweetalert2 methods work. And if I try something like this:
I get:
Is this a bug or am I doing something wrong?