|
|
@ -42,7 +42,6 @@ export default defineComponent({
|
|
|
|
accordion: false,
|
|
|
|
accordion: false,
|
|
|
|
destroyInactivePanel: false,
|
|
|
|
destroyInactivePanel: false,
|
|
|
|
bordered: true,
|
|
|
|
bordered: true,
|
|
|
|
openAnimation: collapseMotion('ant-motion-collapse', false),
|
|
|
|
|
|
|
|
expandIconPosition: 'start',
|
|
|
|
expandIconPosition: 'start',
|
|
|
|
}),
|
|
|
|
}),
|
|
|
|
slots: Object as CustomSlotsType<{
|
|
|
|
slots: Object as CustomSlotsType<{
|
|
|
@ -61,7 +60,7 @@ export default defineComponent({
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{ deep: true },
|
|
|
|
{ deep: true },
|
|
|
|
);
|
|
|
|
);
|
|
|
|
const { prefixCls, direction } = useConfigInject('collapse', props);
|
|
|
|
const { prefixCls, direction, rootPrefixCls } = useConfigInject('collapse', props);
|
|
|
|
|
|
|
|
|
|
|
|
// style
|
|
|
|
// style
|
|
|
|
const [wrapSSR, hashId] = useStyle(prefixCls);
|
|
|
|
const [wrapSSR, hashId] = useStyle(prefixCls);
|
|
|
@ -131,6 +130,7 @@ export default defineComponent({
|
|
|
|
if (isEmptyElement(child)) return;
|
|
|
|
if (isEmptyElement(child)) return;
|
|
|
|
const activeKey = stateActiveKey.value;
|
|
|
|
const activeKey = stateActiveKey.value;
|
|
|
|
const { accordion, destroyInactivePanel, collapsible, openAnimation } = props;
|
|
|
|
const { accordion, destroyInactivePanel, collapsible, openAnimation } = props;
|
|
|
|
|
|
|
|
const animation = openAnimation || collapseMotion(`${rootPrefixCls.value}-motion-collapse`);
|
|
|
|
|
|
|
|
|
|
|
|
// If there is no key provide, use the panel order as default key
|
|
|
|
// If there is no key provide, use the panel order as default key
|
|
|
|
const key = String(child.key ?? index);
|
|
|
|
const key = String(child.key ?? index);
|
|
|
@ -161,7 +161,7 @@ export default defineComponent({
|
|
|
|
isActive,
|
|
|
|
isActive,
|
|
|
|
prefixCls: prefixCls.value,
|
|
|
|
prefixCls: prefixCls.value,
|
|
|
|
destroyInactivePanel,
|
|
|
|
destroyInactivePanel,
|
|
|
|
openAnimation,
|
|
|
|
openAnimation: animation,
|
|
|
|
accordion,
|
|
|
|
accordion,
|
|
|
|
onItemClick: mergeCollapsible === 'disabled' ? null : onClickItem,
|
|
|
|
onItemClick: mergeCollapsible === 'disabled' ? null : onClickItem,
|
|
|
|
expandIcon: renderExpandIcon,
|
|
|
|
expandIcon: renderExpandIcon,
|
|
|
|