Pre Merge pull request !38 from DH/master

pull/38/MERGE
DH 2024-01-29 01:26:41 +00:00 committed by Gitee
commit 6da8ee7920
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 1 additions and 1 deletions

View File

@ -56,7 +56,7 @@ export function formatNum(prefix, type, num) {
// 例如100 - 199 显示为 100+
// 9000 - 9999 显示为 9000+
let pow = Math.pow(10, `${num}`.length - 1);
return `${prefix}${(num / pow) * pow}+`;
return `${prefix}${Math.round((num / pow) * pow)}+`;
}
// 格式化价格