formatAmount (val) {
if (!val) return ''
let arr = val.split('-')
let formateArr = arr.map(item => {
if (item >= 10000) {
return item / 10000 + '亿元'
} else {
return item + '万元'
}
})
return formateArr.join('-')
},
formatAmount (str) {
let amountStr = ''
if (str && str.indexOf('-')) {
let amountArr = str.split('-')
amountStr = amountArr.map(x => x + '万元').join('-')
} else {
amountStr = str ? str + '万元' : ''
}
return amountStr;
},
网友评论