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