From 53413e1a7c41a3388850afc7f092fa7c42e9bd5d Mon Sep 17 00:00:00 2001 From: Yeong Date: Thu, 27 Oct 2022 21:07:19 +0800 Subject: [PATCH] fix: add topLeft and topRight animation (#822) --- assets/index.less | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/assets/index.less b/assets/index.less index c7f91afcf..4af07760c 100644 --- a/assets/index.less +++ b/assets/index.less @@ -315,12 +315,15 @@ } &-slide-up-enter&-slide-up-enter-active&-placement-topLeft, - &-slide-up-appear&-slide-up-appear-active&-placement-topLeft { + &-slide-up-appear&-slide-up-appear-active&-placement-topLeft, + &-slide-up-enter&-slide-up-enter-active&-placement-topRight, + &-slide-up-appear&-slide-up-appear-active&-placement-topRight { animation-name: rcSelectDropdownSlideDownIn; animation-play-state: running; } - &-slide-up-leave&-slide-up-leave-active&-placement-topLeft { + &-slide-up-leave&-slide-up-leave-active&-placement-topLeft, + &-slide-up-leave&-slide-up-leave-active&-placement-topRight { animation-name: rcSelectDropdownSlideDownOut; animation-play-state: running; } @@ -351,6 +354,34 @@ } } +@keyframes rcSelectDropdownSlideDownIn { + 0% { + transform: scaleY(0); + transform-origin: 100% 100%; + opacity: 0; + } + + 100% { + transform: scaleY(1); + transform-origin: 100% 100%; + opacity: 1; + } +} + +@keyframes rcSelectDropdownSlideDownOut { + 0% { + transform: scaleY(1); + transform-origin: 100% 100%; + opacity: 1; + } + + 100% { + transform: scaleY(0); + transform-origin: 100% 100%; + opacity: 0; + } +} + @keyframes rcSelectLoadingIcon { 0% { transform: rotate(0);