element-ui合并行:span-method
1 objectSpanMethod({ row, column, rowIndex, columnIndex }) { 2 if (columnIndex === 0) { 3 if (rowIndex % 2 === 0) { 4 return { 5 rowspan: 2, 6 colspan: 1 7 }; 8 } else { 9 return { 10 rowspan: 0, 11 colspan: 0 12 }; 13 } 14 } 15 }
1 <el-table :data="tableData" :span-method="objectSpanMethod" border>
本文来自博客园,作者:叶子玉,转载请注明原文链接:https://www.cnblogs.com/knuzy/p/9711466.html