footer={()=>{
let data2 = [];
let obj = {};
for (let i = 0; i < getEnhancerColumn.length; i++) {
obj[getEnhancerColumn[i]['dataIndex']] = 0;
for (let j = 0; j < data.length; j++) {
if (data[j][getEnhancerColumn[i]['dataIndex']]) {
if (getEnhancerColumn[i]['key'].indexOf('@') != -1) {
obj[getEnhancerColumn[i]['dataIndex']] += Number(data[j][getEnhancerColumn[i]['dataIndex']])
} else {
if (i == 0) {
obj[getEnhancerColumn[i]['dataIndex']] = '合计'
} else {
obj[getEnhancerColumn[i]['dataIndex']] = ''
}
}
antd给table添加footer合计(ant design3*版本)
最新推荐文章于 2023-04-24 10:41:35 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)