摘要: JSON.stringify(val, replacer, space) function format(val, replacer, space) { // TODO var fn = (data, spaceIn) =>{ let type = Object.prototype.toString 阅读全文
posted @ 2021-08-10 20:23 尖子 阅读(82) 评论(0) 推荐(0) 编辑
摘要: 形成树,此方法有局限性,id和parentId 都是顺序添加的 var data = [ {id:1,name:'json',parentId:0}, {id:2,name:'json',parentId:0}, {id:3,name:'json',parentId:1}, {id:4,name:' 阅读全文
posted @ 2021-08-10 18:36 尖子 阅读(256) 评论(0) 推荐(0) 编辑