当前位置:网站首页>Add a self incrementing sequence number to the antd table component
Add a self incrementing sequence number to the antd table component
2022-07-07 11:09:00 【Have a good time I】
The complete code is as follows :
<a-table :columns="columns" :data-source="students" :pagination="false" rowKey="id" @change="handleTableChange">
<div slot="num" slot-scope="text, record, index">{
{
(currentPage - 1) * pageSize + (index + 1) }}</div>
<div slot="action" slot-scope="text, item">
<a-button type="link" :disabled="detail.status === 2" @click="handleDel(item)"> Delete </a-button>
<a-button
v-if="detail.type === 1"
type="link"
@click="pathTo('/classroom/flow/' + detail.id + '/' + item.id)"
>
Assembly line </a-button
>
</div>
</a-table>
const columns = [
{
title: ' Serial number ',
scopedSlots: {
customRender: 'num' }
},
{
title: ' Student number ',
dataIndex: 'no',
align: 'center',
filters: [
{
text: ' Ascending ', value: 'no asc' },
{
text: ' Descending ', value: 'no desc ' }
],
filterMultiple: false,
filteredValue: filteredInfo.no || null
},
{
title: ' full name ',
dataIndex: 'name',
align: 'center',
filters: [
{
text: ' Ascending ', value: 'name asc' },
{
text: ' Descending ', value: 'name desc ' }
],
filterMultiple: false,
filteredValue: filteredInfo.name || null
},
{
title: ' operation ',
align: 'center',
scopedSlots: {
customRender: 'action' }
}
]
From which Paging consecutive auto increment sequence number as follows :
<div slot="num" slot-scope="text, record, index">{
{
(currentPage - 1) * pageSize + (index + 1) }}</div>
Every page from 1 Start
边栏推荐
- Monai version has been updated to 0.9. See what new functions it has
- From pornographic live broadcast to live broadcast E-commerce
- When do you usually get grades in the soft exam? Online pedaling?
- 2022.7.6DAY598
- Deep understanding of Apache Hudi asynchronous indexing mechanism
- Idea shortcut keys
- 【推薦系統 01】Rechub
- Bookmarking - common website navigation for programmers
- [pytorch 07] hands on deep learning chapter_ Preliminaries/ndarray exercises hands-on version
- 在线硬核工具
猜你喜欢
seata 1.3.0 四种模式解决分布式事务(AT、TCC、SAGA、XA)
Transaction rolled back because it has been marked as rollback only
Seata 1.3.0 four modes to solve distributed transactions (at, TCC, Saga, XA)
【OneNote】无法连接到网络,无法同步问题
[OneNote] can't connect to the network and can't sync the problem
[untitled]
Is the soft test intermediate useful??
PHP \ newline cannot be output
[untitled]
【pyqt】tableWidget里的cellWidget使用信号与槽机制
随机推荐
Multithreaded application (thread pool, singleton mode)
Template initial level template
IDEA快捷键大全
2022.7.6DAY598
seata 1.3.0 四種模式解决分布式事務(AT、TCC、SAGA、XA)
What does intermediate software evaluator test
JSON format query of MySQL
Simple and easy to modify spring frame components
Records on the use of easyflash v3.3
Mysql的json格式查询
Which securities company is the best and safest to open an account for the subscription of new shares
A simple example of delegate usage
Verilog 实现数码管显视驱动【附源码】
【C#】WinForm运行缩放(变糊)的解决方法
[untitled]
Project ERROR: Unknown module(s) in QT: core gui
“梦想杯”2017 年江苏省信息与未来小学生夏令营 IT 小能手 PK 之程序设计试题
[système recommandé 01] rechub
Hash / (understanding, implementation and application)
SQL Server 知识汇集9 : 修改数据