修复泥点紧凑显示向上舍入
Project CI / Repository checks (pull_request) Successful in 2m40s
Project CI / Backend tests (pull_request) Successful in 6m25s
Project CI / Native shell tests (pull_request) Successful in 16m50s
Project CI / Frontend tests (pull_request) Successful in 3m29s

将万单位紧凑显示改为按一位小数向下截断

保持低于一万和非紧凑模式的显示逻辑不变
This commit is contained in:
2026-09-02 18:23:38 +08:00
parent 97b0231afc
commit 80cf32a0b6
+1 -1
View File
@@ -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');
}