当前位置:   article > 正文

element table序号的几种方式_element table 序号

element table 序号
  1. <el-table-column label="排名" width="100" align="center">
  2. <template slot-scope="scope">{{
  3. scope.$index + 1 > 9 ? scope.$index + 1 : "0" + (scope.$index + 1)
  4. }}</template>
  5. </el-table-column>
  1. <div class="stream-goods table mtmg">
  2. <el-table
  3. :row-class-name="rowClassName"
  4. >
  5. <el-table-column
  6. label="序号"
  7. align="center"
  8. prop="xh"
  9. width="50"
  10. ></el-table-column>
  11. rowClassName({ row, rowIndex }) {
  12. row.xh = rowIndex + 1;
  13. if (row.xh < 10) {
  14. row.xh = "0" + row.xh;
  15. }
  16. },

 

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

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家自动化/article/detail/117989?site
推荐阅读
相关标签