mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-06-03 14:39:19 +08:00
fix(editor): 新增页面时会有一个error
This commit is contained in:
parent
9858327eb8
commit
aa20c74131
@ -321,10 +321,11 @@ class Editor extends BaseService {
|
||||
this.pushHistoryState();
|
||||
}
|
||||
|
||||
stage?.select(newNode.id);
|
||||
|
||||
if (isPage) {
|
||||
this.state.pageLength += 1;
|
||||
} else {
|
||||
// 新增页面,这个时候页面还有渲染出来,此时select会出错,在runtime-ready的时候回去select
|
||||
stage?.select(newNode.id);
|
||||
}
|
||||
|
||||
this.emit('add', newNode);
|
||||
|
Loading…
x
Reference in New Issue
Block a user