primevue-mirror/plugins/fullcalendar.client.js

18 lines
586 B
JavaScript
Raw Normal View History

2022-09-14 14:26:41 +00:00
import '@fullcalendar/core/vdom'; // solve problem with Vite
import dayGridPlugin from '@fullcalendar/daygrid';
import interactionPlugin from '@fullcalendar/interaction';
2022-09-14 11:26:01 +00:00
import timeGridPlugin from '@fullcalendar/timegrid';
import FullCalendar from '@fullcalendar/vue3';
2022-09-14 11:26:01 +00:00
FullCalendar.options = {
2022-09-14 14:26:41 +00:00
plugins: [dayGridPlugin, timeGridPlugin, interactionPlugin]
};
2022-09-14 11:26:01 +00:00
const $fullCalendar = {
install: (Vue, options) => {
2022-09-14 14:26:41 +00:00
Vue.config.globalProperties.$fullCalendar = FullCalendar;
}
};
export default defineNuxtPlugin((nuxtApp) => {
2022-09-14 11:26:01 +00:00
nuxtApp.vueApp.use($fullCalendar);
2022-09-14 14:26:41 +00:00
});