From 0377920e6881fe538a980a7e545ad6b92a6e4325 Mon Sep 17 00:00:00 2001 From: buqiyuan <1743369777@qq.com> Date: Fri, 15 Jul 2022 19:16:31 +0800 Subject: [PATCH] fix: eo-editor height not full parent --- .../editor/eo-editor/eo-editor.component.html | 8 ++-- .../editor/eo-editor/eo-editor.component.scss | 14 ++++++- .../editor/eo-editor/eo-editor.component.ts | 1 + .../api-script/api-script.component.html | 39 ++++--------------- 4 files changed, 26 insertions(+), 36 deletions(-) diff --git a/src/workbench/browser/src/app/eoui/editor/eo-editor/eo-editor.component.html b/src/workbench/browser/src/app/eoui/editor/eo-editor/eo-editor.component.html index 556739178..17f4f6fee 100644 --- a/src/workbench/browser/src/app/eoui/editor/eo-editor/eo-editor.component.html +++ b/src/workbench/browser/src/app/eoui/editor/eo-editor/eo-editor.component.html @@ -1,4 +1,4 @@ -
+
Content Type @@ -11,7 +11,7 @@ {{ item.label }}
- +
diff --git a/src/workbench/browser/src/app/eoui/editor/eo-editor/eo-editor.component.scss b/src/workbench/browser/src/app/eoui/editor/eo-editor/eo-editor.component.scss index 2382950f5..0409d73ae 100644 --- a/src/workbench/browser/src/app/eoui/editor/eo-editor/eo-editor.component.scss +++ b/src/workbench/browser/src/app/eoui/editor/eo-editor/eo-editor.component.scss @@ -1,3 +1,7 @@ +.eo-editor { + min-height: var(--eo-editor-height, 200px); +} + .button_list { border: 1px solid var(--BORDER); border-top-left-radius: 3px; @@ -32,6 +36,14 @@ height: 100%; } .ace_editor { - min-height: 200px; + min-height: inherit !important; + } + .ace-editor { + height: calc(100% - 52px); + min-height:inherit; + overflow: auto; + &::-webkit-scrollbar { + width: 0; + } } } diff --git a/src/workbench/browser/src/app/eoui/editor/eo-editor/eo-editor.component.ts b/src/workbench/browser/src/app/eoui/editor/eo-editor/eo-editor.component.ts index df8da006f..7ba2da99e 100644 --- a/src/workbench/browser/src/app/eoui/editor/eo-editor/eo-editor.component.ts +++ b/src/workbench/browser/src/app/eoui/editor/eo-editor/eo-editor.component.ts @@ -51,6 +51,7 @@ export class EoEditorComponent implements AfterViewInit, OnInit, OnChanges { @Input() eventList: EventType[] = []; @Input() hiddenList: string[] = []; @Input() code: string; + @Input() minHeight = 200; @Input() editorType = 'json'; @Input() autoFormat = false; @Input() disabled = false; diff --git a/src/workbench/browser/src/app/shared/components/api-script/api-script.component.html b/src/workbench/browser/src/app/shared/components/api-script/api-script.component.html index edb5fe09b..8d24f05bb 100644 --- a/src/workbench/browser/src/app/shared/components/api-script/api-script.component.html +++ b/src/workbench/browser/src/app/shared/components/api-script/api-script.component.html @@ -3,24 +3,12 @@
Snippets
- Learn more + Learn more
- + {{ node.title }} @@ -29,14 +17,8 @@
{{ node.title }} - + [?] @@ -61,13 +43,8 @@
- +