前三位加逗号
export const formatMoney = (str) => { str = Number(str).toFixed(2); return str.replace(/\B(?=(\d{3})+($|\.))/g, ','); };
export const formatMoney = (str) => { str = Number(str).toFixed(2); return str.replace(/\B(?=(\d{3})+($|\.))/g, ','); };
转载于:https://www.cnblogs.com/WeiRuifeng/p/8945037.html
427
448
331
2226

被折叠的 条评论
为什么被折叠?