element-table 隐藏行

      <el-table
        ref="multipleTable"
        :data="vehicleList"
        border
        :show-header="true"
        max-height="180"
        @selection-change="handleSelectionChange"
        :row-class-name="rowClassName" //回调行 的样式,通过这个回调放法控制隐藏显示
      >
      </el-table>
    //每一行的回调方法
    rowClassName: function ({ row }) {
      if (!this.belongType) {
        return;
      }
      if (row.type !== this.belongType) {
        return "showRow";
      }
    },
::v-deep .showRow {
  display: none;
}
posted @ 2022-04-21 10:58  梓言  阅读(1373)  评论(0)    收藏  举报