From ed4965f2b9bd2d4bc3c9a42181cc4201c26a9ca8 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 12 Jan 2026 15:44:35 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B7=BB=E5=8A=A0TaskHall=E4=B8=AD?= =?UTF-8?q?=E7=BC=BA=E5=A4=B1=E7=9A=84handleCopyTaskNo=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/TaskHall.vue | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/frontend/src/views/TaskHall.vue b/frontend/src/views/TaskHall.vue index 2e9f423..a26f490 100644 --- a/frontend/src/views/TaskHall.vue +++ b/frontend/src/views/TaskHall.vue @@ -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) + } +} + // 完结任务(支持普通任务和子任务) // 编辑被驳回的任务 // 下载素材