方式一

table 合并表格_javascript

 

 



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


方式二

table 合并表格_javascript_02

 

 



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


 方式三

table 合并表格_.net_03



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


 table 合并表格_javascript_04