搜索结果过滤器重置时只给选定列添加

This commit is contained in:
buvta
2020-11-11 08:29:12 +08:00
parent bb537d789d
commit 05d71a62aa

View File

@@ -357,7 +357,9 @@ export default {
const otherColumns = this.$refs.searchResultTable.columns.filter(col => col.id !== this.currentColumn.id)
otherColumns.forEach(col => { col.filterable = false })
} else {
this.$refs.searchResultTable.columns.forEach(col => { col.filterable = true })
const filterLabels = ['源站', '类型', '地区', '语言']
const columns = this.$refs.searchResultTable.columns.filter(col => filterLabels.includes(col.label))
columns.forEach(col => { col.filterable = true })
}
},
siteClick (siteName) {