vue 表单添加一列序号
template内写:<el-table-column label="序号" prop="" width="100" align="center"><template slot-scope="scope"><span v-text="getIndex(scope.$index)"> </span></template></el-ta
·
template内写:
<el-table-column label="序号" prop="" width="100" align="center">
<template slot-scope="scope">
<span v-text="getIndex(scope.$index)"> </span>
</template>
</el-table-column>
methods内写:
getIndex($index) {
return (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1
},
实现:
更多推荐
已为社区贡献1条内容
所有评论(0)