From 9f029dea018e6380486fa40f24f557a8ee380fe1 Mon Sep 17 00:00:00 2001 From: t8y2 <1156263951@qq.com> Date: Mon, 1 Jun 2026 15:15:44 +0800 Subject: [PATCH] fix(grid): refine footer layout and cell edit alignment --- apps/desktop/src/components/grid/DataGrid.vue | 99 ++++++++++--------- .../components/grid/TemporalCellEditor.vue | 2 +- 2 files changed, 54 insertions(+), 47 deletions(-) diff --git a/apps/desktop/src/components/grid/DataGrid.vue b/apps/desktop/src/components/grid/DataGrid.vue index 31279fada..c5e41b856 100644 --- a/apps/desktop/src/components/grid/DataGrid.vue +++ b/apps/desktop/src/components/grid/DataGrid.vue @@ -5201,7 +5201,7 @@ const gridContextMenuItems = computed(() => { autocapitalize="off" autocorrect="off" spellcheck="false" - class="cell-edit-input absolute inset-0 bg-background border-2 border-primary px-2 py-0.5 text-xs outline-none z-10" + class="cell-edit-input absolute inset-0 bg-background border-2 border-primary px-2 py-0 text-xs leading-[26px] outline-none z-10" @blur="commitEdit" @click.stop @keydown.stop="onEditKeydown" @@ -5856,7 +5856,7 @@ const gridContextMenuItems = computed(() => { autocapitalize="off" autocorrect="off" spellcheck="false" - class="cell-edit-input absolute inset-0 bg-background border-2 border-primary px-2 py-0.5 text-xs outline-none z-10" + class="cell-edit-input absolute inset-0 bg-background border-2 border-primary px-2.5 py-0 text-xs leading-[22px] outline-none z-10" @blur="commitEdit" @click.stop @keydown.stop="onEditKeydown" @@ -6414,26 +6414,45 @@ const gridContextMenuItems = computed(() => {
- - {{ t("grid.totalRows", { count: result.rows.length }) }} - {{ - t("grid.totalRowCount", { count: totalRowCount }) - }} - - (truncated) - {{ t("grid.rowsAffected", { count: result.affected_rows }) }} - {{ result.execution_time_ms }}ms - {{ selectionSummary }} - - - + +
+ + + + + {{ sqlOneLiner }} + + + +
{{ props.sql }}
+
+
+ + +
(() => { - - - - - - - - {{ sqlOneLiner }} - - - -
{{ props.sql }}
-
-
+ +
diff --git a/apps/desktop/src/components/grid/TemporalCellEditor.vue b/apps/desktop/src/components/grid/TemporalCellEditor.vue index e69320815..bc208f5a0 100644 --- a/apps/desktop/src/components/grid/TemporalCellEditor.vue +++ b/apps/desktop/src/components/grid/TemporalCellEditor.vue @@ -35,7 +35,7 @@ const displayValue = computed(() => props.modelValue || "NULL"); const triggerClass = computed(() => props.variant === "inline" ? "cell-edit-input flex h-9 w-full items-center gap-2 rounded border bg-background px-2 text-left text-xs outline-none hover:border-primary/60 focus:border-primary" - : "cell-edit-input absolute inset-0 z-10 flex items-center gap-1 border-2 border-primary bg-background px-2 py-0.5 text-left text-xs outline-none", + : "cell-edit-input absolute inset-0 z-10 flex items-center gap-1 border-2 border-primary bg-background px-2.5 py-0 text-left text-xs outline-none", ); const dateParts = computed(() => { const text = formatTemporalInputValue(props.modelValue, "date");