1.作用域插槽
columns:[{title: '编号',scopedSlots: { customRender: 'indexRender' },align:'center'}],
2.表格中
<a-table :columns="columns" :data-source="list" rowKey="id" :pagination="pagination" @change="handleTableChange"><span slot="indexRender" slot-scope="text,record,index">{{ (pagination.current - 1) * pagination.pageSize + index + 1 }}</span></a-table>
3.效果