Исправлена сборка объекта на бэке

This commit is contained in:
Alex committed 2024-01-23 17:51:41 +03:00
1 parent 241966bb89
commit 8885fa0949
2 files changed
+16 -14

No files matched your search

+15 -13
View File
@@ -9,19 +9,21 @@
<!-- {{ safetyData }} -->
<v-row class="bg-red">
<v-col>
<v-card class="bg-orange" v-for="item in safetyData" :key="item.id">
<v-card v-for="item in safetyData" :key="item.id">
<v-card-title>{{ item.name }}</v-card-title>
<v-card-actions v-for="category in item.categories" :key="category.id">
<v-card-actions v-for="category in item.categories" :key="item.id + category.id" >
<v-btn>{{ category.name }}</v-btn>
<v-btn :icon="showMore[category.id] ? 'mdi-chevron-up' : 'mdi-chevron-down'" @click="showMore[category.id] = !showMore[category.id]"></v-btn>
<v-btn
:icon="showMore[item.id + category.id] ? 'mdi-chevron-up' : 'mdi-chevron-down'"
@click="showMore[item.id + category.id] = !showMore[item.id + category.id]">
</v-btn>
<v-expand-transition>
<div v-show="showMore[category.id]">
<!-- <v-divider></v-divider> -->
<v-card-actions v-for="file in category.files" :key="file.id">
<v-card-text>{{ file.name }}</v-card-text>
<v-btn icon="mdi-eye" color="grey"></v-btn>
<v-btn icon='mdi-cloud-download' color="grey"></v-btn>
</v-card-actions>
<div v-show="showMore[item.id + category.id]">
<v-card-actions v-for="file in category.files" :key="file.id">
<v-card-text>{{ file.name }}</v-card-text>
<v-btn icon="mdi-eye" color="grey"></v-btn>
<v-btn icon='mdi-cloud-download' color="grey"></v-btn>
</v-card-actions>
</div>
</v-expand-transition>
</v-card-actions>
@@ -45,8 +47,7 @@ onBeforeMount(() => {
axiosApiInstance.get(`api/safety/files/`).then(result => {
safetyData.value = result.data
})
console.log(safetyData.value);
console.log(safetyData);
});
@@ -57,4 +58,5 @@ showMore.value = safetyData.value.reduce((acc, value) => {
</script>
<style></style>
<style>
</style>