From bea67b6710911a2a3173392c53837ce7fcda4836 Mon Sep 17 00:00:00 2001 From: kkfluous Date: Thu, 16 Apr 2026 22:37:14 +0800 Subject: [PATCH] =?UTF-8?q?fix(scheduling):=20remove=20decimals=20from=20k?= =?UTF-8?q?m=20display=20(1,990.2=20=E2=86=92=201,990)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/scheduling/SuggestionDetail.tsx | 2 +- src/modules/scheduling/SwapPreview.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/scheduling/SuggestionDetail.tsx b/src/modules/scheduling/SuggestionDetail.tsx index 3389d34..c1113e4 100644 --- a/src/modules/scheduling/SuggestionDetail.tsx +++ b/src/modules/scheduling/SuggestionDetail.tsx @@ -15,7 +15,7 @@ interface Props { function fmtKm(value: number): string { if (value >= 10000) return (value / 10000).toFixed(1) + '万'; - return value.toLocaleString(); + return Math.round(value).toLocaleString(); } function fmtRate(rate: number): string { diff --git a/src/modules/scheduling/SwapPreview.tsx b/src/modules/scheduling/SwapPreview.tsx index 83c6aac..28874ea 100644 --- a/src/modules/scheduling/SwapPreview.tsx +++ b/src/modules/scheduling/SwapPreview.tsx @@ -13,7 +13,7 @@ interface Props { function fmtKm(value: number): string { if (value >= 10000) return (value / 10000).toFixed(1) + '万'; - return value.toLocaleString(); + return Math.round(value).toLocaleString(); } function fmtRate(rate: number): string {