data:这边的判断是添加千级逗号分隔,可以去掉
filters: {
// 数量过滤
/* 万*/
nubFilter(num, type) {
console.log(num, type, '!!!!!')
var numm = num % 100000000
var nub = parseInt(numm / 10000)
if (nub > 999 && type === '1') {
nub = ((nub + '').replaceAll(/\d{1,3}(?=(\d{3})+$)/g, '$&,'))
}
return nub
},
/* 亿*/
nubFilters(num, type) {
var nub = parseInt(num / 100000000)
if (nub > 999 && type) {
nub = ((nub + '').replaceAll(/\d{1,3}(?=(\d{3})+$)/g, '$&,'))
}
return nub
},
/* 条*/
nubFilterss(num, type) {
var numm = num % 100000000
var nub = numm % 10000
if (nub > 999 && type) {
nub = ((nub + '').replaceAll(/\d{1,3}(?=(\d{3})+$)/g, '$&,'))
}
return nub
}
},
标签
{{ allCenterData.insideShareValue|nubFilter('1') }}