From 47f2ec4a67281ec01d9bccd86e58b304b131c2bf Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Tue, 25 Dec 2018 22:17:45 +0800 Subject: [PATCH] fix: don't show transition on first rendering #338 --- components/_util/openAnimation.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/components/_util/openAnimation.js b/components/_util/openAnimation.js index a047c7d1a..23a07ff7f 100644 --- a/components/_util/openAnimation.js +++ b/components/_util/openAnimation.js @@ -17,7 +17,7 @@ function animate (node, show, done, type) { height = node.offsetHeight // not get offsetHeight when appear // set it into raf get correct offsetHeight - if (type === 'appear' && height === 0) { + if (height === 0) { appearRequestAnimationFrameId = raf(() => { height = node.offsetHeight node.style.height = '0px' @@ -59,9 +59,6 @@ const animation = { leave (node, done) { return animate(node, false, done) }, - appear (node, done) { - return animate(node, true, done, 'appear') - }, } export default animation