当前位置: 代码迷 >> 综合 >> element table序号的几种方式
  详细解决方案

element table序号的几种方式

热度:82   发布时间:2024-03-09 16:19:33.0
<el-table-column label="排名" width="100" align="center"><template slot-scope="scope">{
   {scope.$index + 1 > 9 ? scope.$index + 1 : "0" + (scope.$index + 1)}}</template></el-table-column>
<div class="stream-goods table mtmg"><el-table:row-class-name="rowClassName"><el-table-columnlabel="序号"align="center"prop="xh"width="50"></el-table-column>rowClassName({ row, rowIndex }) {row.xh = rowIndex + 1;if (row.xh < 10) {row.xh = "0" + row.xh;}
},

 

这两个都是个位数补零的序号排列 

  相关解决方案