JS如何给树形数据的每一层添加属性 soltsTree(arr){ arr.forEach(item => { if(item.isAlive==1){ item.slots={icon:'circle'} } this.soltsTree(item.children||[]) }); },