From 80cf32a0b620fda48ad551a28e9b93f977c94d7e Mon Sep 17 00:00:00 2001 From: suzmii Date: Wed, 2 Sep 2026 18:23:38 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B3=A5=E7=82=B9?= =?UTF-8?q?=E7=B4=A7=E5=87=91=E6=98=BE=E7=A4=BA=E5=90=91=E4=B8=8A=E8=88=8D?= =?UTF-8?q?=E5=85=A5?= 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 f5e56b534..cc18f5669 100644 --- a/packages/shared/src/utils/format.ts +++ b/packages/shared/src/utils/format.ts @@ -4,7 +4,7 @@ export function formatMudPointCount(value: number, compact = false) { return `${(normalizedValue / 100_000_000).toFixed(1)}亿`; } if (compact && normalizedValue >= 10_000) { - return `${(normalizedValue / 10_000).toFixed(1)}万`; + return `${(Math.floor(normalizedValue / 1_000) / 10).toFixed(1)}万`; } return normalizedValue.toLocaleString('zh-CN'); } -- 2.52.0 From a71bdd54fd40d2f924841f74383be020e296555c Mon Sep 17 00:00:00 2001 From: suzmii Date: Wed, 2 Sep 2026 18:34:58 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=A1=A5=E9=BD=90=E4=BA=BF=E5=8D=95?= =?UTF-8?q?=E4=BD=8D=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)}万`; -- 2.52.0