MCPcopy
hub / github.com/vuejs/core / ssrRenderSlot

Function ssrRenderSlot

packages/server-renderer/src/helpers/ssrRenderSlot.ts:20–41  ·  view source on GitHub ↗
(
  slots: Slots | SSRSlots,
  slotName: string,
  slotProps: Props,
  fallbackRenderFn: (() => void) | null,
  push: PushFn,
  parentComponent: ComponentInternalInstance,
  slotScopeId?: string,
)

Source from the content-addressed store, hash-verified

18) => void
19
20export function ssrRenderSlot(
21 slots: Slots | SSRSlots,
22 slotName: string,
23 slotProps: Props,
24 fallbackRenderFn: (() => void) | null,
25 push: PushFn,
26 parentComponent: ComponentInternalInstance,
27 slotScopeId?: string,
28): void {
29 // template-compiled slots are always rendered as fragments
30 push(`<!--[-->`)
31 ssrRenderSlotInner(
32 slots,
33 slotName,
34 slotProps,
35 fallbackRenderFn,
36 push,
37 parentComponent,
38 slotScopeId,
39 )
40 push(`<!--]-->`)
41}
42
43export function ssrRenderSlotInner(
44 slots: Slots | SSRSlots,

Callers 2

ssrRenderFunction · 0.90
ssrScopeId.spec.tsFile · 0.90

Calls 2

ssrRenderSlotInnerFunction · 0.85
pushFunction · 0.50

Tested by 1

ssrRenderFunction · 0.72