<el-table
:data="tableData2"
:row-style="tableRowStyle"
:header-cell-style="tableTwoHeaderColor"
:span-method="objectSpanMethod"
border
style="width: 100%">
</el-table>
方法:
objectSpanMethod({ rowIndex, columnIndex }) {
if (columnIndex === 0) {
if (rowIndex % 7 === 0) {
return {
rowspan: 7,
colspan: 1
};
} else {
return {
rowspan: 0,
colspan: 0
};
}
}