完整日历计划程序对SharePoint框架(REACT)

问题描述 投票:0回答:1

我正在尝试使用FullCalendar Scheduler创建SharePoint Framework Webpart(基于REACT)。完整的Calendar React daygrid可以正常运行,但是一旦导入Scheduler插件(@ fullcalendar / resource-timeline),构建就会失败,并显示以下错误:

预期的类型来自属性'plugins',该属性在此处声明为'IntrinsicAttributes&IntrinsicClassAttributes&Readonly&Readonly

实际代码

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的导入语句,它可以正常工作,但是一旦我添加了调度程序的导入语句,就会生成生成错误

reactjs fullcalendar sharepoint-online fullcalendar-scheduler sharepointframework
1个回答
0
投票

请确保包括您的schedulerLicenseKey。

如果要在SharePoint Online中使用SPFx实现完整日历,请使用以下解决方案从GitHub供您参考。

spfx-react-fullcalendar

© www.soinside.com 2019 - 2024. All rights reserved.