摘要: var id = 1 function Ttree(tree,pid){ for(let i = 0; i<tree.length; i++){ let item = tree[i] item.id=id++ if(pid){ item.prentId=pid }else{ item.prentId 阅读全文
posted @ 2021-01-27 10:30 一个懒惰的陈xx 阅读(170) 评论(0) 推荐(0) 编辑
摘要: [ { "name": "小明", "code": "0", "children": [ { "name": "小明明1", "code": "00", "children": [ { "name": "小明明明1", "code": "000", "id": 3, "prentId&qu 阅读全文
posted @ 2021-01-27 10:28 一个懒惰的陈xx 阅读(475) 评论(0) 推荐(0) 编辑