<el-tree :data="orgrelation" show-checkbox node-key="id" ref="tree" :default-expand-all="true" @check-change="handleClick" ></el-tree> //触发条件 this.$refs.tree.方法() 此方法时调取到组件内部的方法 var taskArr = this.$refs.SlotTree.getCheckedNodes(); var keysArr = this.$refs.SlotTree.getCheckedKeys(); var halfKeysArr = this.$refs.SlotTree.getHalfCheckedKeys(); var halfTaskArr = this.$refs.SlotTree.getHalfCheckedNodes(); var currentKey = this.$refs.SlotTree.getCurrentKey(); var currentNode = this.$refs.SlotTree.getCurrentNode();
tree 的所有方法