update collapse animation
parent
c0f3169072
commit
1906809049
|
@ -1,4 +1,4 @@
|
||||||
import cssAnimation from 'css-animation'
|
import cssAnimation from './css-animation'
|
||||||
import getRequestAnimationFrame, { cancelRequestAnimationFrame } from './getRequestAnimationFrame'
|
import getRequestAnimationFrame, { cancelRequestAnimationFrame } from './getRequestAnimationFrame'
|
||||||
|
|
||||||
const reqAnimFrame = getRequestAnimationFrame()
|
const reqAnimFrame = getRequestAnimationFrame()
|
||||||
|
@ -44,9 +44,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)
|
|
||||||
// },
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default animation
|
export default animation
|
||||||
|
|
|
@ -13,7 +13,7 @@ export default {
|
||||||
props: {
|
props: {
|
||||||
...collapseProps,
|
...collapseProps,
|
||||||
bordered: PropTypes.bool.def(true),
|
bordered: PropTypes.bool.def(true),
|
||||||
openAnimation: PropTypes.any.def({ ...animation, appear () { } }),
|
openAnimation: PropTypes.any.def(animation),
|
||||||
change: PropTypes.func.def(() => {}),
|
change: PropTypes.func.def(() => {}),
|
||||||
accordion: PropTypes.bool,
|
accordion: PropTypes.bool,
|
||||||
},
|
},
|
||||||
|
|
|
@ -27,7 +27,7 @@ export default {
|
||||||
|
|
||||||
const transitionProps = {
|
const transitionProps = {
|
||||||
props: Object.assign({
|
props: Object.assign({
|
||||||
appear: false,
|
appear: true,
|
||||||
css: false,
|
css: false,
|
||||||
}),
|
}),
|
||||||
on: { ...openAnimation },
|
on: { ...openAnimation },
|
||||||
|
@ -56,6 +56,7 @@ export default {
|
||||||
{...transitionProps}
|
{...transitionProps}
|
||||||
>
|
>
|
||||||
<PanelContent
|
<PanelContent
|
||||||
|
v-show={isActive}
|
||||||
prefixCls={prefixCls}
|
prefixCls={prefixCls}
|
||||||
isActive={isActive}
|
isActive={isActive}
|
||||||
destroyInactivePanel={destroyInactivePanel}
|
destroyInactivePanel={destroyInactivePanel}
|
||||||
|
|
|
@ -23,7 +23,6 @@ export default {
|
||||||
const contentCls = {
|
const contentCls = {
|
||||||
[`${prefixCls}-content`]: true,
|
[`${prefixCls}-content`]: true,
|
||||||
[`${prefixCls}-content-active`]: isActive,
|
[`${prefixCls}-content-active`]: isActive,
|
||||||
[`${prefixCls}-content-inactive`]: !isActive,
|
|
||||||
}
|
}
|
||||||
const child = !isActive && destroyInactivePanel ? null
|
const child = !isActive && destroyInactivePanel ? null
|
||||||
: <div class={`${prefixCls}-content-box`}>{$slots.default}</div>
|
: <div class={`${prefixCls}-content-box`}>{$slots.default}</div>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import cssAnimation from 'css-animation'
|
import cssAnimation from '../../_util/css-animation'
|
||||||
|
|
||||||
function animate (node, show, transitionName, done) {
|
function animate (node, show, transitionName, done) {
|
||||||
let height
|
let height
|
||||||
|
|
Loading…
Reference in New Issue