element tree怠惰ロード
958 ワード
loadNode1(node, resolve) {
if (node.level === 0) {
return;
} else {
if (node.store.currentNode != null) {
if (node.store.currentNode.data.nodeTypeCode != '1') {
if (node.store.currentNode.data.children) {
resolve(node.store.currentNode.data.children);
} else {
resolve([]);
}
} else {
if (node.store.currentNode.data.children) {
resolve(node.store.currentNode.data.children);
} else {
if (node.store.currentNode.data.nodeIsid) {
video(node.store.currentNode.data.nodeIsid).then((res) => {
res.data.forEach((v, i, a) => {
v.nodeName = a[i].dvName;
});
resolve(res.data);
});
}
}
}
}
}
}