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>
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章