ElementUI表格序号翻页后重置的解决办法
在使用element的时候表格上面加个序号栏,但是选择下一页的时候序号会被重置
解决办法如下:
<el-table-column
type="index"
:index="count"
label="序号"
align="center"
width="80"/>
给index价格count方法
在methods方法写入
// 计算表格序号
count(index) {
return (this.listQuery.pageNum - 1) * this.listQuery.pageSize + index + 1
},
这样就搞定啦!!!
效果图:
## 标题