html部分
<el-table :data="tableData" :row-class-name="leftIcon">
<el-table-column type="expand">
<template slot-scope="props">
<el-table :data="props.children"></el-table>
</template>
</el-table-column>
</el-table>
js部分
methods:{
leftIcon({row}){
if(!row.children || row.children.length == 0){
return 'icon-display'
}
}
}
css部分
.icon-display .el-table__expand-icon{
display:none !important;
}