js構建層級樹的幾種方法

  const filterList = jiraList.filter(i => !i.parentKey ||算法 !jiraList.some(it => it.key === i.parentKey));數組 // 若是節點存在parentKey可是parentKey對應的對象不在數組內,則須要提高當前節點爲父節點指針 const exceptParent = jiraList.filte
相關文章
相關標籤/搜索