修复泥点紧凑显示向上舍入
将万单位紧凑显示改为按一位小数向下截断 保持低于一万和非紧凑模式的显示逻辑不变
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user