点击右侧删除,左侧tree的对应复选框取消勾选
el-tree设置node-key
node-key:其值为节点数据中的一个字段名,该字段在整棵树中是唯一的
deleteMyIndex(newV){ let choiseCheckList = this.$refs.myIndexTree.getCheckedNodes(); choiseCheckList.forEach((item,inx)=>{ if(newV.combinedId == item.extra.extra){ choiseCheckList.splice(inx,1) this.$nextTick(() => { this.$refs.myIndexTree.setCheckedNodes(choiseCheckList); }) this.length = choiseCheckList.length; } }) },