<el-table
ref="table"
:data="showTableData"
:show-summary="true"
:span-method="arraySpanMethod"
border
>
.....
</el-table>
arraySpanMethod() {
//table合计行合并单元格
setTimeout(() => {
if (this.$refs.table.$el) {
let current = this.$refs.table.$el
.querySelector('.el-table__footer-wrapper')
.querySelector('.el-table__footer')
let cell = current.rows[0].cells
cell[1].style.display = 'none'
cell[2].style.display = 'none'
cell[3].style.display = 'none'
cell[4].style.display = 'none'
cell[5].style.display = 'none'
cell[0].colSpan = '6'
}
}, 50)
},