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
feat(grid): transpose selected rows preserving selection scope
二丫讲梵73692376ef05
diff --git a/apps/desktop/src/components/document/DocumentBrowser.vue b/apps/desktop/src/components/document/DocumentBrowser.vueindex d0cb586bc2..4cfaf5a217 100644--- a/apps/desktop/src/components/document/DocumentBrowser.vue+++ b/apps/desktop/src/components/document/DocumentBrowser.vue@@ -2885,7 +2885,7 @@ defineExpose({ focusSearch });<span>{{ t("grid.transposeMultiRowToggle") }}</span></div><LightTooltip :text="t('grid.transposeMultiRowHint')" side="left" :side-offset="6" :delay="0" :open-on-focus="false">- <div class="grid w-32 grid-cols-2 rounded-md border bg-muted/40 p-0.5">+ <div class="grid min-w-40 grid-cols-2 rounded-md border bg-muted/40 p-0.5"><buttonv-for="multiRow in [false, true]":key="String(multiRow)"diff --git a/apps/desktop/src/components/grid/DataGrid.vue b/apps/desktop/src/components/grid/DataGrid.vueindex 5f5ae35a58..234f8ab256 100644--- a/apps/desktop/src/components/grid/DataGrid.vue+++ b/apps/desktop/src/components/grid/DataGrid.vue@@ -148,7 +148,6 @@ import {nextTransposeStateForRecordCount,restoreDataGridAfterTranspose,shouldAutoTransposeSingleRow,- transposeRecordIndexesForMode,transposeRecordWidthsForDensity,transposeEndAlignmentSpacerWidth,transposeFieldWidth,@@ -695,7 +694,10 @@ if (isDebugLoggingEnabled()) {const transposeRowIndex = ref<number | null>(null);const showTranspose = ref(false);+// Capture the scope once: editing a cell must not collapse a multi-record view.+const transposeSelectedRowIds = ref<Set<number> | null>(null);const preserveTransposeOnNextResult = ref(false);+let preservedTransposeScopeOnNextResult: { selection: PersistedDataGridSelection | null } | null = null;let preservedSelectionOnNextResult: {selection: PersistedDataGridSelection;sourceResult: QueryResult;@@ -1132,7 +1134,7 @@ const dataGridSearch = useDataGridSearch({caseSensitive: () => replaceOpen.value && replaceCaseSensitive.value,literalQuery: replaceOpen,includeColumnMatches: () => !replaceOpen.value,- isCellSearchable: (row, columnIndex) => !replaceOpen.value || (canReplaceGridCell(row, columnIndex) && replacementCellInScope(row.id, columnIndex)),+ isCellSearchable: (row, columnIndex) => transposeIncludesRow(row.id) && (!replaceOpen.value || (canReplaceGridCell(row, columnIndex) && replacementCellInScope(row.id, columnIndex))),onNavigate: () => nextTick(scrollToCurrentMatch),// Same key as useDataGridEditor below: table data tabs use the tab id, query// results use resultGridInstanceKey so a re-execute starts with a clean search.@@ -3832,7 +3834,7 @@ function selectAndRevealLastLoadedRow() {nextTick(() => {let rowIndex = displayRowRefs.value.length - 1;while (rowIndex >= 0 && !("sourceIndex" in displayRowRefs.value[rowIndex])) rowIndex--;- if (rowIndex < 0) return;+ if (rowIndex < 0 || !transposeIncludesRow(displayRowRefs.value[rowIndex].id)) return;selectRow(rowIndex);if (showTranspose.value) {transposeRowIndex.value = rowIndex;@@ -4914,7 +4916,7 @@ function prepareFullReload() {preservedSelectionOnNextResult = selection ? { selection, sourceResult: props.result } : null;preservedViewportAnchorOnNextResult = viewportAnchor ? { anchor: viewportAnchor, sourceResult: props.result } : null;preservedDetailsOnNextResult = captureDetailsForRefresh();- preserveTransposeOnNextResult.value = showTranspose.value;+ preserveTransposeForRefresh();isRefreshingData.value = true;beginDataGridNativeSelectionBlock(dataGridNativeSelectionBlockOwner);}@@ -5735,6 +5737,43 @@ function captureCurrentSelectionForRefresh(): PersistedDataGridSelection | null});}+function preserveTransposeForRefresh() {+ preserveTransposeOnNextResult.value = showTranspose.value;+ preservedTransposeScopeOnNextResult =+ showTranspose.value && transposeSelectedRowIds.value+ ? {+ selection: captureDataGridSelection({+ ...selectionCaptureBase(),+ selectedRowIds: transposeSelectedRowIds.value,+ selectedColumnIndexes: new Set(),+ selectedCellKeys: new Set(),+ selectionAnchor: null,+ selectionFocus: null,+ selectingAll: false,+ }),+ }+ : null;+}++function restoreTransposeScopeAfterRefresh(snapshot: { selection: PersistedDataGridSelection | null } | null) {+ if (!snapshot) {+ transposeSelectedRowIds.value = null;+ return;+ }+ const restored = snapshot.selection+ ? restoreDataGridSelection({+ snapshot: snapshot.selection,+ columns: props.result.columns,+ sourceColumns: props.sourceColumns,+ rows: props.result.rows,+ visibleColumnIndexes: visibleColumnIndexes.value,+ displayItems: displayItems.value,+ })+ : null;+ // Missing records must not silently expand a restricted view to all records.+ transposeSelectedRowIds.value = new Set(restored?.kind === "rows" ? restored.rowIds : []);+}+function captureCellTargetForRefresh(target: { rowIndex: number; col: number } | null): PersistedDataGridSelection | undefined {if (!target) return undefined;const visibleColumnIndex = visibleColumnIndexes.value.indexOf(target.col);@@ -6374,7 +6413,7 @@ function affectedRowIds(): number[] {if (range && range.startRow !== range.endRow) {return displayRowRefs.value.slice(range.startRow, range.endRow + 1)- .filter((ref) => !("isDraft" in ref && ref.isDraft))+ .filter((ref) => !("isDraft" in ref && ref.isDraft) && transposeIncludesRow(ref.id)).map((ref) => ref.id);}return [];@@ -7103,7 +7142,7 @@ function applyColumnSort(column: string, columnIndex: number, direction: "asc" |const activeRecord = transposeRowIndex.value === null ? undefined : displayItemAt(transposeRowIndex.value);const activeRecordSelection = captureRowTargetForRefresh(activeRecord?.id ?? null);preservedTransposeRecordOnNextResult = activeRecordSelection ? { selection: activeRecordSelection, sourceResult: props.result } : null;- preserveTransposeOnNextResult.value = true;+ preserveTransposeForRefresh();}if (mode === "database" && (infiniteScrollEnabled.value || loadAllRowsActive.value)) {resetInfiniteScrollState();@@ -9138,11 +9177,7 @@ function selectTransposeCell(rowIndex: number, actualColIdx: number, event: Mousif (visibleColIdx < 0) return;clearRowSelection();invalidateContextMenuTarget();- if (event.shiftKey || event.metaKey || event.ctrlKey) {- extendCellSelectionTo(rowIndex, visibleColIdx);- } else {- selectSingleCell(rowIndex, visibleColIdx);- }+ applyCellNavigation({ rowIndex, colIndex: visibleColIdx }, event.shiftKey || event.metaKey || event.ctrlKey);transposeRowIndex.value = rowIndex;gridRef.value?.focus({ preventScroll: true });}@@ -9385,11 +9420,15 @@ function pasteRowsIntoSelection(rows: readonly (readonly (string | null)[])[]):const start = pasteStartCell();if (!start) return false;+ const recordIndexes = isTransposeMode.value ? transposeScopeRecordIndexes.value : null;+ const startPosition = recordIndexes ? recordIndexes.indexOf(start.rowIndex) : start.rowIndex;+ if (startPosition < 0) return false;let applied = false;beginBatch();try {- for (const cell of planDataGridPaste(rows, displayRowCount.value - start.rowIndex, visibleColumns.value.length - start.colIndex)) {- const item = displayItemAt(start.rowIndex + cell.rowOffset);+ for (const cell of planDataGridPaste(rows, (recordIndexes?.length ?? displayRowCount.value) - startPosition, visibleColumns.value.length - start.colIndex)) {+ const rowIndex = recordIndexes ? recordIndexes[startPosition + cell.rowOffset] : start.rowIndex + cell.rowOffset;+ const item = displayItemAt(rowIndex);if (!item) continue;const visibleCol = start.colIndex + cell.columnOffset;applied = applyVisibleSelectedCellValue(item, visibleCol, cell.value, allowDraftSelectionValue) || applied;@@ -9430,7 +9469,7 @@ function applyVisibleCellValue(item: RowItem, visibleCol: number, value: string}function applyVisibleSelectedCellValue(item: RowItem, visibleCol: number, value: string | null, allowDraft = selectedRangeTargetsOnlyDraftRow(), options: { preserveEmptyString?: boolean; emptyStringAsNull?: boolean } = {}): boolean {- if (!canApplyGridSelectionValue({ isDraft: !!item.isDraft, allowDraft })) return false;+ if (!transposeIncludesRow(item.id) || !canApplyGridSelectionValue({ isDraft: !!item.isDraft, allowDraft })) return false;return applyVisibleCellValue(item, visibleCol, value, options);}@@ -9458,6 +9497,7 @@ function canReplaceGridCell(item: RowItem | undefined, col: number): boolean {}function replacementCellInScope(rowId: number, col: number): boolean {+ if (!transposeIncludesRow(rowId)) return false;if (replaceScope.value === "loaded") return true;if (replaceScope.value === "column") return col === replaceColumn.value;const rowIndex = displayRowIndexById(rowId);@@ -9541,7 +9581,7 @@ function fillSelectionWithValue(value: string | null, options: { preserveEmptyStconst item = displayItemAt(rowIndex);if (!item) continue;for (let visibleCol = range.startCol; visibleCol <= range.endCol; visibleCol++) {- applied = applyVisibleSelectedCellValue(item, visibleCol, value, allowDraftSelectionValue, options) || applied;+ if (cellIsSelected(rowIndex, visibleCol)) applied = applyVisibleSelectedCellValue(item, visibleCol, value, allowDraftSelectionValue, options) || applied;}}return applied;@@ -9570,7 +9610,7 @@ function selectionHasEditableCells(): boolean {const item = displayItemAt(rowIndex);if (!item) continue;for (let visibleCol = range.startCol; visibleCol <= range.endCol; visibleCol++) {- if (canEditCellItem(item, actualColumnIndex(visibleCol))) return true;+ if (transposeIncludesRow(item.id) && cellIsSelected(rowIndex, visibleCol) && canEditCellItem(item, actualColumnIndex(visibleCol))) return true;}}return false;@@ -9761,9 +9801,9 @@ function editableSelectionCells(): EditableSelectionCell[] {if (range) {for (let rowIndex = range.startRow; rowIndex <= range.endRow; rowIndex++) {const item = displayItemAt(rowIndex);- if (!item) continue;+ if (!item || !transposeIncludesRow(item.id)) continue;for (let visibleCol = range.startCol; visibleCol <= range.endCol; visibleCol++) {- if (canEditCellItem(item, actualColumnIndex(visibleCol))) cells.push({ item, visibleCol });+ if (cellIsSelected(rowIndex, visibleCol) && canEditCellItem(item, actualColumnIndex(visibleCol))) cells.push({ item, visibleCol });}}return cells;@@ -9772,9 +9812,9 @@ function editableSelectionCells(): EditableSelectionCell[] {const visibleColumnIndexes = selectedVisibleColumnIndexes();for (let rowIndex = 0; rowIndex < displayRowCount.value; rowIndex++) {const item = displayItemAt(rowIndex);- if (!item) continue;+ if (!item || !transposeIncludesRow(item.id)) continue;for (const visibleCol of visibleColumnIndexes) {- if (canEditCellItem(item, actualColumnIndex(visibleCol))) cells.push({ item, visibleCol });+ if (cellIsSelected(rowIndex, visibleCol) && canEditCellItem(item, actualColumnIndex(visibleCol))) cells.push({ item, visibleCol });}}return cells;@@ -10094,7 +10134,15 @@ function toggleKeyboardTranspose(): boolean {// Used by both moveSelectedCell (relative steps) and navigateSelectedCell (absolute/page jumps).function applyCellNavigation(nextPosition: CellPosition, extend = false, block: DataGridScrollAlignment = "nearest", previousPageRowIndex?: number): boolean {invalidateContextMenuTarget();- if (extend) extendCellSelectionTo(nextPosition.rowIndex, nextPosition.colIndex);+ if (extend && isTransposeMode.value && !multiRowTranspose.value && transposeSelectedRowIds.value && selectionAnchor.value) {+ const anchor = selectionAnchor.value;+ const keys = new Set<string>();+ for (const row of transposeScopeRecordIndexes.value) {+ if (row < Math.min(anchor.rowIndex, nextPosition.rowIndex) || row > Math.max(anchor.rowIndex, nextPosition.rowIndex)) continue;+ for (let col = Math.min(anchor.colIndex, nextPosition.colIndex); col <= Math.max(anchor.colIndex, nextPosition.colIndex); col++) keys.add(`${row}:${col}`);+ }+ restoreCellSelectionState({ anchor, focus: nextPosition, cellKeys: keys });+ } else if (extend) extendCellSelectionTo(nextPosition.rowIndex, nextPosition.colIndex);else selectSingleCell(nextPosition.rowIndex, nextPosition.colIndex);clearRowSelection();if (showTranspose.value) transposeRowIndex.value = nextPosition.rowIndex;@@ -10105,11 +10153,15 @@ function applyCellNavigation(nextPosition: CellPosition, extend = false, block:function moveSelectedCell(rowDelta: number, colDelta: number, extend = false): boolean {const position = dataGridNavigationOrigin(currentSelectedCellPosition(), selectionFocus.value, extend);if (!position || editingCell.value || displayRowCount.value === 0 || visibleColumnIndexes.value.length === 0) return false;- const nextPosition = moveDataGridCell(position, rowDelta, colDelta, {- rowCount: displayRowCount.value,+ const indexes = isTransposeMode.value ? transposeScopeRecordIndexes.value : null;+ const origin = indexes ? { ...position, rowIndex: indexes.indexOf(position.rowIndex) } : position;+ if (origin.rowIndex < 0) return false;+ const nextPosition = moveDataGridCell(origin, rowDelta, colDelta, {+ rowCount: indexes?.length ?? displayRowCount.value,visibleColumnCount: visibleColumnIndexes.value.length,});if (!nextPosition) return false;+ if (indexes) nextPosition.rowIndex = indexes[nextPosition.rowIndex];return applyCellNavigation(nextPosition, extend);}@@ -10430,6 +10482,10 @@ async function onGridKeydown(event: KeyboardEvent) {event.preventDefault();return;}+ if (["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"].includes(event.key)) {+ event.preventDefault();+ return;+ }}if (event.key === "ArrowUp" && moveSelectedCell(-1, 0, event.shiftKey)) {event.preventDefault();@@ -10791,12 +10847,64 @@ async function copyColumnDetailFieldValue(field: DataGridCellDetail) {if (resolved) copyText(detailClipboardText(resolved));}+function captureTransposeSelection() {+ const ids = new Set<number>();+ const addIndex = (index: number) => {+ const row = displayRowRefs.value[index];+ if (row) ids.add(row.id);+ };+ if (hasRowSelection.value) {+ for (const id of selectedRowIds.value) {+ if (displayRowIndexById(id) >= 0) ids.add(id);+ }+ } else if (hasColumnSelection.value || isSelectingAll.value) {+ // A column selection covers every displayed record.+ transposeSelectedRowIds.value = null;+ return;+ } else if (selectedCellKeys.value.size) {+ for (const key of selectedCellKeys.value) addIndex(Number(key.split(":")[0]));+ } else if (selectedRange.value) {+ for (let index = selectedRange.value.startRow; index <= selectedRange.value.endRow; index++) addIndex(index);+ }+ transposeSelectedRowIds.value = ids.size ? ids : null;+}++function transposeIncludesRow(rowId: number): boolean {+ return !showTranspose.value || multiRowTranspose.value || !transposeSelectedRowIds.value || transposeSelectedRowIds.value.has(rowId);+}++watch(+ showTranspose,+ (open) => {+ if (open) captureTransposeSelection();+ else transposeSelectedRowIds.value = null;+ },+ { flush: "sync" },+);++// Layout positions are dense, while cell operations retain original display indexes.+const transposeScopeRecordIndexes = computed(() => {+ if (multiRowTranspose.value || !transposeSelectedRowIds.value) return Array.from({ length: displayRowCount.value }, (_, index) => index);+ return selectedRowIdsAsDisplayIndexes(transposeSelectedRowIds.value).sort((a, b) => a - b);+});+const transposeActivePosition = computed(() => transposeScopeRecordIndexes.value.indexOf(transposeRowIndex.value ?? -1));++watch(transposeScopeRecordIndexes, (indexes) => {+ if (!showTranspose.value) return;+ if (!indexes.length) {+ closeTranspose(false);+ return;+ }+ if (!indexes.includes(transposeRowIndex.value ?? -1)) transposeRowIndex.value = indexes[0];+ scrollTransposeRecordIntoView(transposeRowIndex.value!, "nearest");+});+const transposeRecordWidths = ref<number[]>([]);const transposeManualRecordWidthIndexes = ref(new Set<number>());const transposeRecordOffsets = computed(() => {const offsets = [0];- for (let index = 0; index < displayRowCount.value; index += 1) {- offsets.push(offsets[index] + getTransposeRecordWidth(index));+ for (const index of transposeScopeRecordIndexes.value) {+ offsets.push(offsets[offsets.length - 1] + getTransposeRecordWidth(index));}return offsets;});@@ -10849,17 +10957,17 @@ const transposePinnedWidth = computed(}),);const transposeEndSpacerWidth = computed(() => {- if (!multiRowTranspose.value || displayRowCount.value <= 0) return 0;+ if (!transposeScopeRecordIndexes.value.length) return 0;return transposeEndAlignmentSpacerWidth({viewportWidth: transposeViewportWidth.value,pinnedWidth: transposePinnedWidth.value,- lastRecordWidth: getTransposeRecordWidth(displayRowCount.value - 1),+ lastRecordWidth: getTransposeRecordWidth(transposeScopeRecordIndexes.value[transposeScopeRecordIndexes.value.length - 1]),});});const transposeRecordWindow = computed(() =>visibleTransposeRecordWindow({- totalRecords: displayRowCount.value,+ totalRecords: transposeScopeRecordIndexes.value.length,scrollLeft: transposeScrollLeft.value,viewportWidth: transposeViewportWidth.value,pinnedWidth: transposePinnedWidth.value,@@ -10868,20 +10976,12 @@ const transposeRecordWindow = computed(() =>overscan: 2,}),);-const visibleTransposeRecordIndexes = computed(() => {+const activeTransposeRecordIndexes = computed(() => {const window = transposeRecordWindow.value;- return Array.from({ length: window.end - window.start }, (_, offset) => window.start + offset);+ return transposeScopeRecordIndexes.value.slice(window.start, window.end);});-const activeTransposeRecordIndexes = computed(() =>- transposeRecordIndexesForMode({- multiRow: multiRowTranspose.value,- activeRecordIndex: transposeRowIndex.value,- totalRecords: displayRowCount.value,- visibleRecordIndexes: visibleTransposeRecordIndexes.value,- }),-);-const transposeBeforeSpacerWidth = computed(() => (multiRowTranspose.value ? transposeRecordWindow.value.beforeWidth : 0));-const transposeAfterSpacerWidth = computed(() => (multiRowTranspose.value ? transposeRecordWindow.value.afterWidth + transposeEndSpacerWidth.value : 0));+const transposeBeforeSpacerWidth = computed(() => transposeRecordWindow.value.beforeWidth);+const transposeAfterSpacerWidth = computed(() => transposeRecordWindow.value.afterWidth + transposeEndSpacerWidth.value);const transposeColumnSortDirection = ref<"asc" | "desc" | null>(null);const transposeRows = computed(() => {const rows = buildVisibleTransposeRows({@@ -10903,10 +11003,7 @@ const transposeReserveTypeLine = computed(() => showTransposeFieldMetadata.valueconst transposeReserveCommentLine = computed(() => showTransposeFieldMetadata.value && showColumnCommentsInHeader.value && transposeRows.value.some((row) => row.comment));const transposeRowHeight = computed(() => 30 + (transposeReserveTypeLine.value ? 14 : 0) + (transposeReserveCommentLine.value ? 14 : 0));const isTransposeMode = computed(() => showTranspose.value && transposeRows.value.length > 0);-const transposeTotalWidth = computed(() => {- const recordIndexes = multiRowTranspose.value ? Array.from({ length: displayRowCount.value }, (_, i) => i) : activeTransposeRecordIndexes.value;- return transposePinnedWidth.value + recordIndexes.reduce((sum, i) => sum + getTransposeRecordWidth(i), 0) + (multiRowTranspose.value ? transposeEndSpacerWidth.value : 0);-});+const transposeTotalWidth = computed(() => transposePinnedWidth.value + transposeRecordOffsets.value[transposeRecordOffsets.value.length - 1] + transposeEndSpacerWidth.value);function transposeScrollElement(): HTMLElement | undefined {const raw = transposeScrollRef.value;@@ -10987,24 +11084,18 @@ function scrollTransposeRecordIntoView(rowIndex: number, alignment: TransposeScrnextTick(() => {const measuredEl = transposeScrollElement();if (!measuredEl || displayRowCount.value <= 0) return;- if (alignment === "start" && !multiRowTranspose.value) {- measuredEl.scrollLeft = 0;- updateTransposeViewport();- return;- }- const activeRecordIndex = Math.max(0, Math.min(displayRowCount.value - 1, rowIndex));- const multiRow = multiRowTranspose.value;- const recordOffsets = multiRow ? transposeRecordOffsets.value : [0, getTransposeRecordWidth(activeRecordIndex)];+ const recordPosition = transposeScopeRecordIndexes.value.indexOf(rowIndex);+ if (recordPosition < 0) return;measuredEl.scrollLeft = transposeScrollLeftForRecord({- recordIndex: multiRow ? activeRecordIndex : 0,- totalRecords: multiRow ? displayRowCount.value : 1,+ recordIndex: recordPosition,+ totalRecords: transposeScopeRecordIndexes.value.length,viewportWidth: measuredEl.clientWidth,pinnedWidth: transposePinnedWidth.value,- recordWidth: multiRow ? estimatedTransposeRecordWidth() : getTransposeRecordWidth(activeRecordIndex),- recordOffsets,+ recordWidth: estimatedTransposeRecordWidth(),+ recordOffsets: transposeRecordOffsets.value,currentScrollLeft: measuredEl.scrollLeft,alignment,- endSpacerWidth: multiRow ? transposeEndSpacerWidth.value : 0,+ endSpacerWidth: transposeEndSpacerWidth.value,});updateTransposeViewport();});@@ -11013,6 +11104,7 @@ function scrollTransposeRecordIntoView(rowIndex: number, alignment: TransposeScrfunction setMultiRowTranspose(value: boolean) {if (multiRowTranspose.value === value) return;+ if (!value && showTranspose.value) captureTransposeSelection();settingsStore.updateEditorSettings({ dataGridMultiRowTranspose: value });if (!showTranspose.value) return;nextTick(updateTransposeViewport);@@ -11046,6 +11138,7 @@ function focusInsertedTransposeRecord(rowId: number) {nextTick(() => {const displayIndex = displayRowIndexById(rowId);if (displayIndex >= 0) {+ if (transposeSelectedRowIds.value) transposeSelectedRowIds.value = new Set([...transposeSelectedRowIds.value, rowId]);applyTransposeState(nextTransposeStateForRecordCount(true, displayIndex, displayRowCount.value));}});@@ -11099,7 +11192,7 @@ function autoFitTransposeRecord(recordIndex: number) {function currentTransposeViewportRowIndex(): number {if (displayRowCount.value === 0) return 0;- const rowIndex = transposeRowIndex.value ?? transposeRecordWindow.value.start;+ const rowIndex = transposeRowIndex.value ?? transposeScopeRecordIndexes.value[transposeRecordWindow.value.start] ?? 0;return Math.max(0, Math.min(displayRowCount.value - 1, rowIndex));}@@ -11159,6 +11252,9 @@ function selectTransposeRecord(rowIndex: number, event?: MouseEvent) {if (item) {if (event) {handleRowClick(rowIndex, item.id, event);+ if (!multiRowTranspose.value && transposeSelectedRowIds.value) {+ selectedRowIds.value = new Set([...selectedRowIds.value].filter((id) => transposeIncludesRow(id)));+ }} else {selectedRowIds.value = new Set([item.id]);selection.lastClickedRowIndex.value = rowIndex;@@ -11188,8 +11284,10 @@ function transposeRecordUsesFramedHeader(rowIndex: number): boolean {function moveTransposeRecordSelection(delta: number): boolean {if (!isTransposeMode.value || displayRowCount.value === 0) return false;- const current = transposeRowIndex.value ?? 0;- const next = Math.max(0, Math.min(displayRowCount.value - 1, current + delta));+ const indexes = transposeScopeRecordIndexes.value;+ const current = Math.max(0, transposeActivePosition.value);+ const next = indexes[Math.max(0, Math.min(indexes.length - 1, current + delta))];+ if (next === undefined) return false;transposeRowIndex.value = next;scrollTransposeRecordIntoView(next);return true;@@ -11243,6 +11341,8 @@ watch(const detailsSnapshot = preservedDetailsOnNextResult;preservedDetailsOnNextResult = null;const shouldPreserveTranspose = preserveTransposeOnNextResult.value;+ const transposeScopeSnapshot = preservedTransposeScopeOnNextResult;+ preservedTransposeScopeOnNextResult = null;preserveTransposeOnNextResult.value = false;const appendRequestedOffset = infiniteScrollRequestedOffset;const appendRequestedLimit = infiniteScrollRequestedLimit;@@ -11275,6 +11375,7 @@ watch(}return;}+ transposeSelectedRowIds.value = null;resetDistinctValueCache();filterValueSuggestionLoader.reset({ clearCache: true });// A non-append result replaces the whole data set, so a running "load all" is over.@@ -11310,6 +11411,7 @@ watch(}exitTransaction();if (selectionSnapshot) restoreSelectionAfterRefresh(selectionSnapshot);+ if (shouldPreserveTranspose) restoreTransposeScopeAfterRefresh(transposeScopeSnapshot);if (transposeRecordSnapshot) restoreTransposeRecordAfterRefresh(transposeRecordSnapshot);if (detailsSnapshot) restoreDetailsAfterRefresh(detailsSnapshot);if (viewportAnchorSnapshot) restoreViewportAnchorAfterRefresh(viewportAnchorSnapshot);@@ -13851,10 +13953,10 @@ useUpdateBlocker(() => (hasPendingChanges.value || hasPendingDataEditorDraft.val{{ multiRowTranspose ? t("grid.transposeMultiRow") : t("grid.transposeSingleRow") }}</span><span class="flex-1" />- <Button variant="ghost" size="icon" class="h-5 w-5" :disabled="transposeRowIndex === 0" @click="transposeNav(-1)">+ <Button variant="ghost" size="icon" class="h-5 w-5" :disabled="transposeActivePosition <= 0" @click="transposeNav(-1)"><ChevronLeft class="w-3 h-3" /></Button>- <Button variant="ghost" size="icon" class="h-5 w-5" :disabled="transposeRowIndex === displayItems.length - 1" @click="transposeNav(1)">+ <Button variant="ghost" size="icon" class="h-5 w-5" :disabled="transposeActivePosition >= transposeScopeRecordIndexes.length - 1" @click="transposeNav(1)"><ChevronRight class="w-3 h-3" /></Button><Button variant="ghost" size="icon" class="h-5 w-5" @click="closeTranspose">diff --git a/apps/desktop/src/components/grid/__tests__/DataGridBatchPasteFromCell.spec.ts b/apps/desktop/src/components/grid/__tests__/DataGridBatchPasteFromCell.spec.tsindex 64e5dd24b7..cff9b804e4 100644--- a/apps/desktop/src/components/grid/__tests__/DataGridBatchPasteFromCell.spec.ts+++ b/apps/desktop/src/components/grid/__tests__/DataGridBatchPasteFromCell.spec.ts@@ -103,9 +103,10 @@ function mountGrid(options: MountGridOptions = {}) {const pinia = createPinia();setActivePinia(pinia);const settingsStore = useSettingsStore();- settingsStore.updateEditorSettings({ dataGridRenderMode: "canvas", dataGridHideNullColumns: options.hideNullColumns ?? false, dataGridQuickEntry: options.quickEntry ?? false });+ settingsStore.updateEditorSettings({ dataGridRenderMode: "canvas", dataGridMultiRowTranspose: false, dataGridHideNullColumns: options.hideNullColumns ?? false, dataGridQuickEntry: options.quickEntry ?? false });const resultRef = shallowRef(markRaw(options.result ?? defaultResult()));const visibleRef = shallowRef(true);+ const gridRef = shallowRef<InstanceType<typeof DataGrid> | null>(null);const host = document.createElement("div");document.body.append(host);@@ -121,6 +122,7 @@ function mountGrid(options: MountGridOptions = {}) {default: () =>visibleRef.value? h(DataGrid, {+ ref: gridRef,result: resultRef.value,databaseType: options.databaseType ?? "dameng",context: "table-data",@@ -155,7 +157,7 @@ function mountGrid(options: MountGridOptions = {}) {settingsStore.updateEditorSettings({ dataGridRenderMode: "dom" });const mounted = { app, host };mountedApps.push(mounted);- return { ...mounted, resultRef, visibleRef };+ return { ...mounted, resultRef, visibleRef, gridRef };}async function settle() {@@ -184,10 +186,10 @@ async function selectCell(cell: HTMLElement, options: { shiftKey?: boolean; ctrlawait settle();}-async function selectRowNumber(row: HTMLElement) {+async function selectRowNumber(row: HTMLElement, ctrlKey = false) {const rowNumber = row.querySelector<HTMLElement>(".data-grid-row-number");if (!rowNumber) throw new Error("Row number not found");- rowNumber.dispatchEvent(new MouseEvent("mousedown", { bubbles: true, cancelable: true, button: 0 }));+ rowNumber.dispatchEvent(new MouseEvent("mousedown", { bubbles: true, cancelable: true, button: 0, ctrlKey }));window.dispatchEvent(new MouseEvent("mouseup", { bubbles: true, cancelable: true, button: 0 }));await settle();}@@ -753,3 +755,113 @@ describe("DataGrid INSERT statement paste into blank new rows", () => {expect(visibleCellTexts(rows[1]!)[2]).toBe("b");});});++describe("selected transpose edit scope", () => {+ function resultWithThreeRows(): QueryResult {+ return {+ ...defaultResult(),+ rows: [+ [1, null, "first", "a"],+ [2, null, "hidden", "b"],+ [3, null, "third", "c"],+ ],+ };+ }++ async function toggleTranspose(host: HTMLElement) {+ gridRoot(host).dispatchEvent(new KeyboardEvent("keydown", { key: "Tab", bubbles: true, cancelable: true }));+ await settle();+ }++ function transposeCells(host: HTMLElement, columnIndex = 2): HTMLElement[] {+ const field = host.querySelector(`[data-grid-transpose-column-index="${columnIndex}"]`);+ return [...(field?.closest(".data-grid-transpose-row")?.querySelectorAll<HTMLElement>("[data-grid-transpose-cell]") ?? [])];+ }++ async function openSelectedRows(host: HTMLElement) {+ await settle();+ const rows = displayRows(host);+ await selectRowNumber(rows[0]);+ await selectRowNumber(rows[2], true);+ await toggleTranspose(host);+ expect(transposeCells(host).map((cell) => cell.textContent?.trim())).toEqual(["first", "third"]);+ }++ it.each(["keyboard", "mouse"])("fills only visible selected records after %s range selection", async (input) => {+ const { host } = mountGrid({ result: resultWithThreeRows() });+ await openSelectedRows(host);+ transposeCells(host)[0].click();+ await settle();+ if (input === "keyboard") {+ gridRoot(host).dispatchEvent(new KeyboardEvent("keydown", { key: "ArrowRight", shiftKey: true, bubbles: true, cancelable: true }));+ } else {+ transposeCells(host)[1].dispatchEvent(new MouseEvent("click", { shiftKey: true, bubbles: true }));+ }+ await settle();+ await paste(host, "changed");+ await toggleTranspose(host);+ expect(+ displayRows(host)+ .slice(0, 3)+ .map((row) => visibleCellTexts(row)[2]),+ ).toEqual(["changed", "hidden", "changed"]);+ });++ it("generates consecutive values and reports only the selected visible cells", async () => {+ const { host } = mountGrid({ result: resultWithThreeRows() });+ await openSelectedRows(host);+ transposeCells(host)[0].click();+ await settle();+ transposeCells(host)[1].dispatchEvent(new MouseEvent("click", { shiftKey: true, bubbles: true }));+ await settle();+ transposeCells(host)[1].dispatchEvent(new MouseEvent("contextmenu", { shiftKey: true, bubbles: true, cancelable: true, clientX: 12, clientY: 12 }));+ await settle();+ const menuButton = (label: string) => {+ const button = [...document.querySelectorAll<HTMLButtonElement>("[data-dbx-context-menu] button")].find((item) => item.textContent?.trim() === label);+ if (!button) throw new Error(`Context menu item not found: ${label}`);+ return button;+ };+ menuButton(i18n.global.t("grid.generateValue")).dispatchEvent(new MouseEvent("mouseenter", { bubbles: true }));+ await settle();+ menuButton(i18n.global.t("grid.generateIncrementId")).click();+ await settle();+ const dialog = document.querySelector<HTMLElement>("[role='dialog']")!;+ expect(dialog.textContent).toContain(i18n.global.t("grid.generateSequenceDescription", { count: 2 }));+ const apply = [...dialog.querySelectorAll<HTMLButtonElement>("button")].find((button) => button.textContent?.trim() === i18n.global.t("grid.applyBulkEdit"))!;+ apply.click();+ await settle();+ expect(useToast().message.value).toBe(i18n.global.t("grid.generatedValuesApplied", { count: 2 }));+ await toggleTranspose(host);+ expect(+ displayRows(host)+ .slice(0, 3)+ .map((row) => visibleCellTexts(row)[2]),+ ).toEqual(["1", "hidden", "2"]);+ });++ it("maps pasted records through the transpose scope and stops at its end", async () => {+ const { host } = mountGrid({ result: resultWithThreeRows() });+ await openSelectedRows(host);+ transposeCells(host)[0].click();+ await settle();+ await paste(host, "one\ntwo\nextra");+ await toggleTranspose(host);+ expect(+ displayRows(host)+ .slice(0, 3)+ .map((row) => visibleCellTexts(row)[2]),+ ).toEqual(["one", "hidden", "two"]);+ });++ it("restores the captured records by primary key after clicking a cell and refreshing reordered data", async () => {+ const original = resultWithThreeRows();+ const { host, gridRef, resultRef } = mountGrid({ result: original });+ await openSelectedRows(host);+ transposeCells(host)[0].click();+ await settle();+ await gridRef.value!.onToolbarRefresh();+ resultRef.value = markRaw({ ...original, rows: [original.rows[2], original.rows[0], original.rows[1]] });+ await settle();+ expect(transposeCells(host).map((cell) => cell.textContent?.trim())).toEqual(["third", "first"]);+ });+});diff --git a/apps/desktop/src/components/layout/ContentArea.vue b/apps/desktop/src/components/layout/ContentArea.vueindex 3f4a0f4fc1..7ce06f4098 100644--- a/apps/desktop/src/components/layout/ContentArea.vue+++ b/apps/desktop/src/components/layout/ContentArea.vue@@ -2360,7 +2360,7 @@ defineExpose({<span>{{ t("grid.transposeMultiRowToggle") }}</span></div><LightTooltip :text="t('grid.transposeMultiRowHint')" side="left" :side-offset="6" :delay="0" :open-on-focus="false">- <div class="grid w-32 grid-cols-2 rounded-md border bg-muted/40 p-0.5">+ <div class="grid min-w-40 grid-cols-2 rounded-md border bg-muted/40 p-0.5"><buttontype="button"class="h-5 min-w-0 truncate whitespace-nowrap rounded-[5px] px-2 text-xs transition-colors"@@ -3061,7 +3061,7 @@ defineExpose({<span>{{ t("grid.transposeMultiRowToggle") }}</span></div><LightTooltip :text="t('grid.transposeMultiRowHint')" side="left" :side-offset="6" :delay="0" :open-on-focus="false">- <div class="grid w-32 grid-cols-2 rounded-md border bg-muted/40 p-0.5">+ <div class="grid min-w-40 grid-cols-2 rounded-md border bg-muted/40 p-0.5"><buttontype="button"class="h-5 min-w-0 truncate whitespace-nowrap rounded-[5px] px-2 text-xs transition-colors"diff --git a/apps/desktop/src/i18n/locales/az.ts b/apps/desktop/src/i18n/locales/az.tsindex 57ea6e79ba..e4a8adff4d 100644--- a/apps/desktop/src/i18n/locales/az.ts+++ b/apps/desktop/src/i18n/locales/az.ts@@ -2461,10 +2461,10 @@ export default withEnglishFallback({copyQuerySql: "SQL-i kopyala",copyExecutableSql: "SQL-i kopyala (şərhlərsiz)",transpose: "Sətri transponə et",- transposeMultiRowToggle: "Çoxsətirli",- transposeSingleRow: "Cari sətir",- transposeMultiRow: "Çoxsətirli",- transposeMultiRowHint: "Aktiv olduqda transponə görünüşü bir neçə sətir göstərir. Deaktiv olduqda yalnız cari sətri göstərir.",+ transposeMultiRowToggle: "Transponə rejimi",+ transposeSingleRow: "Yalnız seçilmiş",+ transposeMultiRow: "Seçiləni vurğula",+ transposeMultiRowHint: "Yalnız seçilmiş: seçilmiş sətirləri, seçim olmadıqda isə bütün yüklənmiş sətirləri transponə edir. Seçiləni vurğula: bütün yüklənmiş sətirləri transponə edir və seçimi vurğulayır.",rowsPerPageShort: " sətir",columnDetails: "Sütunun təfərrüatları",tableInfo: "Cədvəl haqqında məlumat",diff --git a/apps/desktop/src/i18n/locales/en.ts b/apps/desktop/src/i18n/locales/en.tsindex b66433ea9f..e970db3972 100644--- a/apps/desktop/src/i18n/locales/en.ts+++ b/apps/desktop/src/i18n/locales/en.ts@@ -2918,10 +2918,10 @@ export default {copyQuerySql: "Copy SQL",copyExecutableSql: "Copy SQL (without comments)",transpose: "Transpose Row",- transposeMultiRowToggle: "Multi-row",- transposeSingleRow: "Current row",- transposeMultiRow: "Multi-row",- transposeMultiRowHint: "When enabled, transpose view shows multiple rows. When disabled, it only shows the current row.",+ transposeMultiRowToggle: "Transpose mode",+ transposeSingleRow: "Selected only",+ transposeMultiRow: "Highlight selected",+ transposeMultiRowHint: "Selected only: transpose selected rows, or all loaded rows when nothing is selected. Highlight selected: transpose all loaded rows and highlight the selection.",rowsPerPageShort: " rows",columnDetails: "Column Details",tableInfo: "Table Info",diff --git a/apps/desktop/src/i18n/locales/es.ts b/apps/desktop/src/i18n/locales/es.tsindex e1f45bad54..dfbd9e3d4f 100644--- a/apps/desktop/src/i18n/locales/es.ts+++ b/apps/desktop/src/i18n/locales/es.ts@@ -2728,10 +2728,10 @@ export default withEnglishFallback({noAlterSqlAvailable: "No hay SQL ALTER disponible para esta columna",copyAlterSqlFailed: "Error al copiar: {message}",transpose: "Transponer fila",- transposeMultiRowToggle: "Varias filas",- transposeSingleRow: "Fila actual",- transposeMultiRow: "Varias filas",- transposeMultiRowHint: "Cuando está activado, la vista transpuesta muestra varias filas. Cuando está desactivado, solo muestra la fila actual.",+ transposeMultiRowToggle: "Modo de transposición",+ transposeSingleRow: "Solo selección",+ transposeMultiRow: "Resaltar selección",+ transposeMultiRowHint: "Solo selección: transpone las filas seleccionadas, o todas las filas cargadas si no hay selección. Resaltar selección: transpone todas las filas cargadas y resalta la selección.",rowsPerPageShort: " filas",columnDetails: "Detalles de columna",tableInfoSearch: "Buscar...",diff --git a/apps/desktop/src/i18n/locales/id.ts b/apps/desktop/src/i18n/locales/id.tsindex 34e5db2bb8..42875ed717 100644--- a/apps/desktop/src/i18n/locales/id.ts+++ b/apps/desktop/src/i18n/locales/id.ts@@ -2742,10 +2742,10 @@ export default withEnglishFallback({copyQuerySql: "Salin SQL",copyExecutableSql: "Salin SQL (tanpa komentar)",transpose: "Transpos Baris",- transposeMultiRowToggle: "Multi-baris",- transposeSingleRow: "Baris saat ini",- transposeMultiRow: "Multi-baris",- transposeMultiRowHint: "Jika diaktifkan, tampilan transpos menampilkan beberapa baris. Jika dinonaktifkan, hanya menampilkan baris saat ini.",+ transposeMultiRowToggle: "Mode transpos",+ transposeSingleRow: "Hanya pilihan",+ transposeMultiRow: "Sorot pilihan",+ transposeMultiRowHint: "Hanya pilihan: transpos baris yang dipilih, atau semua baris yang dimuat jika tidak ada pilihan. Sorot pilihan: transpos semua baris yang dimuat dan sorot pilihan.",rowsPerPageShort: " baris",columnDetails: "Detail Kolom",tableInfo: "Info Tabel",diff --git a/apps/desktop/src/i18n/locales/it.ts b/apps/desktop/src/i18n/locales/it.tsindex 8c7e923913..afc107fd43 100644--- a/apps/desktop/src/i18n/locales/it.ts+++ b/apps/desktop/src/i18n/locales/it.ts@@ -2621,10 +2621,10 @@ export default withEnglishFallback({copyQuerySql: "Copia SQL",copyExecutableSql: "Copia SQL (senza commenti)",transpose: "Traspone Riga",- transposeMultiRowToggle: "Più righe",- transposeSingleRow: "Riga corrente",- transposeMultiRow: "Più righe",- transposeMultiRowHint: "Quando è attiva, la vista trasposta mostra più righe. Quando è disattiva, mostra solo la riga corrente.",+ transposeMultiRowToggle: "Modalità trasposizione",+ transposeSingleRow: "Solo selezione",+ transposeMultiRow: "Evidenzia selezione",+ transposeMultiRowHint: "Solo selezione: traspone le righe selezionate o tutte le righe caricate se non vi è alcuna selezione. Evidenzia selezione: traspone tutte le righe caricate ed evidenzia la selezione.",rowsPerPageShort: " righe",columnDetails: "Dettagli Colonna",tableInfo: "Informazioni Tabella",diff --git a/apps/desktop/src/i18n/locales/ja.ts b/apps/desktop/src/i18n/locales/ja.tsindex 38fc4cdcb0..1d27506922 100644--- a/apps/desktop/src/i18n/locales/ja.ts+++ b/apps/desktop/src/i18n/locales/ja.ts@@ -2627,10 +2627,10 @@ export default withEnglishFallback({copyQuerySql: "SQLをコピー",copyExecutableSql: "SQLをコピー(コメントなし)",transpose: "行を転置",- transposeMultiRowToggle: "複数行",- transposeSingleRow: "現在の行",- transposeMultiRow: "複数行",- transposeMultiRowHint: "有効時は転置ビューに複数行が表示されます。無効時は現在の行のみ表示されます。",+ transposeMultiRowToggle: "転置モード",+ transposeSingleRow: "選択のみ",+ transposeMultiRow: "選択を強調",+ transposeMultiRowHint: "選択のみ:選択した行を転置し、未選択なら読み込み済みの全行を転置します。選択を強調:読み込み済みの全行を転置し、選択を強調表示します。",rowsPerPageShort: " 行",columnDetails: "列詳細",tableInfo: "テーブル情報",diff --git a/apps/desktop/src/i18n/locales/ko.ts b/apps/desktop/src/i18n/locales/ko.tsindex f08e3f0a6d..67d7a7331b 100644--- a/apps/desktop/src/i18n/locales/ko.ts+++ b/apps/desktop/src/i18n/locales/ko.ts@@ -2665,10 +2665,10 @@ export default withEnglishFallback({copyQuerySql: "SQL 복사",copyExecutableSql: "SQL 복사 (주석 제외)",transpose: "행 전치",- transposeMultiRowToggle: "다중 행",- transposeSingleRow: "현재 행",- transposeMultiRow: "다중 행",- transposeMultiRowHint: "활성화하면 전치 보기에 여러 행을 표시합니다. 비활성화하면 현재 행만 표시합니다.",+ transposeMultiRowToggle: "전치 모드",+ transposeSingleRow: "선택만",+ transposeMultiRow: "선택 강조",+ transposeMultiRowHint: "선택만: 선택한 행을 전치하며, 선택이 없으면 로드된 모든 행을 전치합니다. 선택 강조: 로드된 모든 행을 전치하고 선택 항목을 강조합니다.",rowsPerPageShort: "행",columnDetails: "컬럼 상세",tableInfo: "테이블 정보",diff --git a/apps/desktop/src/i18n/locales/pt-BR.ts b/apps/desktop/src/i18n/locales/pt-BR.tsindex 3077523d86..9b8da25b08 100644--- a/apps/desktop/src/i18n/locales/pt-BR.ts+++ b/apps/desktop/src/i18n/locales/pt-BR.ts@@ -2622,10 +2622,10 @@ export default withEnglishFallback({copyQuerySql: "Copiar SQL",copyExecutableSql: "Copiar SQL (sem comentários)",transpose: "Transpor Linha",- transposeMultiRowToggle: "Várias linhas",- transposeSingleRow: "Linha atual",- transposeMultiRow: "Várias linhas",- transposeMultiRowHint: "Quando ativado, a visualização transposta mostra várias linhas. Quando desativado, mostra apenas a linha atual.",+ transposeMultiRowToggle: "Modo de transposição",+ transposeSingleRow: "Só selecionadas",+ transposeMultiRow: "Destacar seleção",+ transposeMultiRowHint: "Só selecionadas: transpõe as linhas selecionadas ou todas as linhas carregadas quando não há seleção. Destacar seleção: transpõe todas as linhas carregadas e destaca a seleção.",rowsPerPageShort: " linhas",columnDetails: "Detalhes da Coluna",tableInfo: "Informações da Tabela",diff --git a/apps/desktop/src/i18n/locales/ru.ts b/apps/desktop/src/i18n/locales/ru.tsindex 3e8d60b538..755b38d8d7 100644--- a/apps/desktop/src/i18n/locales/ru.ts+++ b/apps/desktop/src/i18n/locales/ru.ts@@ -2802,10 +2802,10 @@ export default withEnglishFallback({copyQuerySql: "Копировать SQL",copyExecutableSql: "Копировать SQL (без комментариев)",transpose: "Транспонировать строку",- transposeMultiRowToggle: "Несколько строк",- transposeSingleRow: "Текущая строка",- transposeMultiRow: "Несколько строк",- transposeMultiRowHint: "Если включено, режим транспонирования показывает несколько строк. Если выключено — только текущую строку.",+ transposeMultiRowToggle: "Режим транспонирования",+ transposeSingleRow: "Только выбранные",+ transposeMultiRow: "Выделить выбранные",+ transposeMultiRowHint: "Только выбранные: транспонировать выбранные строки, а при отсутствии выбора — все загруженные строки. Выделить выбранные: транспонировать все загруженные строки и подсветить выбранные.",rowsPerPageShort: " строк",columnDetails: "Сведения о столбце",tableInfo: "Информация о таблице",diff --git a/apps/desktop/src/i18n/locales/tr.ts b/apps/desktop/src/i18n/locales/tr.tsindex 1fea25f3ac..9b030e201d 100644--- a/apps/desktop/src/i18n/locales/tr.ts+++ b/apps/desktop/src/i18n/locales/tr.ts@@ -2454,10 +2454,10 @@ export default withEnglishFallback({copyQuerySql: "SQL Kopyala",copyExecutableSql: "SQL'i kopyala (yorumlar olmadan)",transpose: "Satırı Devrik Göster",- transposeMultiRowToggle: "Çok satırlı",- transposeSingleRow: "Geçerli satır",- transposeMultiRow: "Çok satırlı",- transposeMultiRowHint: "Etkinleştirildiğinde devrik görünüm birden çok satırı gösterir. Kapatıldığında yalnızca geçerli satırı gösterir.",+ transposeMultiRowToggle: "Devrik görünüm modu",+ transposeSingleRow: "Yalnız seçilen",+ transposeMultiRow: "Seçileni vurgula",+ transposeMultiRowHint: "Yalnız seçilen: seçili satırları, seçim yoksa yüklenen tüm satırları devrik gösterir. Seçileni vurgula: yüklenen tüm satırları devrik gösterir ve seçimi vurgular.",rowsPerPageShort: " satır",columnDetails: "Sütun Ayrıntıları",tableInfo: "Tablo Bilgisi",diff --git a/apps/desktop/src/i18n/locales/zh-CN.ts b/apps/desktop/src/i18n/locales/zh-CN.tsindex 7160293c3c..88ccae0dba 100644--- a/apps/desktop/src/i18n/locales/zh-CN.ts+++ b/apps/desktop/src/i18n/locales/zh-CN.ts@@ -2853,10 +2853,10 @@ export default withEnglishFallback({copyQuerySql: "复制 SQL",copyExecutableSql: "复制 SQL(不含注释)",transpose: "转置查看",- transposeMultiRowToggle: "多行转置",- transposeSingleRow: "当前行",- transposeMultiRow: "多行",- transposeMultiRowHint: "开启后,转置视图会同时显示多行;关闭时仅显示当前行。",+ transposeMultiRowToggle: "转置模式",+ transposeSingleRow: "仅选中",+ transposeMultiRow: "高亮选中",+ transposeMultiRowHint: "仅选中:只转置选中的行,未选择时转置全部已加载行。高亮选中:转置全部已加载行,并高亮选中的行。",rowsPerPageShort: " 行/页",columnDetails: "列详情",tableInfo: "表属性",diff --git a/apps/desktop/src/i18n/locales/zh-TW.ts b/apps/desktop/src/i18n/locales/zh-TW.tsindex e9e71f07b5..ceaa5dc8e3 100644--- a/apps/desktop/src/i18n/locales/zh-TW.ts+++ b/apps/desktop/src/i18n/locales/zh-TW.ts@@ -2627,10 +2627,10 @@ export default withEnglishFallback({copyQuerySql: "複製 SQL",copyExecutableSql: "複製 SQL(不含註解)",transpose: "轉置檢視",- transposeMultiRowToggle: "多列轉置",- transposeSingleRow: "目前列",- transposeMultiRow: "多列",- transposeMultiRowHint: "開啟後,轉置檢視會同時顯示多列;關閉時僅顯示目前列。",+ transposeMultiRowToggle: "轉置模式",+ transposeSingleRow: "僅選取",+ transposeMultiRow: "醒目選取",+ transposeMultiRowHint: "僅選取:只轉置選取的列,未選取時轉置全部已載入列。醒目選取:轉置全部已載入列,並醒目顯示選取的列。",rowsPerPageShort: " 筆/頁",columnDetails: "欄位詳情",tableInfo: "資料表屬性",