elementUI tree組件獲取當前選擇所有選中(check)和半選中(indeterminate)的節點
this.$refs.tree.getCheckedKeys().concat(this.$refs.tree.getHalfCheckedKeys())
elementUI tree組件獲取當前選擇所有選中(check)和半選中(indeterminate)的節點
網上查了半天,一大堆都說要改源碼的,最后發現有方法不用改源碼的
獲取方法如下
this.$refs.tree.getCheckedKeys().concat(this.$refs.tree.getHalfCheckedKeys())
將getCheckedKeys()和getHalfCheckedKeys()兩個方法獲取的數據合並就是我們想要的數據了

elementUI tree組件獲取當前選擇所有選中(check)和半選中(indeterminate)的節點_IT