fix : 金额格式化

This commit is contained in:
2024-06-09 17:50:49 +08:00
parent cafb0ef5bf
commit 4ed64339fa
11 changed files with 59 additions and 75 deletions

8
src/utils/changePrice.js Normal file
View File

@@ -0,0 +1,8 @@
export const toThousands = (num) => {
if(num==undefined||num==null)return '--';
const options = {
style: 'currency',
currency: 'CNY',
};
return (num).toLocaleString('zh-CN', options)
}