在做账单需求时常会出现以下两种情况
一、取两位小数且打千分号
<h4>{{item.currencyDesc}} {{item.cost.toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,')}}</h4>
二、仅打千分号
<h4>{{item.usageQuantity.toLocaleString()}}</h4>
在做账单需求时常会出现以下两种情况
一、取两位小数且打千分号
<h4>{{item.currencyDesc}} {{item.cost.toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,')}}</h4>
二、仅打千分号
<h4>{{item.usageQuantity.toLocaleString()}}</h4>