From 10d2b3cc9b5460ee4c406ca731520ffc2d1906ef Mon Sep 17 00:00:00 2001 From: roymondchen Date: Wed, 14 Sep 2022 20:03:14 +0800 Subject: [PATCH] =?UTF-8?q?fix(editor):=20=E6=B7=BB=E5=8A=A0=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=EF=BC=8C=E5=BA=94=E8=AF=A5=E6=B7=BB=E5=8A=A0=E5=88=B0?= =?UTF-8?q?=E6=9C=80=E5=90=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/editor/src/services/editor.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/editor/src/services/editor.ts b/packages/editor/src/services/editor.ts index 4003f21b..095fc1d9 100644 --- a/packages/editor/src/services/editor.ts +++ b/packages/editor/src/services/editor.ts @@ -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 {