populate events trough apicall and save active event in url
This commit is contained in:
parent
fbf6d9dc91
commit
cc9ba38dac
11 changed files with 137 additions and 61 deletions
48
src/views/Items.vue
Normal file
48
src/views/Items.vue
Normal file
|
@ -0,0 +1,48 @@
|
|||
<template>
|
||||
<div class="container-fluid px-xl-5 mt-3">
|
||||
<div class="row" v-if="layout === 'table'">
|
||||
<div class="col-xl-8 offset-xl-2">
|
||||
<Table
|
||||
:columns="['uid', 'description', 'box', 'image']"
|
||||
:items="loadedItems"
|
||||
:keyName="'uid'"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<Cards
|
||||
v-if="layout === 'cards'"
|
||||
:columns="['uid', 'description', 'box', 'image']"
|
||||
:items="loadedItems"
|
||||
:keyName="'uid'"
|
||||
v-slot="{ item }"
|
||||
>
|
||||
<img
|
||||
:src="`https://picsum.photos/id/${item.image + 50}/200/200`"
|
||||
alt="item"
|
||||
class="card-img-top img-fluid"
|
||||
>
|
||||
<div class="card-body">
|
||||
<h6 class="card-title">{{ item.description }}</h6>
|
||||
<h6 class="card-subtitle text-secondary">uid: {{ item.uid }} box: {{ item.box }}</h6>
|
||||
</div>
|
||||
</Cards>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Table from '@/components/Table';
|
||||
import Cards from '@/components/Cards';
|
||||
import { mapState } from 'vuex';
|
||||
export default {
|
||||
name: 'Items',
|
||||
components: { Table, Cards },
|
||||
created() {
|
||||
console.log(this.$route.params.event);
|
||||
},
|
||||
computed: mapState(['loadedItems', 'layout']),
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
Loading…
Add table
Add a link
Reference in a new issue