问题描述
我正在使用带有资源时间轴插件的react和full calendar来构建应用程序,下面是我的组件代码。
import React from "react";
import Navbar from "../components/Navbar";
import FullCalendar from "@fullcalendar/react";
import resourceTimelinePlugin from "@fullcalendar/resource-timeline";
export default function Testerino() {
return (
<div>
<Navbar />
<main className="global-container shadow">
<h1>Testes</h1>
<FullCalendar
schedulerLicenseKey="CC-Attribution-NonCommercial-NoDerivatives"
plugins={[resourceTimelinePlugin]}
/>
</main>
</div>
);
}
但是,我仍然收到此错误消息,是否忘记发送道具或其他东西?预先感谢您的帮助。
TypeError: Cannot read property 'resourceAreaWidth' of undefined
new ResourceTimelineView
D:/Documentos/GAH-Sys/frontend/src/ResourceTimelineView.tsx:55
52 | super(props,context)
53 |
54 | this.state = {
> 55 | resourceAreaWidth: context.options.resourceAreaWidth,| ^ 56 | spreadsheetColWidths: []
57 | }
58 | }
View compiled
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)