Проработать ссылку на эмблемку дня рождения. Выполнено

This commit is contained in:
iriska-gri committed 2024-04-12 11:25:18 +03:00
1 parent 0231d2970d
commit 1347f2ee6e
6 files changed
+157 -121

No files matched your search

+96 -86
View File
@@ -1,109 +1,119 @@
<template>
<v-carousel
cycle
interval="10000"
cover
height="450"
hide-delimiters
hide-delimiter-background
show-arrows="hover"
color="white"
<v-carousel
cycle
interval="10000"
cover
height="450"
hide-delimiters
hide-delimiter-background
show-arrows="hover"
color="white"
>
<v-carousel-item
v-for="(x, i) in carous"
:key="i"
:src="`${burl}${x.link}`"
cover
eager
>
<v-carousel-item
v-for="(x, i) in carous" :key="i"
:src="`${burl}${x.link}`"
cover
eager
<v-container
fill-height
fluid
pa-0
ma-0
pb-3
class="flex-column h-100 d-flex"
>
<v-card
v-if="x.text != '' || x.title != null"
class="bgCard h-100 d-flex flex-column"
>
<v-container
fill-height
fluid
pa-0 ma-0 pb-3
class="flex-column h-100 d-flex"
>
<v-card
v-if="x.text != '' || x.title != null"
class="bgCard h-100 d-flex flex-column"
>
<v-card-title v-if="x.title != null"
class="text-h3 text-uppercase titles text-text_carous ma-1 mb-0">
<v-row no-gutters >
<v-col class="align-self-center">
{{x.title}}
</v-col>
<v-col class="flex-grow-0">
<v-img
width="50"
:aspect-ratio="1"
:src="`${burl}${x.sender}`"
cover
/>
</v-col>
</v-row>
</v-card-title>
<v-card-text
v-if="x.text != ''"
class=" w-50 flex-grow-0 text-h6 bgText overflow-auto ma-1 pa-0"
>
<v-textarea
class="text-text_caroustext-black textareas font-weight-medium nocursor"
:model-value=x.text
variant='solo'
readonly
auto-grow
rows="1"
hide-details
flat
bg-color="transparent"
/>
</v-card-text>
</v-card>
</v-container>
</v-carousel-item>
</v-carousel>
<v-card-title
v-if="x.title != null"
class="text-h3 text-uppercase titles text-text_carous ma-1 mb-0"
>
<v-row no-gutters>
<v-col class="align-self-center">
{{ x.title }}
</v-col>
<v-col class="flex-grow-0">
<v-img
width="50"
:aspect-ratio="1"
:src="`${burl}${x.sender}`"
cover
/>
</v-col>
</v-row>
</v-card-title>
<v-card-text
v-if="x.text != ''"
class="w-50 flex-grow-0 text-h6 bgText overflow-auto ma-1 pa-0"
>
<v-textarea
class="text-text_caroustext-black textareas font-weight-medium nocursor"
:model-value="x.text"
variant="solo"
readonly
auto-grow
rows="1"
hide-details
flat
bg-color="transparent"
/>
</v-card-text>
</v-card>
</v-container>
</v-carousel-item>
</v-carousel>
</template>
<script>
import { ref } from 'vue'
import {getfromserver} from '@/utils/universal_functions'
import { baseURL } from '@/utils/axios-api'
import { ref } from "vue";
import { baseURL } from "@/utils/axios-api";
import { axiosApiInstance } from "@/utils/axios-api";
import { useAlertStore } from "@/store/useAlertStore";
export default {
setup() {
const burl = baseURL.slice(0, -1);
setup() {
const burl = baseURL.slice(0,-1)
const carous = ref([{ link: "newsimage/default.jpg" }]);
const feedalert = useAlertStore().alert;
const carous=ref([{link: "newsimage/default.jpg"}])
getfromserver("api/navigation/carousels/", carous)
return {
burl,
carous
const getfromserver = () => {
axiosApiInstance.get("api/navigation/carousels/").then((result) => {
if (result.data.mess != "") {
feedalert.alert = true;
feedalert.text = result.data.mess;
feedalert.color = "red-darken-2";
feedalert.ico = "mdi-alert-outline";
}
}
carous.value = result.data.result;
});
};
}
getfromserver();
return {
burl,
carous,
};
},
};
</script>
<style>
.titles {
font-family: cursive!important;
background: #ffffff8c;
font-family: cursive !important;
background: #ffffff8c;
}
.textareas .v-field__input {
font-size: 1.3em!important;
font-size: 1.3em !important;
}
.nocursor textarea {
cursor: default !important;
cursor: default !important;
}
</style>
</style>
@@ -241,9 +241,11 @@
<v-main v-if="accountStore.cod2user" class="d-flex bg-main_theme">
<router-view />
<v-expand-x-transition>
<alert-default />
</v-expand-x-transition>
</v-main>
<v-main v-else class="d-flex align-center text-h3 bg-teal-lighten-2">
+18 -1
View File
@@ -4,4 +4,21 @@
Импорт глобальный, прописан в src/front/src/components/UI/index.js
*Описание входящих параметров в useAlertStore.md*
#### Строка импорта:
```
import { useAlertStore } from '@/store/useAlertStore'
```
#### Переменная в setup:
```
const feedalert = useAlertStore().alert
```
#### Переменная alert содержит ключи:
|Ключ|Тип|Значение по умолчанию|Описание|
|-|--------|--------|--------|
|alert|boolean|false|Запуск/скрытие отоборажения на экране|
|text|string|''|Тект, который будет отображаться в алерте|
|ico|string|'mdi-plus'|Замена иконки, отображаемой слева от текста|
|color|string|''|Замена цвета|
@@ -4,14 +4,14 @@
:color=feedalert.color
:icon=feedalert.ico
theme="dark"
max-height="40"
width = "500"
min-height="40"
min-width = "500"
position="fixed"
location = "bottom"
class="mb-2"
v-model="feedalert.alert"
:text=feedalert.text
variant = "tonal"
density="compact"
>
</v-alert>
@@ -35,7 +35,7 @@ export default {
feedalert.ico=""
feedalert.color=""
feedalert.alert = false
}, 3000)
}, 8000)
}, {deep:true})