updateComment()
描述
通过评论 ID 更新卡片评论
用法
updateComment({
id?: string | number,
cardId: string | number,
comment: {
id?: string | number,
cardId?: string | number,
text?: string,
date?: Date,
html?: string
}
}): void;
参数
id- (可选)要更新的评论的 IDcardId- (必需)包含要更新评论的卡片 IDcomment- (必需)要更新的评论配置对象。您可以在这里指定以下参数:id- (可选)更新后的评论 IDcardId- (可选)更新后的评论将被添加到的卡片 IDtext- (可选)更新后的评论文本date- (可选)更新后的评论日期html- (可选)更新后的评论的 HTML 标记。启用editorShape配置中的html属性,以显示 HTML 标记而非文本
示例
// 创建看板
const board = new kanban.Kanban("#root", {
columns,
cards
});
// 更新评 论
board.updateComment({
id: 1,
cardId: 1,
comment: {
id: 2,
cardId: 4,
text: "",
date: new Date("01/08/2021"),
html: "<b>Updated comment</b>"
}
});
更新日志: 该方法在 v1.4 版本中新增