js 自循环树形结构,获取某个节点
// 改造树节点的结构,在每个树节点上都加入父级的code和type const loopTreeNode = (data: any, pId?: string, pType?: string) => { return data.map((item:any) => { item.pId = pId; item.pType = pType; if (item.children && item.children.length >..
原创
2022-02-13 15:17:30 ·
757 阅读 ·
0 评论