Record it Writing method of form serial number
<el-table :data="tableData" border v-loading="listLoading"> <el-table-column
label=" Serial number " align="center" width="70"> <template slot-scop="scope"><span>{{scope.
$index+(pageNum - 1) * pageSize + 1}}</span></template> </el-table-column> </el-
table>
stay data return Defined in
data(){ return { pageNum: '', pageSize: '', } }
Callback in request data
this.pageNum = res.data.pageNum, this.pageSize = res.data.pageSize,
If you save it You can use the following method

Add an ordinal field to the callback in the request data
// res.data.pageNum Current page // res.data.pageSize Number of current pages for(let i = 0; i < res.data
.list.length; i++){ console.log(res.data.list[i]) res.data.list[i].xuhao = i + (
res.data.pageNum - 1) * (res.data.pageSize) + 1 }

Technology