WIP Анимация карточек и переключателя календаря

This commit is contained in:
Daria Golova
2022-12-12 18:14:45 +03:00
parent af01eecda7
commit 39b39d5533
4 changed files with 36 additions and 17 deletions

View File

@@ -13,19 +13,20 @@
img.icon-wrapper.cursor-pointer(src="@/assets/icons/lock.svg") img.icon-wrapper.cursor-pointer(src="@/assets/icons/lock.svg")
column-header-checkbox column-header-checkbox
.body.pl-1 .body.pl-1
calendar-event-card( transition-group(name="card", tag="div")
v-for="event in dayEvents", calendar-event-card(
:key="event.id", v-for="event in dayEvents",
:id="event.id", :key="event.id",
:ownerEvent="event", :id="event.id",
:event-types="eventTypes", :ownerEvent="event",
:style="eventCardPosition(event.start, event.end)", :event-types="eventTypes",
:change-form-was-closed="changeFormWasClosed", :style="eventCardPosition(event.start, event.end)",
@selected-event="transmitEventData", :change-form-was-closed="changeFormWasClosed",
@reset-change-form="transmitResetChangeForm", @selected-event="transmitEventData",
@delete-event="transmitDeleteEvent", @reset-change-form="transmitResetChangeForm",
:schedule-body-ref="scheduleBodyRef" @delete-event="transmitDeleteEvent",
) :schedule-body-ref="scheduleBodyRef"
)
</template> </template>
<script> <script>
@@ -132,4 +133,21 @@ export default {
.owner-name .owner-name
color: var(--font-dark-blue-color) color: var(--font-dark-blue-color)
.card-enter-from
opacity: 0
pointer-events: none
.card-enter-active
transition: 0.3s ease
.card-leave-to
opacity: 0
pointer-events: none
.card-leave-active
transition: 0.3s ease
.card-move
transition: 0.3s ease
</style> </style>

View File

@@ -1,10 +1,10 @@
<template lang="pug"> <template lang="pug">
.layout-switch-wrapper.inline-block .layout-switch-wrapper.inline-block
button#day.py-2.px-3( button#day.py-2.px-3.transition.duration-200.ease-linear(
:class="dayLayoutState", :class="dayLayoutState",
@click="changeSelectedLayout" @click="changeSelectedLayout"
) День ) День
button#week.py-2.px-3( button#week.py-2.px-3.transition.duration-200.ease-linear(
:class="weekLayoutState", :class="weekLayoutState",
@click="changeSelectedLayout" @click="changeSelectedLayout"
) Неделя ) Неделя

View File

@@ -63,7 +63,7 @@
transition(name="section", mode="out-in") transition(name="section", mode="out-in")
.flex.justify-center.items-center( .flex.justify-center.items-center(
v-if="sectionDataPresence", v-if="sectionDataPresence",
:style="{height: settings[section].voidHeight + 'px'}" :style="{height: settings[section].voidHeight + 'px'}",
) )
base-loader( base-loader(
:width="60", :width="60",
@@ -72,6 +72,7 @@
.section-body.flex.flex-col.gap-y-4.px-4( .section-body.flex.flex-col.gap-y-4.px-4(
v-else-if="(this.isData || this.isAddress || this.isAttachments) && !isChange", v-else-if="(this.isData || this.isAddress || this.isAttachments) && !isChange",
:class="{'pt-3 pb-4': isData || isAddress || isAttachments}", :class="{'pt-3 pb-4': isData || isAddress || isAttachments}",
:style="{height: settings[section].voidHeight + 'px'}"
) )
.flex.flex-col.gap-y-4 .flex.flex-col.gap-y-4
.flex.flex-col(v-for="(item, key) in sectionInfo", class="gap-y-1.5") .flex.flex-col(v-for="(item, key) in sectionInfo", class="gap-y-1.5")

View File

@@ -126,7 +126,7 @@ export const detail = {
issued_by_date: "Дата", issued_by_date: "Дата",
}, },
width: 280, width: 280,
voidHeight: 242, voidHeight: 244,
}, },
snils: { snils: {
title: "СНИЛС", title: "СНИЛС",