element-ui table 前端渲染序号 index

1、前端渲染table 序号

2、使用element ui

http://element-cn.eleme.io/#/zh-CN/component/table#zi-ding-yi-suo-yin

即‘通过给 type=index 的列传入 index 属性,可以自定义索引。’来实现。

<el-table-column label="序号" type="index" show-overflow-tooltip width="50">
      </el-table-column>

不需要后端传值。

原文地址:https://www.cnblogs.com/mengfangui/p/9896632.html