jeo_Q
Results
2
comments of
jeo_Q
const fn_12 = (value) => { const data = [ { id: 1, children: [ { id: 11, children: [ { id: 111 }, { id: 112 } ] }...
//写法精简 const fn_10 = (list, id = 0) => list.filter(item => item.parentId === id).map(item => ({ ...item, children: fn_10(list, item.id) })) //性能优秀(只遍历两遍) const fn_11 = (list) => { const obj...