Предварительная сохраняшка
This commit is contained in:
1 parent
ba33de3d77
commit
17f35a0f5d
875 files changed
+146196
-124
No files matched your search
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<full-calendar :options="calendarOptions" />
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -15,17 +16,24 @@ import multiMonthPlugin from '@fullcalendar/multimonth'
|
||||
|
||||
|
||||
export default {
|
||||
name: 'Calendar',
|
||||
name: 'calendar-full',
|
||||
|
||||
props: {
|
||||
initial: {
|
||||
type: String,
|
||||
default: 'multiMonthYear'
|
||||
}
|
||||
},
|
||||
|
||||
components: {
|
||||
FullCalendar
|
||||
},
|
||||
|
||||
setup() {
|
||||
setup(props) {
|
||||
|
||||
const calendarOptions = reactive({
|
||||
plugins: [ dayGridPlugin, interactionPlugin, timeGridPlugin, listPlugin, multiMonthPlugin ],
|
||||
initialView: 'dayGridMonth',
|
||||
initialView: props.initial,
|
||||
|
||||
locale: 'ru',
|
||||
buttonText: {
|
||||
@@ -38,37 +46,57 @@ export default {
|
||||
},
|
||||
firstDay:'1',
|
||||
events: [],
|
||||
// eventDidMount: function(info) {
|
||||
|
||||
|
||||
// const dayEl = info.el.closest('.fc-daygrid-day')
|
||||
// dayEl.style.backgroundColor = 'red'
|
||||
// },
|
||||
// datesRender: function(info) {
|
||||
|
||||
|
||||
// const start = info.view.activeStart
|
||||
// const end = info.view.activeEnd
|
||||
// let daysEls = document.querySelectorAll('.fc-daygrid-day')
|
||||
// console.log(daysEls , ' info-------------');
|
||||
// },
|
||||
|
||||
editable: true,
|
||||
headerToolbar: {
|
||||
left: 'prev next today multiMonthYear',
|
||||
headerToolbar: {
|
||||
left: 'prev',
|
||||
center: 'title',
|
||||
right: 'dayGridMonth listDay listYear'
|
||||
},
|
||||
multiMonthMaxColumns: 2,
|
||||
buttonIcons: {
|
||||
prev:'chevron-left',
|
||||
},
|
||||
displayEventEnd: true,
|
||||
|
||||
right: 'next'
|
||||
}
|
||||
|
||||
,
|
||||
|
||||
// eventDidMount: function(info) {
|
||||
// console.log(info.event.extendedProps);
|
||||
// {description: "Lecture", department: "BioChemistry"}
|
||||
// },
|
||||
aspectRatio: 1,
|
||||
multiMonthMaxColumns: 2,
|
||||
displayEventEnd: true,
|
||||
height: '100%',
|
||||
stickyHeaderDates: true,
|
||||
dayMaxEventRows: 2,
|
||||
moreLinkContent: function(arg) {
|
||||
return arg.shortText + ' события'
|
||||
},
|
||||
views: {
|
||||
multiMonthYear: {
|
||||
aspectRatio: 2,
|
||||
|
||||
moreLinkContent: function(arg) {
|
||||
return arg.num
|
||||
},
|
||||
// titleFormat: { year: 'numeric', month: '2-digit', day: '2-digit' }
|
||||
}
|
||||
|
||||
},
|
||||
},
|
||||
// columnFormat: {
|
||||
|
||||
allDayText: 'Весь день',
|
||||
noEventsContent: 'На сегодня событий нет',
|
||||
selectable: true,
|
||||
aspectRatio: 2,
|
||||
|
||||
dateClick: (arg) => {
|
||||
console.log(arg.date);
|
||||
}
|
||||
@@ -115,7 +143,7 @@ export default {
|
||||
}
|
||||
|
||||
.fc-toolbar {
|
||||
padding: 0px;
|
||||
/* padding: 0px; */
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
.fc-day-header {
|
||||
@@ -135,15 +163,46 @@ export default {
|
||||
}
|
||||
|
||||
.fc .fc-toolbar.fc-header-toolbar {
|
||||
padding-bottom: 1.2em;
|
||||
padding-bottom: 0.2em;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.fc .fc-daygrid-day-events {
|
||||
|
||||
|
||||
/* .fc .fc-daygrid-day-events {
|
||||
margin-top: -7px;
|
||||
}
|
||||
} */
|
||||
.fc {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.fc-button {
|
||||
|
||||
padding: 1px!important;
|
||||
border-radius: 1em!important;
|
||||
line-height: 0!important;
|
||||
background-color: transparent!important;
|
||||
border-color: transparent!important;
|
||||
|
||||
}
|
||||
|
||||
.fc-icon {
|
||||
color: #000;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.fc-button:focus, .fc-icon {
|
||||
outline: none!important;
|
||||
}
|
||||
|
||||
.fc-button,
|
||||
.fc-buttonactive,
|
||||
.fc-button:focus {
|
||||
border:none!important;
|
||||
}
|
||||
|
||||
.fc-header-toolbar {
|
||||
background: white !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
Reference in new issue
Block a user