1.el-tree显示复选框checkbox,取消上下级联动,可看上篇
2.handleNodeClick
#单选 this.$refs.tree.setCheckedNodes([data]);
3.handleCheckChange
#treeSelection 已选中的数据,data 当前选中的数据 for(let i = 0; i < this.treeSelection.length; i++){ if(data.id != this.treeSelection[i].id){ this.$refs.tree.setChecked(this.treeSelection[i], false) } }