From 3046018a360c46b80b5e0daadeb61c5e7b8895ea Mon Sep 17 00:00:00 2001 From: "jianhui.fjh" Date: Thu, 17 Jun 2021 15:24:53 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=A3=81=E8=B4=B4=E5=9D=97=E7=9A=84?= =?UTF-8?q?=E5=A4=8D=E5=88=B6=E6=8C=89=E9=92=AE=E7=82=B9=E5=87=BB=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E6=BB=9A=E5=8A=A8=E5=88=B0=E6=96=B0=E8=8A=82=E7=82=B9?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/designer/src/component-meta.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/designer/src/component-meta.ts b/packages/designer/src/component-meta.ts index 0fe273601..78bd995be 100644 --- a/packages/designer/src/component-meta.ts +++ b/packages/designer/src/component-meta.ts @@ -178,10 +178,10 @@ export class ComponentMeta { this._title = typeof title === 'string' ? { - type: 'i18n', - 'en-US': this.componentName, - 'zh-CN': title, - } + type: 'i18n', + 'en-US': this.componentName, + 'zh-CN': title, + } : title; } @@ -436,6 +436,10 @@ const builtinComponentActions: ComponentAction[] = [ if (parent) { const newNode = doc.insertNode(parent, node, index + 1, true); newNode.select(); + if (node.getRGL().isRGL) { + // 如果是磁贴块复制,则需要滚动到影响位置 + setTimeout(() => newNode.document.simulator?.scrollToNode(newNode), 10); + } } }, },