tmagic-editor
tmagic-editor copied to clipboard
packages/editor/src/services/editor.ts 文件中的update方法有bug,导致父子组件更新时调用doUpdate子组件获取到info.parent是旧数据
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);
}
})()
后亲测可用
什么场景的操作会同时修改到父子节点?