注意点:
1、在customRender中自定义合并行/列的规则;
2、rowSpan合并行,colSpan合并列,值为合并的行数/列数;当值为0时,表示不渲染;
3、内置按钮的点击事件用:οnclick={}
<template>
<a-table :dataSource="datas" :columns="columns">
<span slot="serialNo" slot-scope="text, record, index">{
{ index + 1 }}</span>
</a-table>
</template>
<script>
data() {
this.columns = [
{
title: '序号',
scopedSlots: { customRender: 'serialNo' },
width: '100px',
},
{
title: '姓名',
dataIndex: 'name',
width: '100px',
},
{
title: '班级',
dataIndex: 'class',
width: '100px',
},
{
title: '操作',