vue-flash-message icon indicating copy to clipboard operation
vue-flash-message copied to clipboard

Vuex usage and passing global message options

Open toudidel opened this issue 6 years ago • 1 comments

When I call function flash() from Vuex it works but it doesn't apply global options like

Vue.use(VueFlashMessage, {
  messageOptions: {
    timeout: 1000,
  }
});

Calling it from Vuex does also support passing global options?

toudidel avatar Jan 04 '19 17:01 toudidel

~~Yep, same here. The options unfortunately only appear to be respected calling this.flash() from a Vue component, not a Vuex store.~~

EDIT: ignore that. You can only call this.flash() from Vue components. You need to call the following from your Vuex store:

Vue.prototype.$flashStorage.flash('message content', 'success', { timeout: 1000 })

Basically, without the messagesOptions key.

ultrono avatar Apr 24 '21 14:04 ultrono