IsSolved
检查批注是否已解决。
语法
expression.IsSolved();
expression - 表示 ApiComment 类的变量。
参数
此方法没有任何参数。
返回值
boolean
示例
确定文档中的批注是否标记为已解决。
// How do I check if a comment has been resolved in a document?
// Filter out already-resolved comments before processing open review threads.
let doc = Api.GetDocument();
let paragraph = doc.GetElement(0);
paragraph.AddText("This is just a sample text");
Api.AddComment(paragraph, "comment", "John Smith");
let comments = doc.GetAllComments();
comments[0].SetSolved(true);
let solved = comments[0].IsSolved();
paragraph = Api.CreateParagraph();
paragraph.AddText("The comment is solved: " + solved);
doc.Push(paragraph);