@@ -42,7 +42,6 @@ export default defineComponent({
42
42
accordion : false ,
43
43
destroyInactivePanel : false ,
44
44
bordered : true ,
45
- openAnimation : collapseMotion ( 'ant-motion-collapse' , false ) ,
46
45
expandIconPosition : 'start' ,
47
46
} ) ,
48
47
slots : Object as CustomSlotsType < {
@@ -61,7 +60,7 @@ export default defineComponent({
61
60
} ,
62
61
{ deep : true } ,
63
62
) ;
64
- const { prefixCls, direction } = useConfigInject ( 'collapse' , props ) ;
63
+ const { prefixCls, direction, rootPrefixCls } = useConfigInject ( 'collapse' , props ) ;
65
64
66
65
// style
67
66
const [ wrapSSR , hashId ] = useStyle ( prefixCls ) ;
@@ -131,6 +130,7 @@ export default defineComponent({
131
130
if ( isEmptyElement ( child ) ) return ;
132
131
const activeKey = stateActiveKey . value ;
133
132
const { accordion, destroyInactivePanel, collapsible, openAnimation } = props ;
133
+ const animation = openAnimation || collapseMotion ( `${ rootPrefixCls . value } -motion-collapse` ) ;
134
134
135
135
// If there is no key provide, use the panel order as default key
136
136
const key = String ( child . key ?? index ) ;
@@ -161,7 +161,7 @@ export default defineComponent({
161
161
isActive,
162
162
prefixCls : prefixCls . value ,
163
163
destroyInactivePanel,
164
- openAnimation,
164
+ openAnimation : animation ,
165
165
accordion,
166
166
onItemClick : mergeCollapsible === 'disabled' ? null : onClickItem ,
167
167
expandIcon : renderExpandIcon ,
0 commit comments