17 lines
564 B
JavaScript
17 lines
564 B
JavaScript
|
import ConfirmationEventBus from 'primevue/confirmationeventbus';
|
||
|
import {PrimeVueConfirmSymbol} from 'primevue/useconfirm';
|
||
|
|
||
|
export default {
|
||
|
install: (app) => {
|
||
|
const ConfirmationService = {
|
||
|
require: (options) => {
|
||
|
ConfirmationEventBus.emit('confirm', options);
|
||
|
},
|
||
|
close: () => {
|
||
|
ConfirmationEventBus.emit('close');
|
||
|
}
|
||
|
};
|
||
|
app.config.globalProperties.$confirm = ConfirmationService;
|
||
|
app.provide(PrimeVueConfirmSymbol, ConfirmationService);
|
||
|
}
|
||
|
};
|