From 3e8727b556439bb3ebc51ac208879bf633daa32f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E6=9D=B0?= Date: Fri, 10 Oct 2025 09:28:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=85=B6=E4=BB=96=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E4=BC=9A=E8=A7=A6=E5=8F=91=E6=83=85=E7=BB=AA=E5=A4=A7?= =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E7=9A=84=E6=9F=A5=E7=9C=8B=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E6=96=B9=E6=B3=95=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/homePage.vue | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/views/homePage.vue b/src/views/homePage.vue index f408a99..064263e 100644 --- a/src/views/homePage.vue +++ b/src/views/homePage.vue @@ -453,19 +453,19 @@ const enableInput = () => { const handleHistorySelect = (stockData) => { console.log("接收到历史记录数据:", stockData); - // 如果当前不在AiEmotion页面,切换到AiEmotion页面 - // if (activeTab.value !== 'AiEmotion') { - // setActiveTab('AiEmotion', 1); - // } - - // 等待组件渲染完成后调用addStock方法 - nextTick(() => { - if (aiEmotionRef.value && aiEmotionRef.value.addStock) { - aiEmotionRef.value.addStock(stockData); - } else { - console.error("AiEmotion组件或addStock方法不可用"); - } - }); + // 只在情绪大模型中处理历史记录选择 + if (activeTab.value === 'AiEmotion') { + // 等待组件渲染完成后调用addStock方法 + nextTick(() => { + if (aiEmotionRef.value && aiEmotionRef.value.addStock) { + aiEmotionRef.value.addStock(stockData); + } else { + console.error("AiEmotion组件或addStock方法不可用"); + } + }); + } else { + console.log("历史记录选择仅在情绪大模型中有效"); + } }; // 公告