mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-19 06:21:46 +01:00
chore(Table): missing types
This commit is contained in:
@@ -96,7 +96,7 @@ export default defineComponent({
|
||||
default: () => []
|
||||
},
|
||||
columns: {
|
||||
type: Array as PropType<{ key: string, sortable?: boolean, class?: string, [key: string]: any }[]>,
|
||||
type: Array as PropType<{ key: string, sortable?: boolean, direction?: 'asc' | 'desc', class?: string, [key: string]: any }[]>,
|
||||
default: null
|
||||
},
|
||||
columnAttribute: {
|
||||
@@ -186,7 +186,7 @@ export default defineComponent({
|
||||
return selected.value.some((item) => compare(toRaw(item), toRaw(row)))
|
||||
}
|
||||
|
||||
function onSort (column) {
|
||||
function onSort (column: { key: string, direction?: 'asc' | 'desc' }) {
|
||||
if (sort.value.column === column.key) {
|
||||
const direction = !column.direction || column.direction === 'asc' ? 'desc' : 'asc'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user