From 2d040ca38a6fd88db9497b0fc5a59f6ecf86cd3f Mon Sep 17 00:00:00 2001 From: hLinx <327159425@qq.com> Date: Mon, 26 Sep 2022 21:30:03 +0800 Subject: [PATCH] =?UTF-8?q?bugfix:=20=E9=80=89=E7=94=A8=E2=80=9C=E4=B8=9A?= =?UTF-8?q?=E5=8A=A1=E8=84=9A=E6=9C=AC=E2=80=9D=E6=88=96=E2=80=9C=E5=85=AC?= =?UTF-8?q?=E5=85=B1=E8=84=9A=E6=9C=AC=E2=80=9D=E6=97=B6=E5=8C=B9=E9=85=8D?= =?UTF-8?q?=E4=B8=AD=E9=AB=98=E5=8D=B1=E8=AF=AD=E5=8F=A5=E7=9A=84=E4=BA=A4?= =?UTF-8?q?=E4=BA=92=EF=BC=8C=E8=A6=81=E5=92=8C=E6=89=8B=E5=B7=A5=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E7=9A=84=E4=BF=9D=E6=8C=81=E4=B8=80=E8=87=B4=20#1294?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/src/components/ace-editor/index.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/frontend/src/components/ace-editor/index.vue b/src/frontend/src/components/ace-editor/index.vue index 501116907d..23d9403c2c 100644 --- a/src/frontend/src/components/ace-editor/index.vue +++ b/src/frontend/src/components/ace-editor/index.vue @@ -297,11 +297,13 @@ watch: { value: { handler (value) { + this.editor.getSession().setAnnotations([]); // 只读模式没有默认值,直接使用输入值 if (this.readonly) { this.editor.setValue(Base64.decode(value)); this.editor.clearSelection(); this.syntaxCheck(value); + return; } // 外部传入空置直接清空编辑器 if (value === '' && this.content !== '') {