feat(grid): 列是否可排序 (#935)

This commit is contained in:
John Jin authored and GitHub committed 2026-06-09 16:43:53 +08:00
1 parent 96e11935c2
commit 354d21d086
12 files changed
+55

No files matched your search

@@ -381,6 +381,11 @@ function shortTypeName(t: string): string {
return t;
}
function headerColumnSortable(actualColIdx: number): boolean {
const resolved = props.result.column_sortables?.[actualColIdx];
return resolved !== undefined ? resolved : true;
}
function typeColorClass(t: string): string {
// Strip precision/scale suffix like (20,6)
const base = t.replace(/\(.*\)$/, "").toLowerCase();
@@ -6757,6 +6762,7 @@ const gridContextMenuItems = computed<ContextMenuItem[]>(() => {
</span>
</span>
<button
v-if="headerColumnSortable(col.actualColIdx)"
type="button"
class="flex h-4 w-4 shrink-0 items-center justify-center rounded text-muted-foreground hover:bg-muted hover:text-foreground"
:class="