diff --git a/components/_util/openAnimation.js b/components/_util/openAnimation.js index 00be03f36..655629630 100644 --- a/components/_util/openAnimation.js +++ b/components/_util/openAnimation.js @@ -1,4 +1,4 @@ -import cssAnimation from 'css-animation' +import cssAnimation from './css-animation' import getRequestAnimationFrame, { cancelRequestAnimationFrame } from './getRequestAnimationFrame' const reqAnimFrame = getRequestAnimationFrame() @@ -44,9 +44,6 @@ const animation = { leave (node, done) { return animate(node, false, done) }, - // appear (node, done) { - // return animate(node, true, done) - // }, } export default animation diff --git a/components/collapse/Collapse.vue b/components/collapse/Collapse.vue index 4bc4efe4e..f0cb3e6a1 100644 --- a/components/collapse/Collapse.vue +++ b/components/collapse/Collapse.vue @@ -13,7 +13,7 @@ export default { props: { ...collapseProps, bordered: PropTypes.bool.def(true), - openAnimation: PropTypes.any.def({ ...animation, appear () { } }), + openAnimation: PropTypes.any.def(animation), change: PropTypes.func.def(() => {}), accordion: PropTypes.bool, }, diff --git a/components/collapse/src/Panel.vue b/components/collapse/src/Panel.vue index 3334deb02..c3533b780 100644 --- a/components/collapse/src/Panel.vue +++ b/components/collapse/src/Panel.vue @@ -27,7 +27,7 @@ export default { const transitionProps = { props: Object.assign({ - appear: false, + appear: true, css: false, }), on: { ...openAnimation }, @@ -56,6 +56,7 @@ export default { {...transitionProps} > {$slots.default} diff --git a/components/collapse/src/openAnimationFactory.js b/components/collapse/src/openAnimationFactory.js index c8cc8b41a..ff46398ec 100644 --- a/components/collapse/src/openAnimationFactory.js +++ b/components/collapse/src/openAnimationFactory.js @@ -1,4 +1,4 @@ -import cssAnimation from 'css-animation' +import cssAnimation from '../../_util/css-animation' function animate (node, show, transitionName, done) { let height