tl-table对合计行进行合并
作者:互联网
<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) },
标签:el,style,合并,none,cell,tl,table,display 来源: https://www.cnblogs.com/lys597/p/15950442.html