fix(editor): 添加页面,应该添加到最后

This commit is contained in:
roymondchen 2022-09-14 20:03:14 +08:00 committed by jia000
parent 3ff823a59f
commit 10d2b3cc9b

View File

@ -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 {