From 4c96aa6e402c6fbfcfb4f39d2b7ea2a24049be76 Mon Sep 17 00:00:00 2001 From: zipg Date: Thu, 2 Jul 2026 20:20:32 +0800 Subject: [PATCH] =?UTF-8?q?Feature:=20SQL=20=E7=BC=96=E8=BE=91=E5=99=A8?= =?UTF-8?q?=E5=8F=B3=E9=94=AE=E6=94=AF=E6=8C=81=E7=BC=96=E8=BE=91=E8=A1=A8?= =?UTF-8?q?=E7=BB=93=E6=9E=84=20(#2456)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: staff --- apps/desktop/src/App.vue | 7 +++++++ .../desktop/src/components/editor/QueryEditor.vue | 15 ++++++++++++++- .../desktop/src/components/layout/ContentArea.vue | 6 ++++++ 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/apps/desktop/src/App.vue b/apps/desktop/src/App.vue index 2c848be09..2581d0f23 100644 --- a/apps/desktop/src/App.vue +++ b/apps/desktop/src/App.vue @@ -1135,6 +1135,12 @@ function onViewTableDdl(tableName: string) { showQueryEditorDdlDialog.value = true; } +function onEditTableStructure(tableName: string) { + const target = tableTargetFromActiveTab(tableName); + if (!target) return; + queryStore.openTableStructure(target.connectionId, target.database, target.schema, target.tableName); +} + async function changeActiveConnection(connectionId: string) { const tab = activeTab.value; if (!tab) return; @@ -1839,6 +1845,7 @@ onUnmounted(() => { @execute-sql="onExecuteSql" @click-table="onClickTable" @view-table-data="onViewTableData" + @edit-table-structure="onEditTableStructure" @view-table-ddl="onViewTableDdl" @open-object-table=" (target) => diff --git a/apps/desktop/src/components/editor/QueryEditor.vue b/apps/desktop/src/components/editor/QueryEditor.vue index 8e0449ca3..14f8ed940 100644 --- a/apps/desktop/src/components/editor/QueryEditor.vue +++ b/apps/desktop/src/components/editor/QueryEditor.vue @@ -1,6 +1,6 @@