1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | 前端 template: columns: [ { title: '序号', width: '60px', required: true, dataIndex: 'no', scopedSlots: { customRender: 'no' }, align: 'center', ellipsis: true, }] <div slot="no" slot-scope="text, record, index"> {{ (pagination.page - 1) * pagination.pageSize + index + 1 }} </div> data: pagination: { pageSize: 10, ...pagination }, 后端请求: this.pagination = Object.assign({}, this.pagination, { page: data?.page, pageSize: data?.size, total: data?.total, current: data?.page }); |
声明: 本文采用 BY-NC-SA 协议进行授权 | WEB开发分享
转载请注明转自《antdui vue a-table 序号功能》