1 этап настройки успешгл

This commit is contained in:
iriska-gri committed 2023-09-21 10:43:35 +03:00
1 parent 067973c154
commit b5d6d41cb6
4 files changed
+97 -39

No files matched your search

+24 -39
View File
@@ -1,13 +1,19 @@
<template>
<full-calendar :events="events" />
<full-calendar :options="calendarOptions" />
</template>
<script>
import FullCalendar from "@fullcalendar/vue3";
import {reactive} from 'vue'
// import '@fullcalendar/core/vdom'
import FullCalendar from '@fullcalendar/vue3'
import dayGridPlugin from '@fullcalendar/daygrid'
import interactionPlugin from '@fullcalendar/interaction'
import listPlugin from '@fullcalendar/daygrid'
import timeGridPlugin from '@fullcalendar/interaction'
export default {
name: 'Calendar',
props: ['events'],
components: {
FullCalendar
},
@@ -15,43 +21,22 @@ export default {
setup() {
const events = [
{
"id": 1,
"title": "All Day Event",
"start": "2019-01-01"
},
{
"id": 2,
"title": "Long Event",
"start": "2019-01-07",
"end": "2019-01-10"
},
{
"id": 3,
"title": "Repeating Event",
"start": "2019-01-09T16:00:00"
},
{
"id": 4,
"title": "Repeating Event",
"start": "2019-01-16T16:00:00"
},
{
"id": 5,
"title": "Conference",
"start": "2019-01-11",
"end": "2019-01-13"
},
{
"id": 6,
"title": "Meeting",
"start": "2019-01-12T10:30:00",
"end": "2019-01-12T12:30:00"
}
]
const calendarOptions = reactive({
plugins: [ dayGridPlugin, interactionPlugin, timeGridPlugin, listPlugin ],
initialView: 'dayGridMonth',
locale: 'ru',
events: [
{ title: 'event 1', date: '2023-09-21' },
{ title: 'event 2', date: '2023-09-22' },
],
editable: true,
dateClick: (arg) => {
console.log(arg.date);
}
})
return { events}
return { calendarOptions }
}
}
</script>