Open 841148070 opened 7 months ago
update方法中
const newNodes = await Promise.all(nodes.map((node) => this.doUpdate(node))); 改成 const newNodes: MNode[] = []; (async () => { for (const node of nodes) { const newNode = await this.doUpdate(node) newNodes.push(newNode); } })() 后亲测可用
const newNodes = await Promise.all(nodes.map((node) => this.doUpdate(node)));
const newNodes: MNode[] = [];
(async () => {
for (const node of nodes) {
const newNode = await this.doUpdate(node)
newNodes.push(newNode);
}
})()
什么场景的操作会同时修改到父子节点?
update方法中
const newNodes = await Promise.all(nodes.map((node) => this.doUpdate(node)));
改成const newNodes: MNode[] = [];
(async () => {
for (const node of nodes) {
const newNode = await this.doUpdate(node)
newNodes.push(newNode);
}
})()
后亲测可用