feat : creation du composant datatable (WIP)
This commit is contained in:
22
frontend/components/ui/UiDataTable.vue
Normal file
22
frontend/components/ui/UiDataTable.vue
Normal file
@@ -0,0 +1,22 @@
|
||||
<template>
|
||||
<table class="w-full border-collapse border border-slate-300">
|
||||
<thead>
|
||||
<tr>
|
||||
<th
|
||||
v-for="(column, index) in columns"
|
||||
:key="index"
|
||||
class="border border-slate-300 px-3 py-2 text-left"
|
||||
>
|
||||
{{ column }}
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
defineProps<{
|
||||
columns: string[]
|
||||
data?: any[]
|
||||
}>()
|
||||
</script>
|
||||
10
frontend/pages/datatable.vue
Normal file
10
frontend/pages/datatable.vue
Normal file
@@ -0,0 +1,10 @@
|
||||
<template>
|
||||
<UiDataTable
|
||||
:columns="rowsLabel"
|
||||
/>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
||||
const rowsLabel = ['Numéro', 'Date', 'Foursnisseur', 'Poids', 'Date', 'Foursnisseur', 'Poids', 'Date', 'Foursnisseur', 'Poids', 'Date', 'Foursnisseur', 'Poids', 'Date', 'Foursnisseur', 'Poids']
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user