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