vue中使用elementui的表格展开的属性 type=“expand” 没有数据的不显示展开按钮,有数据才会显示
<el-table :default-expand-all="true" :row-class-name="getRowClass"></el-table> getRowClass:function(row,rowIndex){ if(row.row.childMe
·
<el-table
:default-expand-all="true"
:row-class-name="getRowClass">
</el-table>
getRowClass:function(row,rowIndex){
if(row.row.childMessageTypeUserRnVos.length==0){ //判断当前行是否有子数据
return 'row-expand-cover'
}
}
css
.row-expand-cover td:last-child .el-icon-arrow-right{visibility: hidden;}
更多推荐
已为社区贡献6条内容
所有评论(0)