我正在从 FullCalendar v3 更新到 v4,并且在从单击的资源中获取 businessHours 时遇到问题。
在 v3 中,我以这种方式获取 businessHours:
select: function (eventClickInfo) {
console.log(eventClickInfo.resource)
}
资源数据:
...
businessHours: [
start: XXX
end: XXX
], [
start: XXX
end: XXX
]
...
但在 V4 中,资源对象得到了这样的结构:
_resource:
businessHours:
defs:
203:
allDay: false
defId: "203"
extendedProps:
end: {ms: 43200000, __edmType: "Edm.Time"}
groupId: "_businessHours"
hasEnd: true
...
204:
allDay: false
defId: "204"
extendedProps:
end: {ms: 72000000, __edmType: "Edm.Time"}
groupId: "_businessHours"
hasEnd: true
...
没有开始时间,也无法获得像这样的营业时间.getResource("XXX").getBusinessHours()
有任何想法吗?