mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-06-24 19:29:17 +08:00
fix(editor): react runtime中添加没有即使渲染
This commit is contained in:
parent
79cee1cbdc
commit
9d2e2210d1
@ -296,6 +296,9 @@ class Editor extends BaseService {
|
||||
throw new Error('app下不能添加组件');
|
||||
}
|
||||
|
||||
// 新增节点添加到配置中
|
||||
parent?.items?.push(node);
|
||||
|
||||
const layout = await this.getLayout(toRaw(parent), node as MNode);
|
||||
node.style = getInitPositionStyle(node.style, layout);
|
||||
|
||||
@ -305,9 +308,6 @@ class Editor extends BaseService {
|
||||
|
||||
await stage?.update({ config: cloneDeep(node), root: cloneDeep(root) });
|
||||
|
||||
// 新增节点添加到配置中
|
||||
parent?.items?.push(node);
|
||||
|
||||
this.addModifiedNodeId(node.id);
|
||||
|
||||
return node;
|
||||
|
Loading…
x
Reference in New Issue
Block a user