WIP Добавила возможность скрывать индикатор

This commit is contained in:
Daria Golova
2022-10-17 18:55:37 +03:00
parent 399f07ee6e
commit e114754e95
4 changed files with 37 additions and 7 deletions

View File

@@ -4,20 +4,30 @@
</template>
<script>
import * as moment from "moment/moment";
export default {
name: "CalendarClockColumn",
props: {
hoursArray: Array,
currentTime: String,
currentDate: Object,
},
computed: {
currentHour() {
return parseInt(this.currentTime.slice(0, -6), 10);
},
isCurrentDay() {
return (
this.currentDate.format("DD.MM.YYYY") === moment().format("DD.MM.YYYY")
);
},
},
methods: {
currentHourStyle(elem) {
if (parseInt(elem.slice(0, 3), 10) === this.currentHour) {
if (
parseInt(elem.slice(0, 3), 10) === this.currentHour &&
this.isCurrentDay
) {
return {
"current-time": true,
"font-bold": true,