element-ul table 合并行列
<el-table :data="returnList" border :span-method="objectSpanMethod">
1.
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) {
const _row = this.rowSpans[rowIndex];
const _col = _row === 0 ? 0 : 1;
return {
rowspan: _row,
colspan: _col,
};
}
// if (rowIndex % _row === 0) {
// return {
// rowspan: _row,
// colspan: 1,
// };
// } else {
// return {
// rowspan: 0,
// colspan: 0,
// };
// }
},
2.
if (columnIndex === 0) {
const _row = this.rowSpans[rowIndex];
const _col = _row === 0 ? 0 : 1;
return {
rowspan: _row,
colspan: _col,
};
}