From f315bdfaf1ce3debdcefa58f365cb0aa845cd2ff Mon Sep 17 00:00:00 2001 From: lhuans Date: Thu, 2 Nov 2023 00:54:12 -0700 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=E9=A1=B5=E9=9D=A2=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E8=BE=93=E5=87=BA=E9=85=8D=E7=BD=AE=EF=BC=8C=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E5=86=85=E6=9C=89=E5=86=85=E5=AE=B9=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E6=9B=BF=E6=8D=A2=E4=B8=BA=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E9=83=A8=E5=88=86=E6=96=87=E6=A1=88=E5=86=85=E5=AE=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/common/component/MetaCodeEditor.vue | 29 ++++++++++--------- packages/plugins/page/src/PageInputOutput.vue | 15 ++++++++-- 2 files changed, 27 insertions(+), 17 deletions(-) diff --git a/packages/common/component/MetaCodeEditor.vue b/packages/common/component/MetaCodeEditor.vue index 62f4f653d9..2977b040c8 100644 --- a/packages/common/component/MetaCodeEditor.vue +++ b/packages/common/component/MetaCodeEditor.vue @@ -10,19 +10,19 @@
{{ editorTipsTitle }}
{{ editorState.showEditorDemo ? $t('common.collapseExample') : $t('common.expandExample') }} @@ -35,11 +35,11 @@
{{ editorState.errorMsg }}
@@ -273,8 +273,9 @@ export default { } .full-width { border: 1px solid #adb0b8; - border-radius: 2px; + border-radius: 6px; padding: 4px 8px; + height: 32px; display: flex; justify-content: space-between; align-items: center; diff --git a/packages/plugins/page/src/PageInputOutput.vue b/packages/plugins/page/src/PageInputOutput.vue index f54967ab33..19dedd2551 100644 --- a/packages/plugins/page/src/PageInputOutput.vue +++ b/packages/plugins/page/src/PageInputOutput.vue @@ -7,22 +7,24 @@ class="life-cycle-alert" > - + - + @@ -86,12 +88,16 @@ export default { } } + const isExitValue = (value) => + (Array.isArray(value) && value.length > 0) || (typeof value === 'object' && Object.keys(value).length > 0) + return { inputValue, outputValue, saveInputValue, saveOutputValue, - pageSettingState + pageSettingState, + isExitValue } } } @@ -120,6 +126,9 @@ export default { .input-output-form { margin-top: 16px; margin-left: 28px; + .item-wrap { + width: 348px; + } :deep(.tiny-form-item) { .tiny-form-item__label { font-size: 14px; From 25e0efc3a1dee72669f1cb97e1f38aee328d846a Mon Sep 17 00:00:00 2001 From: lhuans Date: Thu, 2 Nov 2023 18:34:39 -0700 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20=E6=96=B9=E6=B3=95=E5=90=8D?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9B=B4=E5=8A=A0=E7=AC=A6=E5=90=88=E8=AF=AD?= =?UTF-8?q?=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/plugins/page/src/PageInputOutput.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/plugins/page/src/PageInputOutput.vue b/packages/plugins/page/src/PageInputOutput.vue index 19dedd2551..ae3855b1bf 100644 --- a/packages/plugins/page/src/PageInputOutput.vue +++ b/packages/plugins/page/src/PageInputOutput.vue @@ -13,7 +13,7 @@ title="输入配置" button-text="输入配置" language="json" - :buttonShowContent="isExitValue(inputValue)" + :buttonShowContent="hasContent(inputValue)" single @save="saveInputValue" > @@ -24,7 +24,7 @@ title="输出配置" button-text="输出配置" language="json" - :buttonShowContent="isExitValue(outputValue)" + :buttonShowContent="hasContent(outputValue)" single @save="saveOutputValue" > @@ -88,7 +88,7 @@ export default { } } - const isExitValue = (value) => + const hasContent = (value) => (Array.isArray(value) && value.length > 0) || (typeof value === 'object' && Object.keys(value).length > 0) return { @@ -97,7 +97,7 @@ export default { saveInputValue, saveOutputValue, pageSettingState, - isExitValue + hasContent } } }