designtopack/src/components/Projects.vue

25 lines
664 B
Vue
Raw Normal View History

2024-09-04 11:28:12 +02:00
<template>
<h2 id="tabslist" class="sr-only">Projets</h2>
2024-09-10 08:49:09 +02:00
<template v-if="projects.children">
<Tabs :projects="projects.children" @update:currentTab="changeTab" />
<TabPanel :projects="projects.children" :currentTab="currentTab" />
2024-09-04 11:28:12 +02:00
</template>
</template>
<script setup>
import Tabs from "./Tabs.vue";
import TabPanel from "./TabPanel.vue";
2024-09-10 08:49:09 +02:00
import { useProjectsStore } from "../stores/projects";
2024-09-04 11:28:12 +02:00
import { ref } from "vue";
2024-09-10 08:49:09 +02:00
import { storeToRefs } from "pinia";
2024-09-04 11:28:12 +02:00
2024-09-10 08:49:09 +02:00
const { projects } = storeToRefs(useProjectsStore());
2024-09-04 11:28:12 +02:00
2024-09-10 08:49:09 +02:00
const currentTab = ref("current");
2024-09-04 11:28:12 +02:00
function changeTab(newValue) {
currentTab.value = newValue;
}
</script>
<style scoped></style>