From 1ad9481ae39632458709dd8ddc06ac8971430439 Mon Sep 17 00:00:00 2001 From: qkiroc <30946345+qkiroc@users.noreply.github.com> Date: Wed, 25 Sep 2024 10:18:46 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=BC=96=E8=BE=91=E5=99=A8=E5=8F=AA?= =?UTF-8?q?=E8=AF=BB=E6=A8=A1=E5=BC=8F=E7=9A=84subEditor=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=20(#10959)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: qinhaoyan <30946345+qinhaoyan@users.noreply.github.com> --- packages/amis-editor-core/scss/editor.scss | 5 +++++ packages/amis-editor-core/src/component/SubEditor.tsx | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/amis-editor-core/scss/editor.scss b/packages/amis-editor-core/scss/editor.scss index 952939812..d54b5d37e 100644 --- a/packages/amis-editor-core/scss/editor.scss +++ b/packages/amis-editor-core/scss/editor.scss @@ -136,6 +136,11 @@ height: 100%; margin: 0; } + &-back { + position: absolute; + bottom: 46px; + left: 20px; + } } // 弹窗编辑器面板 diff --git a/packages/amis-editor-core/src/component/SubEditor.tsx b/packages/amis-editor-core/src/component/SubEditor.tsx index 13fdfaf7d..0ddc85950 100644 --- a/packages/amis-editor-core/src/component/SubEditor.tsx +++ b/packages/amis-editor-core/src/component/SubEditor.tsx @@ -195,8 +195,14 @@ export class SubEditor extends React.Component { readonly={readonly} /> ) + }, + readonly && { + type: 'button', + label: '返回编辑器', + className: 'subEditor-container-back', + onClick: () => store.closeSubEditor() } - ] + ].filter(Boolean) } : { type: 'tpl',