From 2805ce55163adfa49b1f0acad0cc33d7b33a541a Mon Sep 17 00:00:00 2001 From: buqiyuan <1743369777@qq.com> Date: Fri, 15 Jul 2022 14:21:15 +0800 Subject: [PATCH] fix: eo-editor view not reflesh --- .../editor/eo-editor/eo-editor.component.scss | 1 + .../editor/eo-editor/eo-editor.component.ts | 3 +++ .../app/pages/api/test/api-test.component.html | 18 ++++++++++-------- .../app/pages/api/test/api-test.component.ts | 9 +++++++-- 4 files changed, 21 insertions(+), 10 deletions(-) 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 9a5a101de..f02f48ec1 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 @@ -5,6 +5,7 @@ width: 100%; display: flex; align-items: center; + padding-left: 10px; nz-select { width: 90px; } 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 9e5d7cf08..4b1649c5d 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 @@ -138,6 +138,9 @@ export class EoEditorComponent implements AfterViewInit, OnInit, OnChanges { this.codeChange.emit(this.code); }, 0); } + rerenderAce() { + this.aceRef.directiveRef.ace().renderer.updateFull(true); + } formatCode(code, type) { if (type === 'json') { return beautifier.js(code, { diff --git a/src/workbench/browser/src/app/pages/api/test/api-test.component.html b/src/workbench/browser/src/app/pages/api/test/api-test.component.html index 0c98f90a8..491c0560d 100644 --- a/src/workbench/browser/src/app/pages/api/test/api-test.component.html +++ b/src/workbench/browser/src/app/pages/api/test/api-test.component.html @@ -30,7 +30,7 @@