antd Table组件表格的序号自增

实现的方式: 在columns中序号的一列 使用render方法:(text,record,index)=>`${index+1}`,使序号+1

const columns = [

{

title: '序号',

width:80,

render:(text,record,index)=>`${index+1}`

},{

title: '门店名',

dataIndex: 'name',

},

猜你喜欢

转载自blog.csdn.net/Zeng__Yi/article/details/83144098