redesign tabs
This commit is contained in:
parent
893d173c59
commit
0075a37ab2
4 changed files with 52 additions and 38 deletions
|
|
@ -1,8 +1,16 @@
|
|||
<template>
|
||||
<h2 id="tabslist" class="sr-only">Projets</h2>
|
||||
<template v-if="projects.children">
|
||||
<Tabs :projects="projects.children" @update:currentTab="changeTab" />
|
||||
<TabPanel :projects="projects.children" :currentTab="currentTab" />
|
||||
<template v-if="projects.length > 0">
|
||||
<Tabs
|
||||
:currentProjects="currentProjects"
|
||||
:archivedProjects="archivedProjects"
|
||||
@update:currentTab="changeTab"
|
||||
/>
|
||||
<TabPanel
|
||||
:currentProjects="currentProjects"
|
||||
:archivedProjects="archivedProjects"
|
||||
:currentTab="currentTab"
|
||||
/>
|
||||
</template>
|
||||
</template>
|
||||
<script setup>
|
||||
|
|
@ -12,9 +20,11 @@ import { useProjectsStore } from "../stores/projects";
|
|||
import { ref } from "vue";
|
||||
import { storeToRefs } from "pinia";
|
||||
|
||||
const { projects } = storeToRefs(useProjectsStore());
|
||||
const { projects, currentProjects, archivedProjects } = storeToRefs(
|
||||
useProjectsStore()
|
||||
);
|
||||
|
||||
const currentTab = ref("current");
|
||||
const currentTab = ref("currentProjects");
|
||||
|
||||
function changeTab(newValue) {
|
||||
currentTab.value = newValue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue