This commit is contained in:
Nukeap committed 2025-01-30 16:55:41 +03:00
1 parent c0b6e1ef99
commit 821d3ec7d2
9 files changed
+85 -42

No files matched your search

+23 -5
View File
@@ -1,6 +1,6 @@
<template>
<v-carousel
cycle
interval="10000"
cover
height="450"
@@ -9,10 +9,10 @@
:show-arrows="carous.length<2?false:'hover'"
color="white"
>
<v-carousel-item
v-for="(x, i) in carous"
:key="i"
<template v-for="(x, i) in carous" :key="i">
<v-carousel-item
v-if="!x.link.endsWith('mp4')"
:src="`${burl}${x.link}`"
cover
eager
@@ -67,6 +67,21 @@
</v-card>
</v-container>
</v-carousel-item>
<v-carousel-item v-else >
<div class="d-flex justify-center">
<video
style="height: 450px;"
controls
>
<source :src="`${burl}${x.link}`" type="video/mp4" />
Текущий браузер не поддерживает воспроизведение этого видео.
</video>
</div>
</v-carousel-item>
</template>
</v-carousel>
</template>
@@ -77,7 +92,9 @@ import { axiosApiInstance } from "@/utils/axios-api";
import { useAlertStore } from "@/store/useAlertStore";
export default {
setup() {
const burl = baseURL.slice(0, -1);
const carous = ref([{ link: `/media/newsimage/scales.jpg`, "title": null, "text": "" }]);
@@ -92,6 +109,7 @@ export default {
feedalert.ico = "mdi-alert-outline";
}
console.log(result.data);
if (result.data.result.length > 0) {
carous.value = result.data.result;
}