From edd2f706acbc86e0f82d3fa93241cef667e0b3f5 Mon Sep 17 00:00:00 2001 From: yuetsh <517252939@qq.com> Date: Sun, 5 Jul 2026 00:47:53 -0600 Subject: [PATCH] feat: render SQL initial/result data as tables in a two-pane layout Rewrites Content.vue to give the SQL language its own top/bottom split (code editor over data tables) instead of sharing the horizontal left/right layout used by other languages. SqlSection.vue now renders the preset data and the post-run result as two side-by-side n-data-tables, falling back to the existing error UI when a run fails. Also registers NDataTable globally in main.ts (naive-ui components must be explicitly registered via create()); without it n-data-table was an inert unresolved custom element and no rows rendered. Co-Authored-By: Claude Sonnet 5 --- src/desktop/Content.vue | 21 ++++++++-- src/desktop/SqlSection.vue | 80 ++++++++++++++++++++++++++++++++------ src/main.ts | 2 + 3 files changed, 87 insertions(+), 16 deletions(-) diff --git a/src/desktop/Content.vue b/src/desktop/Content.vue index 22fdbb3..ee4ca22 100644 --- a/src/desktop/Content.vue +++ b/src/desktop/Content.vue @@ -9,13 +9,27 @@ import TurtleSection from "./TurtleSection.vue" diff --git a/src/desktop/SqlSection.vue b/src/desktop/SqlSection.vue index a5135af..d6ae696 100644 --- a/src/desktop/SqlSection.vue +++ b/src/desktop/SqlSection.vue @@ -1,9 +1,10 @@ + + diff --git a/src/main.ts b/src/main.ts index abafe6b..6251b1e 100644 --- a/src/main.ts +++ b/src/main.ts @@ -5,6 +5,7 @@ import { NCollapse, NCollapseItem, NConfigProvider, + NDataTable, NDropdown, NFlex, NIcon, @@ -40,6 +41,7 @@ const naive = create({ NCollapse, NCollapseItem, NConfigProvider, + NDataTable, NMessageProvider, NLayout, NLayoutHeader,