Closed Vidhyanandcs closed 3 years ago
I'm using Vue CLI so it's probably a bit different, but maybe this will help
// boot.js
import Notifications from 'vue-notification'
Vue.use(Notifications)
// Vuex action
.catch((error) => {
this._vm.$notify({
type: 'error',
title: 'Error Saving New Mapping',
text: error.response.data.error
})
reject(error.response.data.error)
})
Stale issue message
I was looking for a notification that can be invoked from vuex store I have an action which will be triggered when an error happens. i would like to invoke notifications in this action.
Currently using bootstrap vue
import { BToast } from 'bootstrap-vue' let bootStrapToaster = new BToast(); bootStrapToaster.$bvToast.toast(error.response.data.message, { variant: 'danger', headerClass: ['red-toast'], id: 'red-toast' })