标签:log oop rip class javascrip ret cti asc office
function loop(data) { let office = data.map(item => { if (item.children) { if(item.type == ‘1‘ ||item.type == ‘2‘) { item = {...item,disabled:true,children:loop(item.children)} return item } } }) return office } let officeDataTree = loop(officeData)
标签:log oop rip class javascrip ret cti asc office
原文地址:http://www.cnblogs.com/jkr666666/p/7086292.html