vue element表格多选框根据条件显示隐藏

分手后的思念是犯贱 2022-02-24 07:08 1072阅读 0赞

利用Table Attributes 属性里面的 cell-class-name 属性,添加单元格的class
class属性display:none

  1. <template>
  2. <el-table :cell-class-name="checkbox" ... >
  3. </el-table>
  4. </template>
  5. <script> methods: { checkbox(row){ if(row.row.checkStatus === 1&&row.columnIndex === 0){ return "mycell" } } </script>
  6. <style> .mycell.el-checkbox__input { display: none } </style>

在这里插入图片描述

发表评论

表情:
评论列表 (有 0 条评论,1072人围观)

还没有评论,来说两句吧...

相关阅读

    相关 element+vue表格分页问题

    我今天遇到了这样的一个问题,表格多选时,从当前页多选之后,到下一页再选择,回到前一页的时候,前一页选择过的被清空了。这时需要配置一些东西: ![在这里插入图片描述][202