审批动作前冲刷评论区未发送内容,减少先点发送再审批的一步操作。 关联 #118。 Co-authored-by: Cursor <cursoragent@cursor.com>
8 lines
349 B
JavaScript
8 lines
349 B
JavaScript
/** 评论区是否有未发送草稿(文字 / @ / 附件) */
|
|
export function hasOaCommentDraft(input = {}) {
|
|
const content = String(input.content || '').trim()
|
|
const mentionCount = Number(input.mentionCount || 0)
|
|
const attachmentCount = Number(input.attachmentCount || 0)
|
|
return !!(content || mentionCount > 0 || attachmentCount > 0)
|
|
}
|