#42 - collection switch from menu working
This commit is contained in:
parent
2909608b85
commit
75f361c20a
2 changed files with 13 additions and 7 deletions
|
|
@ -17,13 +17,19 @@
|
|||
@click="activeTabId = tab.id"
|
||||
>
|
||||
<span>{{ tab.name }}</span>
|
||||
<!--
|
||||
<ul>
|
||||
<li class="active"><span>Premières Lumières</span></li>
|
||||
<li><span>Éclat Hivernal</span></li>
|
||||
<li><span>Crépuscule Doré</span></li>
|
||||
<ul v-if="tab.id === 'inspirations'">
|
||||
<li
|
||||
v-for="collection in tab.collections"
|
||||
:class="{ active: collection.isActive }"
|
||||
@click="
|
||||
tab.images = collection.media;
|
||||
tab.collections.map((item) => (item.isActive = false));
|
||||
collection.isActive = true;
|
||||
"
|
||||
>
|
||||
<span>{{ collection.title }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
-->
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ export const useAddImagesModalStore = defineStore("add-images-modal", () => {
|
|||
component: ImagesResources,
|
||||
params: false,
|
||||
collections: [],
|
||||
activeCollectionImages: [],
|
||||
selectedImages: [],
|
||||
},
|
||||
]);
|
||||
|
|
@ -66,6 +65,7 @@ export const useAddImagesModalStore = defineStore("add-images-modal", () => {
|
|||
api.fetchData("inspirations").then((json) => {
|
||||
console.log(json);
|
||||
tabs.value[3].collections = json.page.inspirations;
|
||||
tabs.value[3].collections[0].isActive = true;
|
||||
tabs.value[3].images = json.page.inspirations[0].media;
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue