From 54d671808cf35323c14d256ea10ce281669beec9 Mon Sep 17 00:00:00 2001 From: Jeff Date: Tue, 27 Oct 2026 12:37:06 +0800 Subject: [PATCH] fix(grid): keep footer actions visible with long selection aggregates --- apps/desktop/src/components/grid/DataGrid.vue | 2 +- .../components/grid/DataGridPagination.vue | 51 ++++++++++++++++--- .../grid/__tests__/DataGridSurfaces.spec.ts | 50 +++++++++++++++++- 3 files changed, 93 insertions(+), 10 deletions(-) diff --git a/apps/desktop/src/components/grid/DataGrid.vue b/apps/desktop/src/components/grid/DataGrid.vue index 764ae5a98e..c63ab8abdd 100644 --- a/apps/desktop/src/components/grid/DataGrid.vue +++ b/apps/desktop/src/components/grid/DataGrid.vue @@ -17223,7 +17223,7 @@ useUpdateBlocker(() => (hasPendingChanges.value || hasPendingDataEditorDraft.val -
+
{{ diff --git a/apps/desktop/src/components/grid/DataGridPagination.vue b/apps/desktop/src/components/grid/DataGridPagination.vue index 86a2808497..ec6b9a4c9c 100644 --- a/apps/desktop/src/components/grid/DataGridPagination.vue +++ b/apps/desktop/src/components/grid/DataGridPagination.vue @@ -69,6 +69,11 @@ const emit = defineEmits<{ // 拖拽选区中聚合值显示为占位符 "…",此时不给复制入口,避免复制出一个假值 const selectionSummaryValueClass = computed(() => (props.selectionSummaryPending ? "" : "cursor-pointer transition-colors hover:text-foreground")); +// Aggregates truncate when the footer runs out of room (long numbers, narrow windows), so the tooltip carries the full value. +function selectionSummaryValueTitle(text: string) { + return props.selectionSummaryPending ? undefined : `${t("grid.copyValue")}: ${text}`; +} + function copySelectionSummaryValue(text: string) { if (props.selectionSummaryPending) return; emit("copySelectionSummary", text); @@ -107,18 +112,50 @@ function handlePageInputKeydown(event: KeyboardEvent) {