add nova
This commit is contained in:
10
nova/resources/js/util/renderSlotFragments.js
Normal file
10
nova/resources/js/util/renderSlotFragments.js
Normal file
@@ -0,0 +1,10 @@
|
||||
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]
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user