create basic table component

This commit is contained in:
busti 2019-11-14 04:37:35 +01:00
parent fd0f3bd770
commit 66b1e070d6
2 changed files with 27 additions and 79 deletions

23
src/components/Table.vue Normal file
View file

@ -0,0 +1,23 @@
<template>
<table class="table table-striped table-dark">
<thead>
<tr>
<th scope="col" v-for="(column, index) in columns" :key="index">{{ column.name }}</th>
</tr>
</thead>
</table>
</template>
<script>
export default {
name: 'Table',
data: () => ({
columns: [
{ name: 'uid', sortFn: (items) => items },
{ name: 'description', sortFn: (items) => items },
{ name: 'box', sortFn: (items) => items },
{ name: 'image', sortFn: (items) => items }
]
})
};
</script>