import { layoutProps } from '../layout-props'
import { ElTimeline, ElTimelineItem } from 'element-plus'
import './index.less'
export default {
props: layoutProps,
setup (props, { slots }) {
const Item = (option, index) => {
const { children: step, ...stepConfig } = option
const title = !props.config.hideIndex ? `第${index + 1}步:${stepConfig.title}` : stepConfig.title
return
{slots.item?.({ col: step })}
}
return () => (
{props.config.options?.map(Item)}
)
}
}