mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-16 01:41:15 +08:00
update collapse animation
This commit is contained in:
parent
a5853c3a21
commit
f8f3bcd008
@ -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
|
||||
|
@ -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,
|
||||
},
|
||||
|
@ -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}
|
||||
>
|
||||
<PanelContent
|
||||
v-show={isActive}
|
||||
prefixCls={prefixCls}
|
||||
isActive={isActive}
|
||||
destroyInactivePanel={destroyInactivePanel}
|
||||
|
@ -23,7 +23,6 @@ export default {
|
||||
const contentCls = {
|
||||
[`${prefixCls}-content`]: true,
|
||||
[`${prefixCls}-content-active`]: isActive,
|
||||
[`${prefixCls}-content-inactive`]: !isActive,
|
||||
}
|
||||
const child = !isActive && destroyInactivePanel ? null
|
||||
: <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) {
|
||||
let height
|
||||
|
Loading…
Reference in New Issue
Block a user