Skip to content

Commit 47f2ec4

Browse files
committed
fix: don't show transition on first rendering #338
1 parent cd2a5d7 commit 47f2ec4

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

components/_util/openAnimation.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function animate (node, show, done, type) {
1717
height = node.offsetHeight
1818
// not get offsetHeight when appear
1919
// set it into raf get correct offsetHeight
20-
if (type === 'appear' && height === 0) {
20+
if (height === 0) {
2121
appearRequestAnimationFrameId = raf(() => {
2222
height = node.offsetHeight
2323
node.style.height = '0px'
@@ -59,9 +59,6 @@ const animation = {
5959
leave (node, done) {
6060
return animate(node, false, done)
6161
},
62-
appear (node, done) {
63-
return animate(node, true, done, 'appear')
64-
},
6562
}
6663

6764
export default animation

0 commit comments

Comments
 (0)