From a71bdd54fd40d2f924841f74383be020e296555c Mon Sep 17 00:00:00 2001 From: suzmii Date: Wed, 2 Sep 2026 18:34:58 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E9=BD=90=E4=BA=BF=E5=8D=95=E4=BD=8D?= =?UTF-8?q?=E6=B3=A5=E7=82=B9=E5=90=91=E4=B8=8B=E6=88=AA=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 让万和亿两个紧凑显示分支统一按一位小数向下截断 --- packages/shared/src/utils/format.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/shared/src/utils/format.ts b/packages/shared/src/utils/format.ts index cc18f5669..496516ddc 100644 --- a/packages/shared/src/utils/format.ts +++ b/packages/shared/src/utils/format.ts @@ -1,7 +1,7 @@ export function formatMudPointCount(value: number, compact = false) { const normalizedValue = Math.max(0, Math.round(value)); if (compact && normalizedValue >= 100_000_000) { - return `${(normalizedValue / 100_000_000).toFixed(1)}亿`; + return `${(Math.floor(normalizedValue / 10_000_000) / 10).toFixed(1)}亿`; } if (compact && normalizedValue >= 10_000) { return `${(Math.floor(normalizedValue / 1_000) / 10).toFixed(1)}万`;