el-table 序号

  <el-table :data="xpList" border style="width: 100%" height="500" >
    <el-table-column prop="" label="序号" :formatter="nShowIndex" width="80"></el-table-column>
    <el-table-column label="序号1" align="center" width="80">
      <template slot-scope="scope">
        {{scope.$index + 1 + page.pageSize*(page.currentPage-1)}}
      </template>
    </el-table-column>
    <el-table-column prop="name" label="姓名" width="180"></el-table-column>
    <el-table-column prop="age" label="年龄" width="120"></el-table-column>
  </el-table>

方法:

  nShowIndex(row, column, cellValue, index){
      return index + 1;
    }

el-table 序号

上一篇:如何为本地android库链接cpufeatures lib?


下一篇:1060 Are They Equal (25 分)