vue 常用过滤器

786 阅读1分钟

数字三位数分割

thousandPoints(value) {
    if (!value) return 0;
    return value.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,');
},