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; }

posted @ 2020-09-10 10:50  xujing123  阅读(1185)  评论(0编辑  收藏  举报