如问题所说,我需要获取到当前的渲染到的行数来动态绑定不同的label以及prop,所以在渲染时该怎么获取到当前的行数呢?
scope.$index可以获取当前行数,从0开始
<el-table-column>
<template slot-scope="scope">
<div v-if="scope.$index === 1">内容</div>
</template>
</el-table-column>
当前渲染行数用v-for里的下标不行吗v-for=(item,index) in data 。index就是下标