Skip to content

armgit / dbx

Public Imported from GitHub
0

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。

feat: show sort hint icon on column header hover (#165)

t8y20e2fbc5a4005
diff --git a/src/components/grid/DataGrid.vue b/src/components/grid/DataGrid.vue
index ad5a7de5f3..0f2855b5b6 100644
--- a/src/components/grid/DataGrid.vue
+++ b/src/components/grid/DataGrid.vue
@@ -10,6 +10,7 @@ import { useI18n } from "vue-i18n";
import {
ArrowUp,
ArrowDown,
+ ArrowUpDown,
Download,
Plus,
Trash2,
@@ -1433,7 +1434,7 @@ defineExpose({
:style="{ width: `var(--col-w-${colIdx})` }"
@click="toggleSort(col, colIdx)"
>
- <span class="flex min-w-0 items-center gap-1 overflow-hidden">
+ <span class="flex min-w-0 items-center gap-1 overflow-hidden group">
<span class="min-w-0 truncate">{{ col }}</span>
<ArrowUp
v-if="sortCol === col && sortColIndex === colIdx && sortDir === 'asc'"
@@ -1443,6 +1444,10 @@ defineExpose({
v-else-if="sortCol === col && sortColIndex === colIdx && sortDir === 'desc'"
class="h-3 w-3 shrink-0"
/>
+ <ArrowUpDown
+ v-else
+ class="h-3 w-3 shrink-0 opacity-0 group-hover:opacity-30 transition-opacity"
+ />
</span>
<div
class="absolute right-0 top-0 bottom-0 w-1.5 cursor-col-resize hover:bg-primary/30"