fix: don't show transition on first rendering #338

pull/344/head
tangjinzhou 2018-12-25 22:17:45 +08:00
parent cd2a5d74c3
commit 47f2ec4a67
1 changed files with 1 additions and 4 deletions

View File

@ -17,7 +17,7 @@ function animate (node, show, done, type) {
height = node.offsetHeight height = node.offsetHeight
// not get offsetHeight when appear // not get offsetHeight when appear
// set it into raf get correct offsetHeight // set it into raf get correct offsetHeight
if (type === 'appear' && height === 0) { if (height === 0) {
appearRequestAnimationFrameId = raf(() => { appearRequestAnimationFrameId = raf(() => {
height = node.offsetHeight height = node.offsetHeight
node.style.height = '0px' node.style.height = '0px'
@ -59,9 +59,6 @@ const animation = {
leave (node, done) { leave (node, done) {
return animate(node, false, done) return animate(node, false, done)
}, },
appear (node, done) {
return animate(node, true, done, 'appear')
},
} }
export default animation export default animation