跳至主要内容

parse()

描述

将数据加载到看板中

用法

parse({
columns?: array,
rows?: array,
cards?: array
}): void;

参数

  • columns - (可选)包含列数据对象的数组
  • rows - (可选)包含行数据对象的数组
  • cards - (可选)包含卡片数据对象的数组

示例

// 创建看板
const board = new kanban.Kanban("#root", {});
// 将数据加载到看板
board.parse({
columns,
cards,
rows
});

更新日志: 从 v1.1 版本开始,解析新数据前不再需要在构造函数中重置初始数据

相关文档: 数据操作