fn
renderSlotChild
Renders a single child from the provided default slot, applying attrs to it. Shared between `<Slot>` and `<Primitive as="template">`.
Signature
ts
export function renderSlotChild(slots: Slots, attrs: Record<string, unknown>): VNode | null{ ... }Parameters
| Parameter | Type | Description |
|---|---|---|
slots | Readonly<{ [name: string]: import("vue").Slot<any> | undefined; }> | Component slots |
attrs | Record<string, unknown> | Attrs to apply to the slotted child |
Returns
VNode<import("vue").RendererNode, import("vue").RendererElement, { [key: string]: any; }> | nullCloned VNode with merged attrs or null