From 9af8c4897bde922ca4f7051efefa0569633628cb Mon Sep 17 00:00:00 2001 From: Gsh <15170702455@163.com> Date: Wed, 9 Jul 2025 00:08:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A2=9E=E5=8A=A0=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E5=A4=8D=E5=88=B6=E3=80=81=E6=B6=88=E6=81=AF=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/chat/layouts/chatWithId/index.vue | 21 +++++++++++++++++++ Yi.Ai.Vue3/types/components.d.ts | 6 ------ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/Yi.Ai.Vue3/src/pages/chat/layouts/chatWithId/index.vue b/Yi.Ai.Vue3/src/pages/chat/layouts/chatWithId/index.vue index f1e70486..9c708d3f 100644 --- a/Yi.Ai.Vue3/src/pages/chat/layouts/chatWithId/index.vue +++ b/Yi.Ai.Vue3/src/pages/chat/layouts/chatWithId/index.vue @@ -268,6 +268,14 @@ watch( function markdownContent(item: any) { return item.content; } + +// 复制 +function copy(item: any) { + console.log('复制', item); + navigator.clipboard.writeText(item.content || '') + .then(() => ElMessage.success('已复制到剪贴板')) + .catch(() => ElMessage.error('复制失败')); +}