跳至主要内容

addRow()

描述

在 Kanban 中添加一行新行

用法

addRow({
id?: string | number,
row?: object,
before?: string | number
}): void;

参数

  • id - (可选)新行的 ID
  • row - (可选)新行的数据对象
  • before - (可选)新行将被插入到该行 ID 之前
信息

完整的 row 参数列表请参见 这里

示例

// 创建 Kanban
const board = new kanban.Kanban("#root", {
columns,
cards,
rows
});
// 添加新行
board.addRow({
id: "extra_row",
row: {
label: "Extra row",
collapsed: false
},
before: "row_2"
});

**更新日志:**参数 idrowbefore 于 v1.1新增