chore: depoly model ux

This commit is contained in:
jialin
2024-08-09 10:26:46 +08:00
parent a04773d487
commit ab8483fc42
18 changed files with 568 additions and 49 deletions
+13
View File
@@ -155,3 +155,16 @@ export const platformCall = () => {
isWin: isWin()
};
};
export const formatNumber = (num: number) => {
if (!num) {
return '0';
}
if (num >= 1000000) {
return (num / 1000000).toFixed(2) + 'M';
} else if (num >= 1000) {
return (num / 1000).toFixed(2) + 'k';
} else {
return num.toString();
}
};