0👍
try this:
Vue.mixin(
{
data: function ()
{
return {
notificationStore: NotificationStore
};
},
methods:
{
notify(notification)
{
this.notificationStore.notify(notification);
}
}
});
instead:
Vue.mixin(
{
data: function ()
{
var data =
{
notificationStore: NotificationStore
};
return data;
},
methods:
{
notify(notification)
{
this.notificationStore.notify(notification);
}
}
});
I tried to reply your code working and if dont use return {}
without break line anfter return, then doesn’t work.
Source:stackexchange.com