2
0
mirror of https://github.com/frappe/books.git synced 2024-12-23 11:29:03 +00:00

fix(ui): transition on modal

This commit is contained in:
18alantom 2022-11-08 14:49:28 +05:30
parent 88f601511d
commit 9bcb651f02

View File

@ -1,4 +1,5 @@
<template> <template>
<Transition>
<div <div
class=" class="
fixed fixed
@ -16,13 +17,22 @@
v-if="openModal" v-if="openModal"
> >
<div <div
class="bg-white rounded-lg shadow-2xl w-form border overflow-hidden" class="
bg-white
rounded-lg
shadow-2xl
w-form
border
overflow-hidden
inner
"
v-bind="$attrs" v-bind="$attrs"
@click.stop @click.stop
> >
<slot></slot> <slot></slot>
</div> </div>
</div> </div>
</Transition>
</template> </template>
<script lang="ts"> <script lang="ts">
@ -60,3 +70,28 @@ export default defineComponent({
}, },
}); });
</script> </script>
<style scoped>
.v-enter-active,
.v-leave-active {
transition: all 100ms ease-out;
}
.inner {
transition: all 150ms ease-out;
}
.v-enter-from,
.v-leave-to {
opacity: 0;
}
.v-enter-from .inner,
.v-leave-to .inner {
transform: translateY(-50px);
}
.v-enter-to .inner,
.v-leave-from .inner {
transform: translateY(0px);
}
</style>