data(){return{treeBudgetSelect:[],budgetIds:[3,4]}}methods:{this.setDisabled(this.treeBudg data(){ return{ treeBudgetSelect:[], budgetIds:[3,4] } } methods:{this.setDisabled(this.treeBudgetSelect,this.budgetIds)//已经选择的不能编辑s
data(){
return{
treeBudgetSelect:[],
budgetIds:[3,4]
}
}
methods:{this.setDisabled(this.treeBudgetSelect,this.budgetIds)//已经选择的不能编辑setDisabled(treeData,key){key.forEach(k=>{constloop=(data)=>{for(constitemofdata){if(item.treedataid===k){item.disabled=truebreak}if(item.childList&&item.childList.length){loop(item.childList)},}}loop(treeData)})},}