From 98e4c3d1c201eba6d8a0bda960c73fba43c3a799 Mon Sep 17 00:00:00 2001 From: liangping <18786721@qq.com> Date: Wed, 14 Jun 2023 09:32:55 +0800 Subject: [PATCH] add animation --- src/components/Countdown.vue | 32 +++++++++++++++++++++++--- src/components/dynamic/TextElement.vue | 2 +- src/style.css | 15 ++++++++++++ 3 files changed, 45 insertions(+), 4 deletions(-) diff --git a/src/components/Countdown.vue b/src/components/Countdown.vue index 9aa6302b..26dc752a 100644 --- a/src/components/Countdown.vue +++ b/src/components/Countdown.vue @@ -1,20 +1,46 @@ + + diff --git a/src/components/dynamic/TextElement.vue b/src/components/dynamic/TextElement.vue index a0c0704d..5e9ae150 100644 --- a/src/components/dynamic/TextElement.vue +++ b/src/components/dynamic/TextElement.vue @@ -70,7 +70,7 @@ const isConvertable = computed(() => { {{ text }} - + diff --git a/src/style.css b/src/style.css index d710b6c0..98d838c1 100644 --- a/src/style.css +++ b/src/style.css @@ -36,4 +36,19 @@ html[data-theme='dark'] { .table th:first-child { position: relative; z-index: 2; +} + +.slide-up-enter-active, +.slide-up-leave-active { + transition: all 0.25s ease-out; +} + +.slide-up-enter-from { + opacity: 0; + transform: translateY(calc(80%)); +} + +.slide-up-leave-to { + opacity: 0; + transform: translateY(-calc(15%)); } \ No newline at end of file