第一种:每一页都从1开始
const reSendColumns = [
{
title: '序号',
width: '10%',
render:(text,record,index)=> `${index+1}`,
},
{
title: '消息ID',
dataIndex: 'messageID',
width: '20%',
},
第二种:分页连续自增序号
const columns = [
{
title: '序号',
width: '5%',
render:(text,record,index)=> {
return(
`${(this.state.page-1)*(this.state.pageSize)+(index+1)}`,//当前页数减1乘以每一页页数再加当前页序号+1
)
}
},
{
title: '消息ID',
dataIndex: 'messageId',
key: 'messageId',
width: '8%',
},