columnKey
描述
可选。定义卡片所属的列
信息
为了将卡片分配到不同的列中,您需要指定一个键(column 或自定义键)并将其设置为卡片数据对象中所需列的 ID。在组件配置对象中,columnKey 属性需要被设置为该键。
用法
columnKey?: string;
默认配置
注释
除非您通过 columnKey 属性注册了列键,否则组件默认使用 "column" 键!在这种情况下,您需要在卡片数据对象 中将 column 键设置为所需的列 ID。
const cards = [
{
column: "backlog",
// 其他数据
}
];
示例
const cards = [
{
label: "待办任务",
column_custom_key: "backlog"
},
{
label: "进行中任务",
column_custom_key: "inprogress"
}
];
new kanban.Kanban("#root", {
columns,
cards,
columnKey: "column_custom_key",
// 其他参数
});