Hi, everyone,
I am trying to call a $toast message from my main.js, the bootstrap script for Vue, a bit of code after Vue.use(Buefy), inside axios interceptor.
I tried this.$toast.open, Vue.$toast.open and Buefy.$toast.open but none worked, the $toast is undefined on them.
Someone have an idea how to do this?
Thanks
I do something like this.
axios.delete(URI)
.then(() => {
this.$snackbar.open(this.texts.delete_success);
})
I don't think you'll be able to use it on main.js because it's not a vue instance yet, but you can do this:
import { Toast } from 'buefy'
Toast.open([...])
@rafaelpimpa, it worked! Thank you.
Most helpful comment
I don't think you'll be able to use it on main.js because it's not a vue instance yet, but you can do this: