Карусель

This commit is contained in:
iriska-gri committed 2024-04-23 12:05:39 +03:00
1 parent a348f00bc1
commit e466928691
2 files changed
+16 -9

No files matched your search

+9 -3
View File
@@ -6,9 +6,10 @@
height="450"
hide-delimiters
hide-delimiter-background
show-arrows="hover"
:show-arrows="carous.length<2?false:'hover'"
color="white"
>
<v-carousel-item
v-for="(x, i) in carous"
:key="i"
@@ -16,6 +17,7 @@
cover
eager
>
<v-container
fill-height
fluid
@@ -78,7 +80,7 @@ export default {
setup() {
const burl = baseURL.slice(0, -1);
const carous = ref([{ link: "newsimage/default.jpg" }]);
const carous = ref([{ link: `/media/newsimage/scales.jpg`, "title": null, "text": "" }]);
const feedalert = useAlertStore().alert;
const getfromserver = () => {
@@ -89,7 +91,11 @@ export default {
feedalert.color = "red-darken-2";
feedalert.ico = "mdi-alert-outline";
}
carous.value = result.data.result;
console.log(result.data.result.length, 'result.data.result')
if (result.data.result.length > 0) {
carous.value = result.data.result;
}
});
};