this.$refs.tree.filter
时间: 2023-08-24 20:10:06 浏览: 226
JS过滤树数据
根据提供的引用内容,问题中的`this.$refs.tree.filter`是一个方法调用,用于在`el-tree`组件中过滤节点。具体来说,`this.$refs.tree`是通过`ref`属性引用到`el-tree`组件的实例,而`filter`是`el-tree`组件提供的一个方法,用于根据指定的条件过滤节点。在这个例子中,`filter`方法被用于根据`searchOrg`的值来过滤节点。当`searchOrg`的值发生变化时,`watch`属性会监听到变化并调用`this.$refs.tree.filter`方法来过滤节点。
#### 引用[.reference_title]
- *1* *3* [elementUI el-tree组件的filter报错Error in callback for watcher “xxx“: “TypeError: x is not a ...](https://blog.csdn.net/ICe_sea753/article/details/127961741)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [vue中el-tree树形组件利用filter和 filterNode方法实现模糊搜索](https://blog.csdn.net/weixin_43312391/article/details/123559303)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文