From 4c786dd7a7f7943ce2d59883278ab561237027be Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Fri, 4 Mar 2022 11:50:11 +0800 Subject: [PATCH] perf: motion --- components/_util/transition.tsx | 2 +- components/vc-trigger/Popup/PopupInner.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/_util/transition.tsx b/components/_util/transition.tsx index 2a118849e..cf8177af2 100644 --- a/components/_util/transition.tsx +++ b/components/_util/transition.tsx @@ -29,7 +29,7 @@ export const getTransitionProps = (transitionName: string, opt: TransitionProps enterActiveClass: `${transitionName}-enter ${transitionName}-enter-prepare`, enterToClass: `${transitionName}-enter ${transitionName}-enter-active`, leaveFromClass: ` ${transitionName}-leave`, - leaveActiveClass: `${transitionName}-leave ${transitionName}-leave-active`, + leaveActiveClass: `${transitionName}-leave`, leaveToClass: `${transitionName}-leave ${transitionName}-leave-active`, ...opt, } diff --git a/components/vc-trigger/Popup/PopupInner.tsx b/components/vc-trigger/Popup/PopupInner.tsx index a9b4697ba..4f618b3c1 100644 --- a/components/vc-trigger/Popup/PopupInner.tsx +++ b/components/vc-trigger/Popup/PopupInner.tsx @@ -115,9 +115,9 @@ export default defineComponent({ }; watch( - [toRef(motion.value, 'name'), status], + [motion, status], () => { - if (!motion.value.name && status.value === 'motion') { + if (!motion.value && status.value === 'motion') { goNextStatus(); } },