element表格设置序号

【element表格设置序号】1.在template中


2.在方法中
// 添加序号 this.tableData.map((item, index) => { item.index = this.tableListQuery.limit * (this.tableListQuery.page - 1) + (index + 1); if (index === 0) { this.curStartTerIndex = this.tableListQuery.limit * (this.tableListQuery.page - 1) + (index + 1); } if (index === this.tableData.length - 1) { this.curEndTerIndex = this.tableListQuery.limit * (this.tableListQuery.page - 1) + (index + 1); } return item; });


    推荐阅读