1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
| let calendarOptions = { nowIndicator: true, allDaySlot: false, slotEventOverlap: true, editable: false, droppable: true, selectOverlap: false, unselectAuto: true, selectable: true, dayHeaders: true, dayMinWidth: 'auto', refetchResourcesOnNavigate: true, resourceOrder: 'index', locale: 'zh-cn', initialView: "dayGridMonth", schedulerLicenseKey: "", height: bodyHeight - 68, eventSources: [], resources: [], plugins: [ momentPlugin, dayGridPlugin, timeGridPlugin, resourceTimelinePlugin, interactionPlugin, resourceTimeGridPlugin, scrollgridPlugin ], headerToolbar: { left: 'prev,title,mothTitle,next,today', center: '', right: 'timeGridDay,timeGridWeek,dayGridMonth,timeline' }, buttonText: { today: '今日', dayGridMonth: '月', week: '周', day: '日' }, customButtons: { timeline: { text: '自定义', click: "timelineEvent_fei 自己定义一个方法" } }, slotLabelFormat: 'HH:mm', eventTimeFormat: 'HH:mm', dayMaxEvents: true, resourceAreaWidth: '280px', views: { timeGridDay: { titleFormat: {year: 'numeric', month: 'short', day: 'numeric'}, }, timeGridWeek: { titleFormat: {year: 'numeric', month: 'short'}, }, dayGridMonth: { titleFormat: {year: 'numeric', month: 'short'}, displayEventTime: true }, timeline: { titleFormat: {year: 'numeric', month: 'short', day: 'numeric'}, }, resourceTimeGrid: { titleFormat: {year: 'numeric', month: 'short', day: 'numeric'}, duration: {days: 1} } }, eventShortHeight: 15, slotDuration: "00:15", eventMinHeight: "15", moreLinkContent: (info) => this.$t('schedule.more') + info.num + this.$t('schedule.item'), moreLinkClick: this.eventLimitClickFun, dayHeaderContent: this.columnHeaderHtmlFun, unselect: this.unselectCallback, datesSet: this.handleDatesRender, eventClick: this.handleEventClick, viewDidMount: this.handleViewSkeletonRender, dayCellContent: (info) => { return {html: `<a class="fc-daygrid-day-number">${info.dayNumberText.replace('日', '')}</a>`} }, nowIndicatorDidMount: this.nowIndicatorDidMount, nowIndicatorContent: this.setNowIndicatorTime, windowResize: (arg) => { this.fullcalendarResize(arg.view.type) } }
|