iview Add a filter attribute to the [Feature Request]Tree component

ss2ws0br  于 2022-10-24  发布在  其他
关注(0)|答案(1)|浏览(269)

What problem does this feature solve?

现在项目需求需要在tree组件里面的数据根据字段搜索对应的数据,自己实现其实也很简单,但是这个还得自己重新封装一个新组件出来,建议直接放入Tree组件里作为可选属性配置

What does the proposed API look like?

props里面添加一个filter字段,传入正则表达式或function来过滤出需要的数据

gmxoilav

gmxoilav1#

Translation of this issue:
What problem does this feature solve ###?
Now, the project requirement needs data in the tree component to search the corresponding data based on the field, and its implementation is actually very simple. But it has to re encapsulate a new component. It is recommended to put it directly into the Tree component as an optional attribute configuration.
What does the proposed API look ### like?
Add a filter field in props to pass the regular expression or function to filter out the required data

相关问题