🌈 style: 优化类型

This commit is contained in:
alger
2024-05-21 11:01:23 +08:00
parent e4c1f855fb
commit c37ad07f93
9 changed files with 15 additions and 15 deletions
+2 -2
View File
@@ -24,8 +24,8 @@ export const secondToMinute = (s: number) => {
};
// 格式化数字 千,万, 百万, 千万,亿
export const formatNumber = (num: any) => {
num *= 1;
export const formatNumber = (num: string | number) => {
num = Number(num);
if (num < 10000) {
return num;
}