element-UI的el-table添加序号时所有分页的序号都是从1开始的解决方法

       <el-table-column
       type="index"
       label="序号"
       width="50">
       <template scope="scope">
        <span>{{offset * limit + scope.$index + 1}}</span>
      </template>
     </el-table-column>

主要是在原来的基础上加上以下代码

       <template scope="scope">
        <span>{{offset * limit + scope.$index + 1}}</span>
      </template>
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章