html部分:
<el-table :row-class-name="getRowClass"
</el-table>
js部分:
getRowClass(row,rowIndex){ if(row.row.tableData.length==0){ //判断当前行是否有子数据或者根据实际情况设置
return 'row-expand-cover' } }
css部分:
/deep/ .el-table .row-expand-cover .cell .el-table__expand-icon { display: none;
}