el-tree获取新建节点的dom
时间: 2023-10-20 08:57:22 浏览: 140
el-tree获取新建节点的dom可以通过使用$refs属性来实现。在代码中,可以给el-tree组件添加一个ref属性,比如ref="treeRef"。然后可以通过this.$refs.treeRef来获取el-tree组件的实例。通过实例可以访问到el-tree组件的dom节点,进而获取新建节点的dom。\[2\]
#### 引用[.reference_title]
- *1* *3* [vue中el-tree默认选中节点问题](https://blog.csdn.net/qq_43049525/article/details/115503411)[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-tree单独设置父节点icon,清除el-tree的节点选中背景色](https://blog.csdn.net/qq_52140056/article/details/124909116)[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 ]
阅读全文