,
This commit is contained in:
1 parent
3045a04fd1
commit
46b3290dc5
2 files changed
+26
-19
No files matched your search
@@ -1,34 +1,41 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-container>
|
<v-container>
|
||||||
<v-row dense justify="center">
|
<v-row dense justify="center">
|
||||||
<v-card class="bg-red-darken-2">
|
<v-card class="bg-red-darken-2 py-5">
|
||||||
<v-card-title> До окончания голосования осталось: </v-card-title>
|
<v-card-title class="text-uppercase"> До окончания голосования осталось: </v-card-title>
|
||||||
<v-row dense>
|
<v-row dense class="align-baseline justify-center">
|
||||||
<v-col>
|
<v-col cols="2" class="text-center">
|
||||||
<v-card>
|
<v-card class="bg-yellow-darken-4">
|
||||||
<v-card-title>{{ displayDays }}</v-card-title>
|
<v-card-title>{{ displayDays }}</v-card-title>
|
||||||
</v-card>
|
</v-card>
|
||||||
<v-card-subtitle>Дней</v-card-subtitle>
|
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col>
|
<div>:</div>
|
||||||
<v-card>
|
<v-col cols="2" class="text-center">
|
||||||
|
<v-card class="bg-yellow-darken-4">
|
||||||
<v-card-title>{{ displayHours }}</v-card-title>
|
<v-card-title>{{ displayHours }}</v-card-title>
|
||||||
</v-card>
|
</v-card>
|
||||||
<v-card-subtitle>Часов</v-card-subtitle>
|
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col>
|
<div>:</div>
|
||||||
<v-card>
|
<v-col cols="2" class="text-center">
|
||||||
|
<v-card class="bg-yellow-darken-4">
|
||||||
<v-card-title>{{ displayMinutes }}</v-card-title>
|
<v-card-title>{{ displayMinutes }}</v-card-title>
|
||||||
</v-card>
|
</v-card>
|
||||||
<v-card-subtitle>Минут</v-card-subtitle>
|
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col>
|
<div>:</div>
|
||||||
<v-card>
|
<v-col cols="2" class="text-center">
|
||||||
|
<v-card class="bg-yellow-darken-4">
|
||||||
<v-card-title>{{ displaySeconds }}</v-card-title>
|
<v-card-title>{{ displaySeconds }}</v-card-title>
|
||||||
</v-card>
|
</v-card>
|
||||||
<v-card-subtitle>Секунд</v-card-subtitle>
|
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
<v-row dense class="justify-center">
|
||||||
|
<v-card-subtitle opacity="false" class="text-uppercase">
|
||||||
|
{{ displayDays == 1 ? 'День' : displayDays > 1 && displayDays <= 4 ? 'Дня' : displayDays <= 0 ? 'Дней' : 'Дней'}}
|
||||||
|
</v-card-subtitle>
|
||||||
|
<v-card-subtitle opacity="false" class="text-uppercase">Часов</v-card-subtitle>
|
||||||
|
<v-card-subtitle opacity="false" class="text-uppercase">Минут</v-card-subtitle>
|
||||||
|
<v-card-subtitle opacity="false" class="text-uppercase">Секунд</v-card-subtitle>
|
||||||
|
</v-row>
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-row>
|
</v-row>
|
||||||
</v-container>
|
</v-container>
|
||||||
@@ -79,10 +86,10 @@ export default {
|
|||||||
const minutesOf = Math.floor((distance % hours.value) / minutes.value)
|
const minutesOf = Math.floor((distance % hours.value) / minutes.value)
|
||||||
const secondsOf = Math.floor((distance % minutes.value) / seconds)
|
const secondsOf = Math.floor((distance % minutes.value) / seconds)
|
||||||
|
|
||||||
displayDays.value = daysOf
|
displayDays.value = daysOf < 10 ? "0" + daysOf : daysOf
|
||||||
displayHours.value = minutesOf < 10 & minutesOf > 10 ? "0" + hoursOf : hoursOf
|
displayHours.value = hoursOf < 10 ? "0" + hoursOf : hoursOf
|
||||||
displayMinutes.value = minutesOf < 10 ? "0" + minutesOf : minutesOf
|
displayMinutes.value = minutesOf < 10 ? "0" + minutesOf : minutesOf
|
||||||
displaySeconds.value = minutesOf < 10 ? "0" + secondsOf : secondsOf
|
displaySeconds.value = secondsOf < 10 ? "0" + secondsOf : secondsOf
|
||||||
|
|
||||||
}, 1000)
|
}, 1000)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ export default {
|
|||||||
TimerUI,
|
TimerUI,
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
const end = new Date(2025, 0, 12, 23, 59, 59)
|
const end = new Date(2025, 0, 16, 13, 2, 59)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in new issue
Block a user