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