|
@@ -63,6 +63,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import moment from 'moment'
|
|
|
import FullCalendar from '@fullcalendar/vue'
|
|
|
import dayGridPlugin from '@fullcalendar/daygrid'
|
|
|
import timeGridPlugin from '@fullcalendar/timegrid'
|
|
@@ -139,10 +140,6 @@ export default {
|
|
|
listPlugin
|
|
|
],
|
|
|
calendarWeekends: true,
|
|
|
- calendarEvents: [
|
|
|
- // initial event data
|
|
|
- { title: 'Event Now', start: new Date(), end: new Date().setDate(16) }
|
|
|
- ],
|
|
|
deleteDialogVisible: false,
|
|
|
calendarDialogProperty: {
|
|
|
title: '新建日程',
|
|
@@ -161,7 +158,6 @@ export default {
|
|
|
},
|
|
|
callCalendarApi(methods, viewName) {
|
|
|
const calendarApi = this.$refs.fullCalendar.getApi()
|
|
|
- this.$emit('change', calendarApi.view)
|
|
|
if (methods) {
|
|
|
if (viewName) {
|
|
|
calendarApi[methods](viewName)
|
|
@@ -169,6 +165,9 @@ export default {
|
|
|
calendarApi[methods]()
|
|
|
}
|
|
|
}
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$emit('change', calendarApi.view)
|
|
|
+ })
|
|
|
this.calendarTitle = calendarApi.view.title
|
|
|
if (calendarApi.view.activeStart.getTime() < this.today.getTime() && this.today.getTime() < calendarApi.view.activeEnd.getTime()) {
|
|
|
this.todayClassName = 'today selected'
|