Files
PORTAL_COD2/src/front/src/components/carousel-numbers.vue
T

74 lines
2.0 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<template>
<!-- Компонент данных: Отображает цифры в виде слайд-группы карточек с анимацией счетчика -->
<v-card class="d-flex ml-3">
<v-sheet class="mx-auto" elevation="0" max-width="813">
<v-slide-group v-model="model" class="pa-0" mandatory selected-class="bg-primary" show-arrows>
<v-slide-group-item v-for="n in digitalData" :key="n">
<v-card class="ma-2 mt-4 d-flex flex-column" elevation="0" height="100" width="169">
<v-card class="h-100 text-center g text-black_grey">
<v-card-title class="statstyle my-2 py-0 text-overline font-weight-bold">
{{ n.status }}
</v-card-title>
<v-card-text class="numstyle mt-4 py-0 font-weight-bold">
<vue3-autocounter
ref="counter"
:duration="1"
:endAmount="Number(n.num)"
:startAmount="0"
/>
</v-card-text>
</v-card>
</v-card>
</v-slide-group-item>
</v-slide-group>
</v-sheet>
</v-card>
</template>
<script>
import { ref } from 'vue';
import { baseURL } from '@/utils/axios-api';
export default {
props: {
digitalData: {
type: Object,
default: () => {},
comment: 'Объект с данными для отображения',
},
},
setup() {
/**
* Получает базовый URL из конфигурации axios.
*/
const burl = baseURL.slice(0, -1);
/**
* Хранит выбранное значение модели для v-slide-group.
*/
const model = ref(false);
return { model, burl };
},
};
</script>
<style>
.numstyle {
font-size: 2.875rem !important;
line-height: 2.5rem !important;
font-family: cursive !important;
background: #ffffffb0;
}
.statstyle {
background: #ffffffb0;
font-size: 1rem !important;
}
.g {
background-color: rgb(255, 255, 255);
}
</style>