钱数三位数添加逗号

toThousandFilter(num) {
      return (+num || 0).toFixed(2).replace(/d{1,3}(?=(d{3})+(.d*)?$)/g, '$&,')
    }
原文地址:https://www.cnblogs.com/zhpblog/p/14859209.html