добавление дефолтной картинки

This commit is contained in:
Denzel committed 2025-01-23 09:12:18 +03:00
1 parent 9bb97361ad
commit 14ea9ae9b8
2 files changed
+4 -3

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

+4 -3
View File
@@ -25,7 +25,7 @@
<v-carousel-item
v-for="(picture, index) in images"
:key="index"
:src="`${baseURL.slice(0, -1)}${picture}`">
:src="images[index].length < 1 ? defaultImage : `${baseURL.slice(0, -1)}${picture}`">
</v-carousel-item>
</v-carousel>
</v-col>
@@ -101,6 +101,7 @@ import Timer from "@/components/UI/Timer.vue"
import {baseURL} from "@/utils/axios-api";
import {computed, ref} from 'vue'
import {useAccountStore} from "@/store/AccountStore";
import defaultImage from '../../assets/emblem.png'
export default {
components: {Timer},
@@ -132,7 +133,7 @@ export default {
const user = accountStore.user;
const images = computed(() => {
return props.voteCard.files.length > 0 ? props.voteCard.files : ['/media/defaultimg/vote.png']
return props.voteCard.files.length > 0 ? props.voteCard.files : ['']
})
const date = new Date();
@@ -143,7 +144,7 @@ export default {
isFinished.value = true;
}
return {timeChange, baseURL, images, youSure, isFinished, user}
return {timeChange, baseURL, images, youSure, isFinished, user, defaultImage}
}
}