GitHub-在事件源设置中指定resourceId但是,检查gcal.js文件显示该修补程序尚未添加到该文件中.是否可以为每个Google日历供稿手动分配一个resourceId,以复制 FullCalendar时间轴视图文档?任何指导将不胜感激.解决方案根据第二个GitHub链接中的问题(您的第一个GitHub链接已合并), https://github.com/fullcalendar/fullcalendar-scheduler/issues/124 ,您提到的修复程序仍在等待测试(截至11 2018年3月).因此,如果您耐心等待,它很可能会添加到将来的版本中,前提是它已通过测试.同时,这是一个可能的解决方法:在fullCalendar中,可以为每个事件源定义一个单独的eventDataTransform.因此,我认为您应该能够使用它为每个事件设置资源ID,具体取决于它来自的Google日历:eventSources: [ { googleCalendarId: 'abc@group.calendar.google.com', color: 'blue', eventDataTransform: function(event) { event.resourceId = 1; return event; } }, { googleCalendarId: 'def@group.calendar.google.com', color: 'green', eventDataTransform: function(event) { event.resourceId = 2; return event; } }, { googleCalendarId: 'ghi@group.calendar.google.com', color: 'red' , eventDataTransform: function(event) { event.resourceId = 3; return event; } }]我现在无法测试,但看起来应该可以.希望这会在它呈现在日历上之前发生,并且需要属于资源.Reference: FullCalendar 3.9.0, FullCalendar-Scheduler 1.9.4Can anyone confirm whether or not it is possible to group Google calendar events by resource? Adding a resourceId parameter to a calendar source as follows: var myCalSrc = { id: 1, googleCalendarId: '<myCalSrcURL>', color: '<myCalSrcColor>', className: '<myCalSrc-events>'};results in a blank display. The following note in the FullCalendar-Scheduler gcal.html file located in the demos directory states:However, the following threads appear to suggest there may have been a fix for this:GitHub - Add ResourceId Parameter to gcal.js (fix supplied)GitHub - Specify resourceId in Event Source settingsHowever, checking the gcal.js file reveals the fix has not been added to that file.Is it possible to manually assign a resourceId to each of the Google Calendar feeds in order to replicate the Resources and Timeline view indicated by the FullCalendar Timeline View documentation?Any guidance would be greatly appreciated. 解决方案 As per the issue in your second GitHub link (which your first one was merged with), https://github.com/fullcalendar/fullcalendar-scheduler/issues/124, the fix you mentioned is still awaiting testing (as of 11 Mar 2018). So if you're patient it will likely be added to a future release, assuming it passes the tests. In the meantime, here is a potential workaround:In fullCalendar it's possible to define a separate eventDataTransform for every event source.Therefore I think you should be able to use this to set a resource ID for each event depending on the Google Calendar it came from:eventSources: [ { googleCalendarId: 'abc@group.calendar.google.com', color: 'blue', eventDataTransform: function(event) { event.resourceId = 1; return event; } }, { googleCalendarId: 'def@group.calendar.google.com', color: 'green', eventDataTransform: function(event) { event.resourceId = 2; return event; } }, { googleCalendarId: 'ghi@group.calendar.google.com', color: 'red' , eventDataTransform: function(event) { event.resourceId = 3; return event; } }]I'm not able to test this right now but it looks like it should work. Hopefully this will take place before it's rendered on the calendar and needs to belong to a resource. 这篇关于FullCalendar-Scheduler Google日历ResourceIDs查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!