1:查找的方法
getNodeId (arrs, targetId) {
var i = 0;
while (arrs[i]) {
if (arrs[i].ename === targetId) {
arrs.splice(i, 1);
return;
}
if (arrs[i].children && arrs[i].children.length > 0) {
this.getNodeId(arrs[i].children, targetId);
}
i++;
}
},
2:把找到的元素删除掉