ant design vue实现表格序号递增展示~

1、代码实例 

//current当前页数
//pageSize每页记录数
const current = ref(1); //当前页数
const pageSize = ref(10); //每页记录数
const columns = [
    {
      title: '序号',
      width: 100,
      customRender: ({ index }) => `${index + (current.value - 1) * pageSize.value + 1}`,
      align: 'center',
      fixed: 'left',
    }
]

2、效果图 

猜你喜欢

转载自blog.csdn.net/m0_62626838/article/details/142478037