import { computed, ref } from 'vue' import { layoutProps } from '../layout-props' import { ElCollapse, ElCollapseItem } from 'element-plus' import { useFormLayoutOptions } from '@cip/components/hooks/use-form-layout' export default { name: 'BasicCollapse', props: layoutProps, setup (props, { slots, emit }) { const { options, updateConfig, ...handler } = useFormLayoutOptions({ props, emit }) const grid = computed(() => { return props.config._isGrid }) const active = ref('') if (props.config.active) { // eslint-disable-next-line vue/no-setup-props-destructure active.value = props.config.active } return () => ( {options.value.map((option, optionIndex) => { const { children, ...itemConfig } = option return
{slots.item?.({ children, optionIndex, isShow: props.config._isShow, ...handler })}
})}
) } }