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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM