我就直接上代码吧!直接在浏览器跑下就知道了!各位大神就是报了个错functionobjectIterator(object,arr,objStack){letcount=0if(!arr.length){return}if(arr.indexOf(object.id)>-1){object.disabled=true}if(object.children.length){objStack.push(object)}else{return}console.warn(objStack.length,objStack[0])while(objStack.length){for(leti=count;i{item.parent=obj})obj.children[0].children.forEach(item=>{item.parent=obj.children[0]})objectIterator(obj,['1','2','5'],[])console.warn(obj)
添加回答
举报
0/150
提交
取消