From 8fb54dbb7c2d797ae754cd97e6ceafdddbd1e8e5 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Fri, 24 May 2024 10:39:12 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E8=A7=A3=E5=86=B3todo=E3=80=91Chat=20?= =?UTF-8?q?=E5=AF=B9=E8=AF=9D=E9=BB=98=E8=AE=A4=E9=80=89=E4=B8=AD=E7=AC=AC?= =?UTF-8?q?=E4=B8=80=E4=B8=AA?= 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, 7 insertions(+), 2 deletions(-) diff --git a/src/views/ai/chat/Conversation.vue b/src/views/ai/chat/Conversation.vue index 946735f7..4b2d60ef 100644 --- a/src/views/ai/chat/Conversation.vue +++ b/src/views/ai/chat/Conversation.vue @@ -378,12 +378,17 @@ watch(activeId, async (newValue, oldValue) => { defineExpose({createConversation}) onMounted(async () => { + // 获取 对话列表 + await getChatConversationList() // 默认选中 if (props.activeId != null) { activeConversationId.value = props.activeId + } else { + // 首次默认选中第一个 + if (conversationList.value.length) { + activeConversationId.value = conversationList.value[0].id + } } - // 获取 对话列表 - await getChatConversationList() })