首页 > 解决方案 > FullCalendar 调度程序 - nowIndicator 仅适用于作为 Day 的 initialView

问题描述

正如标题所说,我正在使用 FullCalendar Scheduler 但我似乎无法nowIndicator使用initialViewasresourceTimelineMonthresourceTimelineWeek. 指标停留在00:00当天。

只有将 initialView 设置为resourceTimelineDay.

我的代码:

<FullCalendar 
  v-if="employeeList && absenceList" 
  :options="calendarOptions"
/>

(...)

data() {
    return {
      employeeList: null,
      absenceList: null,
      calendarOptions: {
        plugins: [ resourceTimelinePlugin ],
        headerToolbar: {
            left: 'today prev,next',
            center: 'title',
            right: 'resourceTimelineDay,resourceTimelineWeek,resourceTimelineMonth'
        },
        locales: allLocales,
        locale: this.$i18n.locale,
        initialView: 'resourceTimelineMonth',
        resourceGroupField: 'department',
        resourceAreaHeaderContent: 'Colaboradores ',
        resourceOrder: 'department,title',
        nowIndicator: true,
        businessHours: [ 
          { 
            daysOfWeek: [ 1, 2, 3, 4, 5 ], 
            startTime: null, 
            endTime: null, 
          } 
        ],
        height: 600,
        resources: this.getEmployeesArray,
        events: this.getApprovedAbsencesArray,
      }
    }
  },

标签: fullcalendarfullcalendar-schedulerfullcalendar-5

解决方案


推荐阅读