From 5aa8261b7b719bde8881c1f466d2069bb948f83e Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 21 May 2024 17:28:02 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91AI=20?= =?UTF-8?q?=E5=AF=B9=E8=AF=9D=EF=BC=8C=E5=A6=82=E6=9E=9C=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E7=9A=84=E6=98=AF=E9=80=89=E4=B8=AD=E7=9A=84=E5=AF=B9=E8=AF=9D?= =?UTF-8?q?=EF=BC=8C=E9=9C=80=E8=A6=81=E9=87=8D=E6=96=B0=E9=80=89=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ai/chat/Conversation.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/views/ai/chat/Conversation.vue b/src/views/ai/chat/Conversation.vue index b8b7a003..005cb40a 100644 --- a/src/views/ai/chat/Conversation.vue +++ b/src/views/ai/chat/Conversation.vue @@ -169,6 +169,14 @@ const getChatConversationList = async () => { // 3、默认选中 if (!activeId?.value) { await handleConversationClick(res[0].id) + } else { + // tip: 删除的刚好是选中的,那么需要重新挑选一个来进行选中 + const filterConversationList = conversationList.value.filter(item => { + return item.id === activeId.value + }) + if (filterConversationList.length <= 0) { + await handleConversationClick(res[0].id) + } } // 4、没有 任何对话情况 if (conversationList.value.length === 0) {