摘要: let array1 = [ {'Num': 'A ', 'Name': 't1 '}, {'Num': 'B', 'Name': 't2'}, {'Num': 'C ', 'Name': 't3 ', age: '222'}, {'Num': 'D', 'Name': 't4 ', age: '3 阅读全文
posted @ 2021-10-08 16:16 PromiseOne 阅读(1694) 评论(0) 推荐(0) 编辑
摘要: flatten(arr) { return [].concat(...arr.map(item => { if (item.children) { let arr = [].concat(item, ...this.flatten(item.children)); delete item.child 阅读全文
posted @ 2021-10-08 15:12 PromiseOne 阅读(698) 评论(0) 推荐(0) 编辑