Elementui:el-table 结合 filters 实现表头的筛选过滤功能
<el-table
v-if="show"
v-loading="listLoading"
:data="list"
border
fit
highlight-current-row
style="width: 100%"
class="assetTable"
:key="tableKey"
@filter-change="filterChange"
@selection-change="handleSelectionChange"
>
filterChange(filters) {
if (!filters) return;
if (filters["locationJointName"]) {
this.locationId= filters["locationJointName"][0];
}
if (filters["brand"]) {
this.manufacturerId = filters["brand"][0];
}
},