From a456e9ceab77a5061630468c4e476be825bfcbf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E6=9D=B0?= Date: Sun, 17 Aug 2025 20:09:17 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=90=9C=E7=B4=A2=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E5=90=8E=EF=BC=8C=E5=8E=86=E5=8F=B2=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E5=BC=B9=E5=87=BA=E7=9A=84=E9=97=AE=E9=A2=98=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/components/HistoryRecord.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/views/components/HistoryRecord.vue b/src/views/components/HistoryRecord.vue index dd19c64..c3a2620 100644 --- a/src/views/components/HistoryRecord.vue +++ b/src/views/components/HistoryRecord.vue @@ -503,11 +503,13 @@ const getHistoryList = async (params) => { emotionTirstFlag = false; } - if (props.currentType == "AIchat") { + // 只在首次加载时根据chatStore状态设置折叠状态,避免搜索后自动弹出历史记录 + if (props.currentType == "AIchat" && chatFirstFlag) { isCollapsed.value = !chatStore.aiChatCall; - } else { + } else if (props.currentType == "AiEmotion" && emotionTirstFlag) { isCollapsed.value = !chatStore.aiEmotionCall; } + // 非首次调用时保持当前折叠状态不变 // 1. 筛选置顶记录 let topList = remainingRecords.filter((record) => record.isTop === 1);