当前位置:网站首页>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
边栏推荐
猜你喜欢
Use load_ decathlon_ Datalist (Monai) fast loading JSON data
Arduino board description
單調性約束與反單調性約束的區別 monotonicity and anti-monotonicity constraint
Mendeley -- a free document management tool that automatically inserts references into papers
What are the test preparation materials and methods for soft exam information processing technicians?
Simple and easy to modify spring frame components
When do you usually get grades in the soft exam? Online pedaling?
What are the contents of the intermediate soft test, the software designer test, and the test outline?
uniCloud
Find the greatest common divisor and the least common multiple (C language)
随机推荐
Records on the use of easyflash v3.3
Introduction to shell programming
JSON format query of MySQL
2022.7.6DAY598
Cmake learning manual
Online hard core tools
Go slice comparison
Use of dotween
Operation method of Orange Pie orangepi 4 lts development board connecting SATA hard disk through mini PCIe
Opencv installation and environment configuration - vs2017
Compile QT project script with qmake
在线硬核工具
滚动踩坑--UNI_APP(八)
请问申购新股哪个证券公司开户是最好最安全的
Rolling puddle Uni_ App (VIII)
POJ1821 Fence 题解报告
[untitled]
What are the test preparation materials and methods for soft exam information processing technicians?
seata 1.3.0 四種模式解决分布式事務(AT、TCC、SAGA、XA)
Ping tool ICMP message learning