From f57b5befd7bf26d7b8fde9fcec167d2cdfd44f51 Mon Sep 17 00:00:00 2001 From: Gsh <15170702455@163.com> Date: Sat, 31 Jan 2026 21:28:13 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B6=88=E6=81=AFui=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/chat/layouts/chatWithId/index.vue | 65 +++++++++---------- Yi.Ai.Vue3/src/styles/var.scss | 3 + 2 files changed, 33 insertions(+), 35 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 e0a50833..e89ef196 100644 --- a/Yi.Ai.Vue3/src/pages/chat/layouts/chatWithId/index.vue +++ b/Yi.Ai.Vue3/src/pages/chat/layouts/chatWithId/index.vue @@ -6,7 +6,7 @@ import type { BubbleListInstance } from 'vue-element-plus-x/types/BubbleList'; import type { FilesCardProps } from 'vue-element-plus-x/types/FilesCard'; import type { ThinkingStatus } from 'vue-element-plus-x/types/Thinking'; import type { UnifiedMessage } from '@/utils/apiFormatConverter'; -import { ArrowLeftBold, ArrowRightBold, Clock, Delete, Document, DocumentCopy, Edit, Loading, Refresh } from '@element-plus/icons-vue'; +import { ArrowLeftBold, ArrowRightBold, Delete, Document, DocumentCopy, Edit, Loading, Refresh } from '@element-plus/icons-vue'; import { ElIcon, ElMessage } from 'element-plus'; import { useHookFetch } from 'hook-fetch/vue'; import mammoth from 'mammoth'; @@ -532,13 +532,9 @@ function enterDeleteMode(item?: MessageItem) { selectedMessageIds.value = []; deleteTargetMessage.value = item || null; - // 如果指定了消息,自动选中该消息及其之后的所有消息 + // 如果指定了消息,只自动选中当前点击的这条消息 if (item && item.id) { - const itemIndex = bubbleItems.value.findIndex(msg => msg.key === item.key); - if (itemIndex !== -1) { - const messagesToDelete = bubbleItems.value.slice(itemIndex); - selectedMessageIds.value = messagesToDelete.filter(msg => msg.id).map(msg => msg.id!); - } + selectedMessageIds.value = [item.id]; } } @@ -1282,7 +1278,6 @@ onUnmounted(() => {