diff --git a/apps/desktop/src/App.vue b/apps/desktop/src/App.vue index f3e2e11f73..572d2db0ee 100644 --- a/apps/desktop/src/App.vue +++ b/apps/desktop/src/App.vue @@ -537,7 +537,6 @@ function handleKeydown(e: KeyboardEvent) { const shortcuts = settingsStore.editorSettings.shortcuts; if (isFocusSearchShortcut(e, shortcuts)) { - if (activeTab.value?.mode === "query") return; const focused = contentAreaRef.value?.focusSearch() || appSidebarRef.value?.focusSearch(); if (focused) { e.preventDefault(); diff --git a/apps/desktop/src/components/editor/QueryEditor.vue b/apps/desktop/src/components/editor/QueryEditor.vue index cf0c6e0084..a79c15680d 100644 --- a/apps/desktop/src/components/editor/QueryEditor.vue +++ b/apps/desktop/src/components/editor/QueryEditor.vue @@ -1,7 +1,17 @@ - + + + + + + + + Aa + + + .* + + + {{ matchCount > 0 ? `${currentMatchIndex}/${matchCount}` : "无结果" }} + + + + + + + + + + + + + + + + + + 替换 + + + 全部 + + + + + diff --git a/apps/desktop/src/components/layout/ContentArea.vue b/apps/desktop/src/components/layout/ContentArea.vue index 5f00664b80..b480106bfd 100644 --- a/apps/desktop/src/components/layout/ContentArea.vue +++ b/apps/desktop/src/components/layout/ContentArea.vue @@ -91,6 +91,7 @@ const columnInfoColumns = ref([]); const columnInfoLoading = ref(false); const columnInfoError = ref(undefined); const dataGridRef = ref(); +const queryEditorRef = ref>(); const columnVisibilitySearch = ref(""); const columnVisibilityOptions = computed( () => dataGridRef.value?.filteredColumnVisibilityOptions(columnVisibilitySearch.value) ?? [], @@ -209,7 +210,7 @@ function onHandleCloseColumnPanel() { function focusSearch(): boolean { if (props.activeTab.mode === "redis") return redisKeyBrowserRef.value?.focusSearch() ?? false; if (props.activeTab.mode === "objects") return objectBrowserRef.value?.focusSearch() ?? false; - if (props.activeTab.mode === "query" && props.activeOutputView !== "result") return false; + if (props.activeTab.mode === "query") return queryEditorRef.value?.openSearch() ?? false; return dataGridRef.value?.focusSearch() ?? false; } @@ -230,6 +231,7 @@ defineExpose({ focusSearch, refreshData });