handle empty content
This commit is contained in:
parent
445c7358a9
commit
d36c0de7dc
2 changed files with 12 additions and 8 deletions
|
|
@ -66,26 +66,30 @@ const closeWindow = ref()
|
|||
const tl = shallowRef()
|
||||
const ANIMATION_SETTINGS = {
|
||||
duration: 0.5,
|
||||
ease: 'power3.out',
|
||||
ease: 'expo.out',
|
||||
}
|
||||
onMounted(() => {
|
||||
tl.value = gsap.timeline()
|
||||
|
||||
tl.value.fromTo(
|
||||
dlWindow.value,
|
||||
{ opacity: 0, height: 0 },
|
||||
{ opacity: 1, height: 'auto', ...ANIMATION_SETTINGS },
|
||||
{ opacity: 0, clipPath: 'inset(0% 0% 100% 0%)' },
|
||||
{ opacity: 1, clipPath: 'inset(0% 0% 0% 0%)', ...ANIMATION_SETTINGS },
|
||||
)
|
||||
tl.value.fromTo(
|
||||
gifWindow.value,
|
||||
{ opacity: 0, height: 0 },
|
||||
{ opacity: 1, height: 'auto', ...ANIMATION_SETTINGS },
|
||||
{ opacity: 0, clipPath: 'inset(0% 0% 100% 0%)' },
|
||||
{
|
||||
opacity: 1,
|
||||
clipPath: 'inset(0% 0% 0% 0%)',
|
||||
...ANIMATION_SETTINGS,
|
||||
},
|
||||
'<+0.1',
|
||||
)
|
||||
tl.value.fromTo(
|
||||
contentWindow.value,
|
||||
{ opacity: 0, height: 0 },
|
||||
{ opacity: 1, height: 'auto', ...ANIMATION_SETTINGS },
|
||||
{ opacity: 0, clipPath: 'inset(0% 0% 100% 0%)' },
|
||||
{ opacity: 1, clipPath: 'inset(0% 0% 0% 0%)', ...ANIMATION_SETTINGS },
|
||||
'<+0.1',
|
||||
)
|
||||
tl.value.fromTo(
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<strapi-content class="strapi-copy" :content="content" />
|
||||
<strapi-content v-if="content" class="strapi-copy" :content="content" />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
|
|
|||
Loading…
Reference in a new issue