方式一
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) {
if (rowIndex == 0) {
return {
rowspan: 1,
colspan: 3,
};
} else if (columnIndex === 2 || columnIndex === 3) {
return {
rowspan: 0,
colspan: 0,
};
}
方式二
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) {
if (rowIndex == 0) {
return {
rowspan: 3,
colspan: 1,
};
} else if (rowIndex === 1 || rowIndex === 2) {
return {
rowspan: 0,
colspan: 0,
};
}
方式三
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) {
if (rowIndex == 0) {
return {
rowspan: 2,
colspan: 1,
};
} else if (rowIndex === 1) {
return {
rowspan: 0,
colspan: 0,
};
}
if (rowIndex == 2) {
return {
rowspan: 2,
colspan: 1,
};
} else if (rowIndex === 3) {
return {
rowspan: 0,
colspan: 0,
};
}
}
},