From a71c844ef4512e5dc524296e9f9b11b584c6c54b Mon Sep 17 00:00:00 2001 From: shaohuzhang1 <80892890+shaohuzhang1@users.noreply.github.com> Date: Wed, 2 Apr 2025 16:36:14 +0800 Subject: [PATCH] fix: Copy and delete form information (#2778) --- .../operation-button/ChatOperationButton.vue | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/ui/src/components/ai-chat/component/operation-button/ChatOperationButton.vue b/ui/src/components/ai-chat/component/operation-button/ChatOperationButton.vue index ac62b8c9b..cd3ddd490 100644 --- a/ui/src/components/ai-chat/component/operation-button/ChatOperationButton.vue +++ b/ui/src/components/ai-chat/component/operation-button/ChatOperationButton.vue @@ -41,7 +41,7 @@ - + @@ -106,7 +106,16 @@ import applicationApi from '@/api/application' import { datetimeFormat } from '@/utils/time' import { MsgError } from '@/utils/message' import bus from '@/bus' - +const copy = (data: any) => { + try { + const text = data.answer_text_list + .map((item: Array) => item.map((i) => i.content).join('\n')) + .join('\n\n') + copyClick(text) + } catch (e: any) { + copyClick(removeFormRander(data?.answer_text.trim())) + } +} const route = useRoute() const { params: { id }