// 千分位
export const numFormat = (num) => {
if (num.toString().indexOf('.') !== -1) {
let b = num.toLocaleString();
return b;
} else {
let c = num.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,');
return c;
}
};
数值修改为千分位显示
最新推荐文章于 2024-06-26 14:13:32 发布