尝试了多次,在customRender的函数中用不了this,用slot来代替解决了
html:
<a-table :columns="columns">
<span slot="serial" slot-scope="text,record,index">
{
{
(ipagination.current-1)*ipagination.pageSize+index+1}}
</span>
</a-table>
js :
columns: [
{
title: '#',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: "center",
scopedSlots: {
customRender: 'serial'}
}
],