// An highlighted block
<a-table
:columns="sxColumn"
:data-source="data"
:rowKey="(record,index)=>{return index}"
:pagination="pagination"
:scroll="{ y: 800 }"
>
</a-table>
export default {
data: function () {
return {
pagesize: 10,
current:1,
pagination: {
showSizeChanger: true,
defaultPageSize: 10,
pageSize: 10,
showQuickJumper: true,
showTotal: (total, range) => `显示${range[0]}-${range[1]}条,共有 ${total}条`,
// defaultCurrent: 1, // 默认当前页数
onChange: (current, size) => {
this.current=current,
this.pagesize=size
},
},
sxColumn: [
{
title: '序号',
width: '5%',
align: 'center',
customRender: (text, record, index) => `${(this.current - 1) * (this.pagesize) + (index + 1)}`
}
]
}
}
}
Ant Design of Vue Table 第2页序号连续增加
最新推荐文章于 2024-05-15 11:26:12 发布