标签:方法 strip dex rop type 情况 规则 index code
<el-table :data="roleData" border stripe highlight-current-row :height="autoHeightRow" :row-class-name="rowClassName" @row-click=‘handleRowClickRole‘ ref="RoleTable"> <el-table-column type="index" label="序号" width="55"> </el-table-column> <el-table-column prop="RuleName" label="规则名称" width="180"> </el-table-column> </el-table>
rowClassName({row, rowIndex}) { //把每一行的索引放进row row.index = rowIndex;
console.log(row) },
一般情况下‘row-click‘方法只能获取该行数据,为了能获取到该行的行数index,用row-class-name给每一行都加上index,即可获取index
标签:方法 strip dex rop type 情况 规则 index code
原文地址:https://www.cnblogs.com/fujijill/p/9353859.html