11 2024 档案
摘要:1.数据格式不一致需要转成{label:,label,children}属性格式treeData = changeTreeData(data); const treeData =changeTreeData(源数据); changeTreeData=(data)=>{ const temp=[];
阅读全文
摘要:function findNodeById(data, id) { for (const item of data) { if (item.id id) { return item; // 找到匹配的节点,直接返回 } if (item.children && item.children.lengt
阅读全文