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 @@