From f40e9ae759e7b112d30b3e71139c03d5c95777a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B4=AA=E6=B4=AA?= <2498601771@qq.com> Date: Fri, 29 Dec 2023 11:57:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E7=9A=84=E5=8E=86=E5=8F=B2=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E4=B8=AD=E5=90=8C=E4=B8=80=E6=9D=A1=E6=90=9C=E7=B4=A2=E8=AF=AD?= =?UTF-8?q?=E5=8F=A5=E7=82=B9=E5=87=BB=E7=AC=AC=E4=BA=8C=E6=AC=A1=E4=B8=8D?= =?UTF-8?q?=E8=83=BD=E5=A1=AB=E5=85=85=E6=90=9C=E7=B4=A2=E6=A1=86=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/advancedSearch/TextMode.vue | 5 +++-- src/views/detections/DetectionSearch.vue | 2 +- src/views/entityExplorer/search/ExplorerSearch.vue | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/advancedSearch/TextMode.vue b/src/components/advancedSearch/TextMode.vue index 11dc3a5c..50cc0242 100644 --- a/src/components/advancedSearch/TextMode.vue +++ b/src/components/advancedSearch/TextMode.vue @@ -205,8 +205,9 @@ export default { this.$emit('search', { q: '', str: '', metaList: [] }) } }, - focus () { - this.codeMirror.focus() + focus (e) { + toRaw(this.codeMirror).setValue(e.str) + // this.codeMirror.focus() }, changeMode () { const str = this.codeMirror.getValue().trim() diff --git a/src/views/detections/DetectionSearch.vue b/src/views/detections/DetectionSearch.vue index 56c27b0f..4267425f 100644 --- a/src/views/detections/DetectionSearch.vue +++ b/src/views/detections/DetectionSearch.vue @@ -191,7 +191,7 @@ export default { this.showHistory = false this.$nextTick(() => { if (this.$refs.search.$refs.textMode) { - this.$refs.search.$refs.textMode.focus() + this.$refs.search.$refs.textMode.focus(row) } }) if (this.showList) { diff --git a/src/views/entityExplorer/search/ExplorerSearch.vue b/src/views/entityExplorer/search/ExplorerSearch.vue index 2a0dba57..dfa59da8 100644 --- a/src/views/entityExplorer/search/ExplorerSearch.vue +++ b/src/views/entityExplorer/search/ExplorerSearch.vue @@ -130,7 +130,7 @@ export default { this.showHistory = false this.$nextTick(() => { if (this.$refs.search.$refs.textMode) { - this.$refs.search.$refs.textMode.focus() + this.$refs.search.$refs.textMode.focus(row) } }) if (this.showList) {