zhuli2010

Results 3 comments of zhuli2010

``` function convert (arr) { const map = {} let tree = [] let level arr.forEach(item => { if (!map[item.parentId]) { map[item.parentId] = [] } map[item.parentId].push(item) if (!map[item.id]) { map[item.id]...

> ``` > all(list) { > return new Promise((resolve, reject) => { > let resValues = []; > let counts = 0; > for (let [i, p] of list) {...

``` function test (arr) { const map = {} const result = [] arr.forEach((item, index) => { let key = '' if (typeof item === 'object') { // 用hash表来存储不重复内容,key只能为字符串 key...