fix: 添加TaskHall中缺失的handleCopyTaskNo函数

This commit is contained in:
Your Name 2026-01-12 15:44:35 +08:00
parent aa53f27668
commit ed4965f2b9

View File

@ -4478,6 +4478,29 @@ const handleUpdateProgress = (task: TaskOrSubTask) => {
})
}
// 复制任务编号
const handleCopyTaskNo = async (taskNo: string) => {
try {
await navigator.clipboard.writeText(taskNo)
message.success('任务编号已复制')
} catch (error) {
// 降级方案:使用传统方法
const textarea = document.createElement('textarea')
textarea.value = taskNo
textarea.style.position = 'fixed'
textarea.style.opacity = '0'
document.body.appendChild(textarea)
textarea.select()
try {
document.execCommand('copy')
message.success('任务编号已复制')
} catch (e) {
message.error('复制失败')
}
document.body.removeChild(textarea)
}
}
// 完结任务(支持普通任务和子任务)
// 编辑被驳回的任务
// 下载素材