Настроила индикатор

This commit is contained in:
Daria Golova
2022-10-18 16:04:03 +03:00
parent b0b31b2ebc
commit fc7426c386
6 changed files with 124 additions and 42 deletions

View File

@@ -5,12 +5,11 @@
base-arrow-button.right-arrow.mr-6(@click="nextHandler")
.text.flex.items-center
span.font-medium.text-base {{ dateString }}
span.today.font-bold.text-xxs(v-if="isToday") Сегодня
span.today.font-bold.text-xxs(v-if="isCurrentDate") Сегодня
calendar-layout-switch(@selected="changeSelectedLayout")
</template>
<script>
import * as moment from "moment/moment";
import BaseArrowButton from "@/components/base/buttons/BaseArrowButton.vue";
import CalendarLayoutSwitch from "./CalendarLayoutSwitch.vue";
export default {
@@ -18,11 +17,7 @@ export default {
components: { BaseArrowButton, CalendarLayoutSwitch },
props: {
currentDate: Object,
},
data() {
return {
isToday: true,
};
isCurrentDate: Boolean,
},
computed: {
dateString() {
@@ -47,12 +42,6 @@ export default {
this.$emit("next-date");
},
},
watch: {
currentDate: function () {
this.isToday =
this.currentDate.format("DD.MM.YYYY") === moment().format("DD.MM.YYYY");
},
},
};
</script>