25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。
TypeScript aicliclickhousedatabasedatabase-clientdatabase-managementdockerguimcpmongodbmysqlpostgresqlredisrustsql-serversqlitetaurivue
fix(grid): 修复右键菜单选择时的单元格清理逻辑
二丫讲梵7798f2231e2b
diff --git a/apps/desktop/src/components/grid/DataGrid.vue b/apps/desktop/src/components/grid/DataGrid.vueindex a29e23237c..fefa92f12d 100644--- a/apps/desktop/src/components/grid/DataGrid.vue+++ b/apps/desktop/src/components/grid/DataGrid.vue@@ -5178,6 +5178,7 @@ function onCellContext(rowId: number, rowIndex: number, colIdx: number, visibleCcontextHeaderColumnIndex.value = null;contextCell.value = { rowId, rowIndex, col: colIdx };if (hasRowSelection.value && isRowSelected(rowId)) {+ clearCellSelection();void prefetchCopyStatements();return;}@@ -5192,6 +5193,9 @@ function onRowContext(rowId: number, rowIndex: number) {contextHeaderColumn.value = null;contextHeaderColumnIndex.value = null;contextCell.value = { rowId, rowIndex, col: -1 };+ if (hasRowSelection.value && isRowSelected(rowId)) {+ clearCellSelection();+ }if (!isRowSelected(rowId)) {clearCellSelection();selectedRowIds.value = new Set([rowId]);diff --git a/apps/desktop/src/components/layout/ContentArea.vue b/apps/desktop/src/components/layout/ContentArea.vueindex e3bca53004..ab1fe5d7ba 100644--- a/apps/desktop/src/components/layout/ContentArea.vue+++ b/apps/desktop/src/components/layout/ContentArea.vue@@ -516,7 +516,9 @@ defineExpose({ focusSearch, refreshData, handleModRTarget });variant="ghost"size="icon"class="ml-auto h-6 w-7 shrink-0 text-foreground hover:bg-accent"- :class="{ 'bg-accent text-foreground': dataGridRef?.nullColumnsHidden }"+ :class="{+ 'bg-accent text-foreground': dataGridRef?.nullColumnsHidden || dataGridRef?.multiRowTranspose,+ }":title="t('grid.viewOptions')":aria-label="t('grid.viewOptions')">@@ -532,6 +534,32 @@ defineExpose({ focusSearch, refreshData, handleModRTarget });<div class="border-b bg-muted/40 px-3 py-2"><div class="text-xs font-semibold">{{ t("grid.viewOptions") }}</div></div>+ <LightTooltip+ :text="t('grid.transposeMultiRowHint')"+ side="left"+ :side-offset="6"+ :delay="0"+ :open-on-focus="false"+ >+ <label+ class="flex cursor-pointer items-center justify-between gap-3 px-3 py-2 text-xs hover:bg-accent"+ >+ <span class="min-w-0 flex items-center gap-1.5 font-medium">+ {{ t("grid.transposeMultiRowToggle") }}+ <span class="text-muted-foreground">+ {{+ dataGridRef?.multiRowTranspose ? t("grid.transposeMultiRow") : t("grid.transposeSingleRow")+ }}+ </span>+ </span>+ <Switch+ size="sm"+ :model-value="!!dataGridRef?.multiRowTranspose"+ :aria-label="t('grid.transposeMultiRow')"+ @update:model-value="(value: boolean) => dataGridRef?.setMultiRowTranspose(value)"+ />+ </label>+ </LightTooltip><labelclass="flex cursor-pointer items-center gap-2 px-3 py-2 text-xs hover:bg-accent":class="{ 'cursor-not-allowed opacity-60': !dataGridRef?.canToggleAllNullColumns }"