From bdd1ffa8c7dcc35d9227812cdf9126b7dbb8c42a Mon Sep 17 00:00:00 2001 From: hLinx <327159425@qq.com> Date: Wed, 1 Feb 2023 15:46:33 +0800 Subject: [PATCH] =?UTF-8?q?bugfix:=20=E9=AB=98=E5=8D=B1=E8=AF=AD=E5=8F=A5?= =?UTF-8?q?=E8=A7=84=E5=88=99=E6=89=AB=E6=8F=8F=E7=B1=BB=E5=9E=8B=E9=AB=98?= =?UTF-8?q?=E5=8D=B1=E8=AF=AD=E5=8F=A5=E5=90=8C=E6=A0=B7=E4=BC=9A=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E6=8B=A6=E6=88=AA=20#1704?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/ace-editor/index.vue | 15 +++++------ src/frontend/src/components/jb-edit/input.vue | 20 ++++++++------- .../src/components/jb-edit/select.vue | 19 +++++++------- src/frontend/src/components/jb-edit/tag.vue | 25 +++++++++---------- .../src/components/jb-edit/textarea.vue | 21 ++++++++-------- src/frontend/src/utils/assist/dom.js | 13 +++++++++- .../script-manage/common/copy-create.vue | 17 ++----------- .../src/views/script-manage/common/edit.vue | 16 ++---------- 8 files changed, 66 insertions(+), 80 deletions(-) diff --git a/src/frontend/src/components/ace-editor/index.vue b/src/frontend/src/components/ace-editor/index.vue index a162280619..64f6ce3b51 100644 --- a/src/frontend/src/components/ace-editor/index.vue +++ b/src/frontend/src/components/ace-editor/index.vue @@ -158,7 +158,7 @@ SQL: 'sql', }; const LOCAL_STORAGE_KEY = 'ace_editor_history'; - + const escapeHTML = str => str.replace(/&/g, '&').replace(/"/g, '"') .replace(/'/g, ''') .replace(/ { this.content = editor.getValue(); const content = Base64.encode(this.content); @@ -479,12 +480,12 @@ }); // 先保存 editor 在设置 value this.editor = editor; - + this.$once('hook:beforeDestroy', () => { editor.destroy(); editor.container.remove(); }); - + this.watchEditAction(); const $handler = document.querySelector(`#${this.selfId}`); @@ -576,7 +577,7 @@ if (target.type !== 'textarea') { return; } - + if ([ 'Escape', 'Meta', diff --git a/src/frontend/src/components/jb-edit/input.vue b/src/frontend/src/components/jb-edit/input.vue index 327c8e0760..88f0d986e0 100644 --- a/src/frontend/src/components/jb-edit/input.vue +++ b/src/frontend/src/components/jb-edit/input.vue @@ -53,7 +53,10 @@