vue中el-table翻页序号连续

亲测一个很好的方法,记录一下留用。。。。

template中:


methods中:

methods: {
    table_index(index){
        return (this.currentPage-1) * this.pageSize + index + 1
}

(其中:this.currentPage为当前页码,this.pageSize为每页数据条数。)

你可能感兴趣的:(vue爬坑之旅)