Closed frangte closed 4 years ago
I'm running into this issue as well.
I had this problem, I figured that the problem was because it was a global mixin, and chances are that every single component will have the notifications
option which is probably not what I wanted.
instead, I did this:
in mixins/notifications.js
:
import VueNotifications from 'vue-notifications'
export default {
notifications: {
showError: {
title: 'Oops!',
message:
"Something's wrong with, please check your internet and try again.",
type: VueNotifications.types.error
},
showSuccess: {
type: VueNotifications.types.success,
title: 'Success!',
message: 'Success!'
}
}
}
and then import only the mixin in any component I might need it.
Hi there,
I trying use
vue-notifications
as a mixin in nuxt project, below is example:plugins/vue-notifications.js
plugins/mixins.js
With this mixin, in every component I can use vue-notification via
this.notifyError({ message: 'Some thing' })
, but I got much of warning.How fix this warning, or my config is wrong?
thanks