From 43521ebfcdd69b6e6efec4dae84959c3d793ab0a Mon Sep 17 00:00:00 2001 From: wujingjing <gersonwu@qq.com> Date: 星期五, 11 十月 2024 11:39:53 +0800 Subject: [PATCH] 聊天项增加 key --- src/components/chat/Chat.vue | 7 +------ 1 files changed, 1 insertions(+), 6 deletions(-) diff --git a/src/components/chat/Chat.vue b/src/components/chat/Chat.vue index 72c9d88..d853f77 100644 --- a/src/components/chat/Chat.vue +++ b/src/components/chat/Chat.vue @@ -11,7 +11,7 @@ class="group flex px-4 py-6 hover:bg-slate-100 rounded-lg relative" :class="{ 'flex-row-reverse': item.role === RoleEnum.user }" v-for="(item, index) of computedMessageList" - :key="index" + :key="`${item.historyId}_${item.role}`" > <img class="rounded-full size-12 flex-0" @@ -328,11 +328,6 @@ let currentLLMId = null; -const getAnswerById = async (historyId: string) => { - return await GetHistoryAnswer({ - history_id: historyId, - }); -}; const sendChatMessage = async (content: ChatContent = messageContent.value, cb?: any, isCallExtParams?: any) => { if (!content?.values || isTalking.value || chatListLoading.value) return; -- Gitblit v1.9.3