mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-02-02 13:17:57 +01:00
chore(Table): missing types
This commit is contained in:
@@ -96,7 +96,7 @@ export default defineComponent({
|
|||||||
default: () => []
|
default: () => []
|
||||||
},
|
},
|
||||||
columns: {
|
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
|
default: null
|
||||||
},
|
},
|
||||||
columnAttribute: {
|
columnAttribute: {
|
||||||
@@ -186,7 +186,7 @@ export default defineComponent({
|
|||||||
return selected.value.some((item) => compare(toRaw(item), toRaw(row)))
|
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) {
|
if (sort.value.column === column.key) {
|
||||||
const direction = !column.direction || column.direction === 'asc' ? 'desc' : 'asc'
|
const direction = !column.direction || column.direction === 'asc' ? 'desc' : 'asc'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user