跳转到主要内容

parse

Description

从客户端资源加载数据

parse: (data: any) => void

Parameters

  • data - (必填) object - 一个表示数据的字符串或对象

Example

scheduler.parse([
{ start_date: "2027-05-13 6:00", end_date: "2027-05-13 8:00", text: "Event 1" },
{ start_date: "2027-06-09 6:00", end_date: "2027-06-09 8:00", text: "Event 2" }
]);

Migration

在 v5.2 及以后版本中,Scheduler 会自动检测数据格式。

但在 v5.2 之前,该方法包含两个参数:

  • data - (object) 一个表示数据的字符串或对象
  • type - (string) 可选,('json', 'xml', 'ical') 数据类型。默认值是 'xml'

Change log

  • 在 v5.2 中,该方法的第二个 type 参数已被移除。
Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.