2024-02-21 00:30:14 +01:00
|
|
|
<template>
|
|
|
|
<main>
|
|
|
|
<p>{{ globalData.magasin_explication }}</p>
|
|
|
|
<Projects :contents="magasin" />
|
|
|
|
</main>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import Projects from '@/components/Projects.vue';
|
|
|
|
|
|
|
|
export default {
|
2024-04-12 16:14:02 +02:00
|
|
|
async setup() {
|
2024-02-21 00:30:14 +01:00
|
|
|
const magasin = ref([]);
|
2024-04-06 00:46:44 +02:00
|
|
|
|
2024-04-12 00:23:57 +02:00
|
|
|
const { data: itemsData } = useFetch('/api/items/magasin', { server: true });
|
2024-04-06 00:46:44 +02:00
|
|
|
|
|
|
|
onBeforeMount(async () => {
|
2024-04-12 00:23:57 +02:00
|
|
|
if (itemsData.value) {
|
2024-04-06 00:46:44 +02:00
|
|
|
magasin.value = itemsData.value.data;
|
|
|
|
}
|
2024-02-21 00:30:14 +01:00
|
|
|
});
|
|
|
|
|
2024-04-12 16:14:02 +02:00
|
|
|
let globalData = await useFetchGlobalData();
|
|
|
|
globalData = globalData.globalData._object.$sglobalData;
|
2024-02-21 00:30:14 +01:00
|
|
|
|
|
|
|
return {
|
|
|
|
globalData,
|
2024-04-12 00:23:57 +02:00
|
|
|
magasin
|
2024-02-21 00:30:14 +01:00
|
|
|
};
|
|
|
|
},
|
|
|
|
components: {
|
|
|
|
Projects
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|