The problem of index calculation on the second page of element ui table

The sequence number of the second page of the

element ui table does not start with 6. I don"t know why index recalculated

again.
Apr.05,2021

pagination is equivalent to a new set of data for each page. Of course, starting from 1 with your own, just recalculate it yourself

<el-table-column
   type="index"
   :index="getIndex"
   fixed
   width="80">
 </el-table-column>
 
 data () {
   return {
     currentPage: 1,
     perPage: 10,
   }
 }
 
 getIndex (index) {
   return (this.currentPage - 1) * this.perPage + index + 1
 }

that's the line number. Who knew you were going to page it.

    <el-table-column
      type="index"
      :index="indexMethod">
    </el-table-column>
indexMethod(index) {
        return index + this.page*this.pageSize;
      }
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3db15-2c3cb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3db15-2c3cb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?