From 3ba18e8ef230afafe16d69c99b4656419ffedc65 Mon Sep 17 00:00:00 2001 From: ArvinLovegood Date: Tue, 8 Jul 2025 10:50:04 +0800 Subject: [PATCH] =?UTF-8?q?feat(stock):=E4=BC=98=E5=8C=96=E8=82=A1?= =?UTF-8?q?=E7=A5=A8=E8=BF=B7=E4=BD=A0=E5=9B=BE=E5=88=B7=E6=96=B0=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 Stock 组件中添加 lastPrice 属性,传递当前价格给 StockSparkLine 组件 - 在 StockSparkLine 组件中接收 lastPrice 属性,并使用它来更新 K 线图数据 - 优化 StockSparkLine 组件的渲染逻辑,使用 onMounted 和 watchEffect --- frontend/src/components/stock.vue | 2 +- frontend/src/components/stockSparkLine.vue | 28 ++++++++++++++-------- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/frontend/src/components/stock.vue b/frontend/src/components/stock.vue index b282f38..eac9759 100644 --- a/frontend/src/components/stock.vue +++ b/frontend/src/components/stock.vue @@ -1815,7 +1815,7 @@ function searchStockReport(stockCode) { - + diff --git a/frontend/src/components/stockSparkLine.vue b/frontend/src/components/stockSparkLine.vue index 29a5fe8..78f9a55 100644 --- a/frontend/src/components/stockSparkLine.vue +++ b/frontend/src/components/stockSparkLine.vue @@ -1,8 +1,8 @@