Rowspan是单元格跨行操作,colspan是单元格跨列操作.
columns: [[{ title: '总',sortable: true,width:120,colspan:2}
,{field:'normal_amt1', title: '分', width:120, rowspan:1,sortable: true }
,{field:'normal_amt2', title: '分', width:120, rowspan:1,sortable: true }
]]
效果如下:
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/95b1044c580cb14b0a84de2e644b5a5f.png)
Rowspan:
<table border="1">
<tr>
<th>姓名</th>
<th>年龄</th>
<th rowspan="3">中国</th>
</tr>
<tr>
<td>张三</td>
<td>18</td>
</tr>
<tr>
<td>李四</td>
<td>20</td>
</tr>
</table>
效果如下:
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/a86d8f94a4b292cad33d36f4dc0eda51.png)
Colspan:
<table border="1">
<tr>
<td colspan="2">班级</td>
</tr>
<tr>
<th>一班</th>
<th>二班</th>
</tr>
</table>
效果如下:
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/ef7be0ba3904af40c99157eac57e11c2.png)