feat: обновил типы в DataTable
Frontend CI / build-and-check (push) Successful in 26s
🚀 Create and publish a Docker image / Detect changes in backend and frontend (push) Successful in 6s
🚀 Create and publish a Docker image / Build & publish backend image (push) Successful in 13s
🚀 Create and publish a Docker image / Build & publish frontend image (push) Successful in 35s
🚀 Create and publish a Docker image / Update stack on Portainer (push) Successful in 3s
Backend CI / build-and-test (pull_request) Successful in 1m6s
Frontend CI / build-and-check (pull_request) Successful in 49s
Frontend Playwright / e2e (pull_request) Successful in 10m53s

This commit is contained in:
2026-05-28 20:00:05 +03:00
parent c93d205e34
commit 7f923cd612
4 changed files with 10 additions and 11 deletions
+5 -6
View File
@@ -1,16 +1,15 @@
<script setup lang="ts">
<script setup lang="ts" generic="TRow extends object">
type Column = { key: string; label: string; align?: 'left' | 'center' | 'right' }
type DataTableSlotRow = Record<string, any>
defineProps<{
columns: Column[]
rows: DataTableSlotRow[]
rows: TRow[]
}>()
defineSlots<Record<string, (props: { row: DataTableSlotRow; value: any }) => unknown>>()
defineSlots<Record<string, (props: { row: TRow; value: unknown }) => unknown>>()
function getCell(row: DataTableSlotRow, key: string): any {
return row[key]
function getCell(row: TRow, key: string): unknown {
return (row as Record<string, unknown>)[key]
}
</script>