国内机械加工企业排名长春seo整站优化
通过给 type=index 的列传入 index 属性,可以自定义索引。该属性传入数字时,将作为索引的起始值。也可以传入一个方法,它提供当前行的行号(从 0 开始)作为参数,返回值将作为索引展示。
<el-table:data="tableData"style="width: 100%"><el-table-columntype="index":index="indexMethod"></el-table-column></el-table>
</template><script>export default{return{//查询条件listQuery:{page:1,//当前页limit:20,//每页显示的数据量}},methods: {indexMethod(index) {return (this.listQuery.page=-1)*this.listQuery.limit+index+1},}}
</script>