事件上的 resourceEditable=false 是否应该不允许该事件在资源之间切换?

Should resourceEditable=false on an event disallow that event to be switch between resource?

我正在使用 fullcalendar v4,刚开始使用调度程序 resourceTimeGrid。处理资源我只是 运行 进入我将在此处描述的情况并想问我的问题(我写这些行是因为 SO 认为我的问题中没有足够的文本。Lorem ipsum dolore sit amet consectetur):

以下行为正常吗?即使使用 resourceEditable=false,您也可以将事件切换到另一个资源

<html>
<head>
<link href='https://unpkg.com/@fullcalendar/core@4.4.0/main.min.css' rel='stylesheet' />
<link href='https://unpkg.com/@fullcalendar/daygrid@4.4.0/main.min.css' rel='stylesheet' />
<link href='https://unpkg.com/@fullcalendar/timegrid@4.4.0/main.min.css' rel='stylesheet' />


  <script src='https://unpkg.com/@fullcalendar/core@4.4.0/main.min.js'></script>
  <script src='https://unpkg.com/@fullcalendar/interaction@4.4.0/main.js'></script>
  <script src='https://unpkg.com/@fullcalendar/daygrid@4.4.0/main.js'></script>
  <script src='https://unpkg.com/@fullcalendar/timegrid@4.4.0/main.js'></script>
  <script src='https://unpkg.com/@fullcalendar/resource-common@4.4.0/main.min.js'></script>
  <script src='https://unpkg.com/@fullcalendar/resource-daygrid@4.4.0/main.js'></script>
  <script src='https://unpkg.com/@fullcalendar/resource-timegrid@4.4.0/main.js'></script>
</head>
<body>

<a>Drop the event one time to disable editable and resourceEditable for that event</a><br/>
<a>Test to put that event in the other resource : even with resourceEditable=false you can switch event to another resource</a>
<div id="calendarArea"></div>

<script>

var calendarEl = document.getElementById('calendarArea');

var today = new Date();
var month = (today.getMonth()+1) > 10 ? today.getMonth()+1 : '0'+(today.getMonth()+1);
var day = today.getDate() > 10 ? today.getDate() : '0'+today.getDate();
var todayStringStart = today.getFullYear()+'-'+ month+'-'+today.getDate()+'T08:00';
var todayStringEnd = today.getFullYear()+'-'+ month+'-'+today.getDate()+'T09:00';

var calendar = new FullCalendar.Calendar(calendarEl, {
  plugins: [ 'interaction', 'resourceTimeGrid' ],
  defaultView: 'resourceTimeGridWeek',
  editable: true,
  weekends: false,
  eventResourceEditable: true,
  scrollTime : '07:00:00',
  schedulerLicenseKey: 'GPL-My-Project-Is-Open-Source',
  resources: [
    {
      id: 'a',
      title: 'Room A',
    },
    {
      id: 'b',
      title: 'Room B',
    },
  ],
  events: [
    {
      id: 'a',
      title: 'my event',
      start: todayStringStart,
      end: todayStringEnd,
      resourceId: 'a',
      editable: true,
      resourceEditable: true,
    },
  ],
  views: {
    resourceTimeGridWeek: {
      type: 'resourceTimeGrid',
      duration: { week:1 },
    },
    resourceTimeGridMonth: {
      type: 'resourceTimeGrid',
      duration: { month:1 },
    },
  },
  eventDrop: (info) => {     
    info.event.setProp('editable', false);
    info.event.setProp('resourceEditable', false);
  },
});
calendar.render();

</script>
</body>
</html>

是的,它应该(而且可能会),但目前图书馆需要改进。

这似乎是个问题:https://github.com/fullcalendar/fullcalendar/issues/5166 与 fullcalendar 中的一个更大的问题相关:https://github.com/fullcalendar/fullcalendar/issues/4625