<el-table stripe ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%">
<el-table-column label="注册资金" prop="registeredCapital" :formatter="stateFormat" show-overflow-tooltip></el-table-column>
</el-table>
methods: {
//格式化金额
stateFormat(row, column, cellValue) {
if(cellValue === ''){
cellValue += '';
}
else{
cellValue += ' 元';
}
if (!cellValue.includes('.')) cellValue += '.';
return cellValue
.replace(/(\d)(?=(\d{3})+\.)/g, function ($0, $1) {
return $1 + ',';
})
.replace(/\.$/, '');
},
}