mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2026-04-23 18:28:34 +00:00
feat(table): 支持列排序配置
- design: TableColumnOptions.sortable 支持 boolean | string - table: 将 sortable 传递到表格列配置 Made-with: Cursor
This commit is contained in:
parent
7249b5106e
commit
4cd54d1397
@ -342,7 +342,7 @@ export interface TableColumnOptions<T = any> {
|
||||
prop?: string;
|
||||
align?: string;
|
||||
headerAlign?: string;
|
||||
sortable?: boolean;
|
||||
sortable?: boolean | string;
|
||||
sortOrders?: Array<'ascending' | 'descending'>;
|
||||
selectable?: (row: T, index: number) => boolean;
|
||||
};
|
||||
|
||||
@ -139,6 +139,7 @@ const tableColumns = computed(() =>
|
||||
prop: item.prop,
|
||||
type,
|
||||
selectable: item.selectable,
|
||||
sortable: item.sortable,
|
||||
},
|
||||
cell: type === 'selection' ? undefined : ({ row, $index }: any) => cellRender(item, { row, $index }),
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user