mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-06 03:57:56 +08:00
fix(editor): 添加页面,应该添加到最后
This commit is contained in:
parent
3ff823a59f
commit
10d2b3cc9b
@ -297,7 +297,7 @@ class Editor extends BaseService {
|
||||
throw new Error('app下不能添加组件');
|
||||
}
|
||||
|
||||
if (parent.id !== curNode.id) {
|
||||
if (parent.id !== curNode.id && node.type !== NodeType.PAGE) {
|
||||
const index = parent.items.indexOf(curNode);
|
||||
parent?.items?.splice(index + 1, 0, node);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user