You can manipulate flash message with several methods
Display Methods
Every display message method will return the id of the message instance. You can pass the data object to configure a message instance as first argument and callbacks object as second argument.
// Basic usagethis.flashMessage.show({ status:'error', title:'Error Message Title', message:'Oh, you broke my heart! Shame on you!'});
You also can use shorthands without status property
this.flashMessage.error({ title:'Error Message Title', message:'Oh, you broke my heart! Shame on you!'});this.flashMessage.warning({ title:'Warning Message Title', message:"Don't stop me nooooow....!"});this.flashMessage.info({ title:'Info Message Title', message:'Just want you to know, that Vue is so cool'});this.flashMessage.success({ title:'Success Message Title', message:'Hoorah, it is my fist npm package and it works!'});
Delete Method
You can delete message programmatically using deleteMessage method
let id =this.flashMessage.info({ title:'Hey, man. Time for beer!', message:'It is Friday. Time to have a little party.'});this.flashMessage.deleteMessage(id);
Switch strategy method
You can update default strategy using setStrategy method.
/* Will return {Boolean} as result */this.flashMessage.setStrategy('multiple'); // strategy changed to multiple