el-tree获取选中的节点
时间: 2023-10-16 13:05:37 浏览: 169
要获取el-tree中选中的节点,可以使用element-ui提供的两个官方方法:getCheckedKeys和getHalfCheckedKeys。getCheckedKeys方法返回所有选中的子节点,getHalfCheckedKeys方法返回所有选中的父节点。你可以将这两个方法的返回值进行拼接,即可得到所有选中的父子节点。引用<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [el-tree-selected-tree](https://download.csdn.net/download/Chinese521/13115150)[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^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [ElementUI tree控件获取选中的节点(含父节点)](https://blog.csdn.net/Irene1991/article/details/114969502)[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^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文