vue-notification-renderless
Version:
Lightweight renderless flash message component.
20 lines (15 loc) • 406 B
JavaScript
import Events from './events';
import VueNotificationRenderless from './flasher';
export default {
install(Vue, args = {}) {
if (this.installed) {
return;
}
this.installed = true;
Vue.component(
args.wrapper_name || VueNotificationRenderless.name,
VueNotificationRenderless
);
Vue.prototype.$notification = data => Events.$emit('notification', data);
}
};