Nativescript RadCalendar在以编程方式添加新事件时不更新事件

Nativescript RadCalendar在以编程方式添加新事件时不更新事件,nativescript,nativescript-vue,Nativescript,Nativescript Vue,我正在将RadCalendar与Nativescript Vue一起使用,并尝试允许用户手动(通过表单)添加事件,但一旦事件被推送到eventSource中,日历将不会对其做出反应(它不会显示在视图中)。如果我重新渲染日历,它会显示新添加的事件知道日历为什么不响应此更改并添加新活动吗? eventSource有一个名为calendarEvents的变量绑定到它 这是RadCalendar的一个已知问题,您必须提供一个新的数组引用以更新UI。仅仅将数据推送到同一个数组不会触发更新 onAddBo

我正在将RadCalendar与Nativescript Vue一起使用,并尝试允许用户手动(通过表单)添加事件,但一旦事件被推送到eventSource中,日历将不会对其做出反应(它不会显示在视图中)。如果我重新渲染日历,它会显示新添加的事件知道日历为什么不响应此更改并添加新活动吗?

eventSource有一个名为calendarEvents的变量绑定到它


这是RadCalendar的一个已知问题,您必须提供一个新的数组引用以更新UI。仅仅将数据推送到同一个数组不会触发更新

onAddBookingExternal () {
  this.$showModal(BookingExternal).then((data) => {
    if(data) {
      ...          
      let event = new calendarModule.CalendarEvent('Name', startDate, endDate, false, color)

      this.calendarEvents = [...this.calendarEvents, event];
    }
  })
}

这是RadCalendar的一个已知问题,您必须提供一个新的数组引用以更新UI。仅仅将数据推送到同一个数组不会触发更新

onAddBookingExternal () {
  this.$showModal(BookingExternal).then((data) => {
    if(data) {
      ...          
      let event = new calendarModule.CalendarEvent('Name', startDate, endDate, false, color)

      this.calendarEvents = [...this.calendarEvents, event];
    }
  })
}

您是否可以创建playgrond?从“nativescript ui calendar”导入{CalendarEvent};您是否可以创建playgrond?从“nativescript ui calendar”导入{CalendarEvent};