element-ui的table表格通过子表数据,进行展示左侧展开箭头
1:设置el-table的class
<el-table :data="flowTableList" :row-class-name="getRowClass">
<el-table-column label="当前环节" prop="currentTacheName">
</el-table-column>
</el-table>
2:js设置getRowClass方法处理
public getRowClass(scope: any, index: string) {
if (!scope.row.sonItemDTOList || scope.row.sonItemDTOList.length <= 0) {
return 'hide-row';
} else {
return 'show-row';
}
}
3: style定义hide-row
::v-deep {
.hide-row {
.el-table__expand-column {
visibility: hidden !important;
}
}
}

浙公网安备 33010602011771号