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

文章来源:https://www.jianshu.com/p/c064db86c559?utm_campaign=maleskine&utm_content=note&utm_medium=seo_notes&utm_source=recommendation

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-04-30
  • 2022-01-11
  • 2022-12-23
  • 2022-02-25
  • 2022-12-23
  • 2021-06-30
猜你喜欢
  • 2021-05-24
  • 2022-12-23
  • 2021-06-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案