From a7cff0930d820d1f1053413e4f1c2e58c0145e4e Mon Sep 17 00:00:00 2001 From: Sakurasan <26715255+Sakurasan@users.noreply.github.com> Date: Mon, 10 Aug 2026 20:56:38 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E6=A0=B8=E5=BF=83=E8=82=A1=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=20formatGain=20=E7=AC=A6=E5=8F=B7=E4=B8=80=E8=87=B4?= =?UTF-8?q?=20+=20=E8=A1=A8=E6=A0=BC=20a11y=20=E5=A2=9E=E5=BC=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude --- src/routes/core-stocks.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/routes/core-stocks.tsx b/src/routes/core-stocks.tsx index e6fb448..3364e4f 100644 --- a/src/routes/core-stocks.tsx +++ b/src/routes/core-stocks.tsx @@ -10,7 +10,7 @@ export const Route = createFileRoute("/core-stocks")({ /** 格式化涨幅,红涨绿跌 */ function formatGain(v: number | null | undefined): string { if (v == null) return "·"; - const s = v > 0 ? `+${v.toFixed(2)}%` : `${v.toFixed(2)}%`; + const s = v >= 0 ? `+${v.toFixed(2)}%` : `${v.toFixed(2)}%`; return s; } @@ -31,7 +31,7 @@ function CoreStocksPage() {
- +

核心股追踪

@@ -53,7 +53,7 @@ function CoreStocksPage() { {isLoading ? (
- ) : dates.length === 0 ? ( + ) : dates.length === 0 || stocks.length === 0 ? (
暂无数据,数据将在每日收盘后自动采集
@@ -62,13 +62,13 @@ function CoreStocksPage() { - + {dates.map((d) => ( - ))} - +
股票股票 + {d.slice(5)} 上榜上榜