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)
      },

 

上一篇:eBPF在网易轻舟云原生的应用实践


下一篇:入门Kubernetes-数据存储