mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-10 01:12:37 +00:00
Styles imported. Components added
This commit is contained in:
parent
3cb3910561
commit
8264983db4
452 changed files with 55902 additions and 0 deletions
20
components/toastservice/ToastService.js
Executable file
20
components/toastservice/ToastService.js
Executable file
|
@ -0,0 +1,20 @@
|
|||
import ToastEventBus from 'primevue/toasteventbus';
|
||||
import {PrimeVueToastSymbol} from 'primevue/usetoast';
|
||||
|
||||
export default {
|
||||
install: (app) => {
|
||||
const ToastService = {
|
||||
add: (message) => {
|
||||
ToastEventBus.emit('add', message);
|
||||
},
|
||||
removeGroup: (group) => {
|
||||
ToastEventBus.emit('remove-group', group);
|
||||
},
|
||||
removeAllGroups: () => {
|
||||
ToastEventBus.emit('remove-all-groups');
|
||||
}
|
||||
};
|
||||
app.config.globalProperties.$toast = ToastService;
|
||||
app.provide(PrimeVueToastSymbol, ToastService);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue