11 lines
247 B
JavaScript
11 lines
247 B
JavaScript
import { Fragment } from 'vue'
|
|
|
|
export function renderSlotFragments(children) {
|
|
if (!children) return []
|
|
return children.flatMap(child => {
|
|
if (child.type === Fragment) return renderSlotFragments(child.children)
|
|
|
|
return [child]
|
|
})
|
|
}
|