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>

element-ui合并行或列的计算方法

element-ui table :span-method(行合并)

posted @ 2018-09-27 09:42  叶子玉  阅读(3302)  评论(0编辑  收藏  举报