element [Feature Request] 关于table表头过滤所需要的filters是否可以默认从数据中自动获取到

cuxqih21  于 2022-10-23  发布在  其他
关注(0)|答案(4)|浏览(172)

Existing Component

Component Name

Table 表格

Description

关于table表头过滤所需要的filters是否可以默认从数据中自动获取到?不然如果我一个表格有很多列需要进行表头过滤的时候,我需要写很多的filters,是否可以默认

vjrehmav

vjrehmav3#

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

ie3xauqp

ie3xauqp4#

i like this
getFilter(item) {
const key = item.name;
const filterData = [];
this.tableData.forEach((item) => {
if (filterData.every((f) => f.text != item[key])) {
filterData.push({ text: item[key], value: item[key] });
}
});
return filterData;
}

:filters="getFilter(item)"

相关问题