el-tree-select 节点点击
时间: 2023-08-17 10:04:48 浏览: 154
el-tree-select节点点击的问题可能是由于冲突导致的。其中可能存在两种冲突情况。第一种是点击事件冲突,可能是因为触发了两次点击,一个是当前节点的handleNodeClick,另一个是onclick,导致了背景色丢失。解决这个问题可以检查代码中是否存在重复的点击事件,并进行相应的处理。第二种是驱动tree高亮的冲突,可能是因为在需要点击按钮让tree高亮显示时,值可能为null导致样式节点丢失。解决这个问题可以使用条件判断来避免空值导致的问题。例如使用`newVal && this.$refs.tree.setCurrentKey(newVal)`来进行空值判断。\[3\]
#### 引用[.reference_title]
- *1* [el-select 多选模式下嵌套el-tree 删除tag时能去掉el-tree对应节点的勾](https://blog.csdn.net/dabaoai123123/article/details/126075532)[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* [el-table+el-tree+el-select动态选择对应值](https://blog.csdn.net/weixin_43388691/article/details/127385435)[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]
- *3* [el-tree失去焦点丢失节点背景色](https://blog.csdn.net/Y4258/article/details/126655778)[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 ]
阅读全文