需求:动态的修改合计栏的某项值的样式
在计算合计的函数中getSummaries获取要修改的哪一项的index
const littleIndex = columns.findIndex(item => item.label === '小计')
获取DOM并修改
if (document.querySelectorAll('.el-table__footer-wrapper tr>td').length > 0) {
const tables = document.querySelectorAll(
'.el-table__footer-wrapper tr>td'
)
for (let i = 0; i < tables.length; i++) {
tables[i].style.color = '#FFF'
}
tables[littleIndex].style.color = '#6CC8EC'
}