setCommentData

# 函数: setCommentData()

setCommentData(commentData): void

设置或更新图纸的评论数据。 此函数会替换现有的所有评论数据,并触发UI更新。

# 参数

# commentData

CommentData

包含评论列表的数据对象。

# 返回

void

# 示例

const newCommentData = {
  commentList: [
     {
         id: '90f7aaf0-18b8-b18d-fdc7-f3bd0bf1da7d',
         parentId: '',
         handleId: '34',
         docId: '1958434348275511296',
         creator: '用户2',
         createTime: 1750820789411,
         createBy: '60037989',
         commentStatus: 0,
         content: '####{}',
         realContent: '踩踩踩',
         atUserIds: '',
         mark: '[{"id":"63596ac2-e6bb-bdc7-05c6-ea85d01537d9","center":[-32.65326350132938,1363.5153620444453,0],"endPt":[43.72683433110484,1183.3366697217798,0],"color":"rgba(255,0,0,1)","type":1},{"id":"ed9c5473-c86f-986e-94e4-8b40feb592ca","points":[-120.78414561567661,1177.4612775808232,0,-11.110158984488976,899.3593829088833,0],"color":"rgba(255,0,0,1)","type":2},{"id":"dedd117a-dda0-9824-b558-49d72aa38f7a","clipShape":2,"pts":[-107.07489728677814,991.4071931172015,0,202.36242213692987,826.8962131704201,0],"leadPts":[202.36242213692987,826.8962131704201,0,388.4165066005517,777.9346119957827,0],"textContent":"踩踩踩","textHeight":"23.5","color":"rgba(255,0,0,1)","radius":39.16928093970987,"type":7,"annotationId":"fe600776-6394-c757-9d59-3a6ba026bccb"},{"id":"8fa1f45a-7fd2-a07a-3512-aabd5d61c7ca","pt":[241.53170307663964,772.0592198548262,0],"attachmentId":[],"color":"rgba(255,0,0,1)","type":6}]'
     }
  ]
};
setCommentData(newCommentData);