From 8f2b81bb7942107b75ab89b144d9eec94bb60369 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 21 May 2024 22:44:15 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91AI=20?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E5=AF=B9=E8=AF=9D=EF=BC=8C=E5=85=88=E5=9B=9E?= =?UTF-8?q?=E8=B0=83=E6=88=90=E5=8A=9F=E5=86=8D=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ai/chat/Conversation.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/views/ai/chat/Conversation.vue b/src/views/ai/chat/Conversation.vue index 1983614a..cc061254 100644 --- a/src/views/ai/chat/Conversation.vue +++ b/src/views/ai/chat/Conversation.vue @@ -144,13 +144,16 @@ const searchConversation = async (e) => { * 对话 - 点击 */ const handleConversationClick = async (id: string) => { - // 切换对话 - activeConversationId.value = id + // 过滤出选中的对话 const filterConversation = conversationList.value.filter(item => { return item.id === id }) // 回调 onConversationClick - emits('onConversationClick', filterConversation[0]) + const res = emits('onConversationClick', filterConversation[0]) + // 切换对话 + if (res) { + activeConversationId.value = id + } } /**