1
我有這棵樹,我想每次展開一個節點。我發現了這個代碼,但它一次展開所有節點。
function expand(d){
if (d._children) {
d.children = d._children;
d.children.forEach(expand);
d._children = null;
}
}
我有這棵樹背後的邏輯,我想展開一個特定節點每當我想通過傳遞一個參數,如節點的名稱,選擇我要擴大哪個節點。與d._children
搞亂像在此之前