如何在 fullcalendar 的事件中调用另一个函数
How to call another function within events of fullcalendar
我想在我的 eventReceive 函数中调用另一个函数 fetchData() ,但我不断收到 fetchData() is not defined or _this.fetchData() is没有功能
<FullCalendar
defaultView="dayGridMonth"
header={{
left: "prev,next today",
center: "title",
right: "dayGridMonth,timeGridWeek,timeGridDay,listWeek"
}}
editable={true}
droppable={true}
plugins={[dayGridPlugin, interactionPlugin]}
events={testSubtask[0] ? testSubtask[0].map(d => ({
"id": d.id,
"title": d.name,
"start": d.start,
"end": d.end
})) : null}
eventReceive={function (info ) {
this.fetchDraggingTask(); //HOW TO CALL DIFFERENT FUNCTION HERE?
}}
/>
我最近一直在研究 fullcalendar。我认为这种方式可能可行。
<FullCalendar
defaultView="dayGridMonth"
header={{
left: "prev,next today",
center: "title",
right: "dayGridMonth,timeGridWeek,timeGridDay,listWeek"
}}
editable={true}
droppable={true}
plugins={[dayGridPlugin, interactionPlugin]}
events={testSubtask[0] ? testSubtask[0].map(d => ({
"id": d.id,
"title": d.name,
"start": d.start,
"end": d.end
})) : null}
eventReceive={(info) => this.fetchDraggingTask(info)}
/>
我想在我的 eventReceive 函数中调用另一个函数 fetchData() ,但我不断收到 fetchData() is not defined or _this.fetchData() is没有功能
<FullCalendar
defaultView="dayGridMonth"
header={{
left: "prev,next today",
center: "title",
right: "dayGridMonth,timeGridWeek,timeGridDay,listWeek"
}}
editable={true}
droppable={true}
plugins={[dayGridPlugin, interactionPlugin]}
events={testSubtask[0] ? testSubtask[0].map(d => ({
"id": d.id,
"title": d.name,
"start": d.start,
"end": d.end
})) : null}
eventReceive={function (info ) {
this.fetchDraggingTask(); //HOW TO CALL DIFFERENT FUNCTION HERE?
}}
/>
我最近一直在研究 fullcalendar。我认为这种方式可能可行。
<FullCalendar
defaultView="dayGridMonth"
header={{
left: "prev,next today",
center: "title",
right: "dayGridMonth,timeGridWeek,timeGridDay,listWeek"
}}
editable={true}
droppable={true}
plugins={[dayGridPlugin, interactionPlugin]}
events={testSubtask[0] ? testSubtask[0].map(d => ({
"id": d.id,
"title": d.name,
"start": d.start,
"end": d.end
})) : null}
eventReceive={(info) => this.fetchDraggingTask(info)}
/>