我正在尝试使用 FullCalendar Scheduler 创建一个 SharePoint 框架 Web 部件(基于 REACT)。完整日历 React daygrid 可以工作,但是一旦我导入调度程序插件(@fullcalendar/resource-timeline),构建失败并出现以下错误:
预期的类型来自属性 'plugins',它在类型 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly & Readonly<{ children?: ReactNode; }>
实际代码
import * as React from 'react'
import FullCalendar from '@fullcalendar/react'
import dayGridPlugin from '@fullcalendar/daygrid'
import timeGridPlugin from '@fullcalendar/timegrid'
import resourceTimelinePlugin from '@fullcalendar/resource-timeline'
import '@fullcalendar/core/main.css';
import '@fullcalendar/daygrid/main.css';
import '@fullcalendar/timegrid/main.css';
export default class MyCall extends React.Component {
render() {
return (
<FullCalendar
defaultView="dayGridMonth"
header={{
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay'
}}
plugins={[ dayGridPlugin, timeGridPlugin, resourceTimelinePlugin ]} />
)
}
}
如果我删除@fullcalendar/resource-timeline 的导入语句,它工作正常,但只要我添加调度程序的导入语句,生成生成错误