Vue el-tal表格合并

多列合并

spanMethod ({ rowIndex, columnIndex }) {
      if (rowIndex == this.tableData.length - 1 || rowIndex == this.tableData.length - 2) { //倒数第一行和倒数第二行
        if (columnIndex === 1) {   //第二列
          return [1, 5];           //合并2-6列
        } else if (columnIndex === 2 || columnIndex === 3 || columnIndex === 4 || columnIndex === 5) { //把3,4,5,6列删除掉,否则数据会往后退
          return [0, 0];
        }
      }
    }
原文地址:https://www.cnblogs.com/wrxblog/p/14872044.html