element-ui table type=“expand“ 无内容时 不可展开
1.首航加入 :row-class-name="getRowClass"
<el-table :data='ofStudent' style="width-100%" :row-class-name="getRowClass">
2.表格详情没有内容隐藏箭头
getRowClass(row) { if(row.row.promotionStudentVOSs.length === 0){ // promotionStudentVOSs是你子项的数组 key return 'row-expand-cover' } }
3.样式隐藏
.row-expand-cover td .el-table__expand-icon{ visibility: hidden !important; }