mirror of
https://github.com/t8y2/dbx.git
synced 2026-10-29 08:11:06 +00:00
feat: show sort hint icon on column header hover (#165)
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user