From 91dbc39bad3678dde1a5aad465c05eb14d394ec6 Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Mon, 8 Nov 2021 22:41:27 +0800 Subject: [PATCH] fix: collapse animation not work, close #4856 --- components/_util/requestAnimationTimeout.js | 2 +- components/collapse/CollapsePanel.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/_util/requestAnimationTimeout.js b/components/_util/requestAnimationTimeout.js index beae9ea29..f82f19fed 100644 --- a/components/_util/requestAnimationTimeout.js +++ b/components/_util/requestAnimationTimeout.js @@ -5,7 +5,7 @@ const raf = getRequestAnimationFrame(); export const cancelAnimationTimeout = frame => caf(frame.id); -export const requestAnimationTimeout = (callback, delay) => { +export const requestAnimationTimeout = (callback, delay = 0) => { const start = Date.now(); function timeout() { if (Date.now() - start >= delay) { diff --git a/components/collapse/CollapsePanel.tsx b/components/collapse/CollapsePanel.tsx index c845f3035..4074790dc 100644 --- a/components/collapse/CollapsePanel.tsx +++ b/components/collapse/CollapsePanel.tsx @@ -79,7 +79,7 @@ export default defineComponent({ > ); const transitionProps = { - appear: true, + appear: false, css: false, ...openAnimation, };