<template>
<div class="bg_row">
<div class="left">代办总额</div >
<div class="right">{{toThousands(totalRes)}} 元</div >
</div >
<br/>
</template>
methods: {
// 处理金额的千分位符
toThousands(num) {
var num = (num || 0).toString(),
result = '';
while (num.length > 3) {
result = ',' + num.slice(-3) + result;
num = num.slice(0, num.length - 3);
}
if (num) {
result = num + result;
}
return result;
},
}