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

Function buildDefaultSlotProperty

packages/compiler-core/src/transforms/vSlot.ts:313–322  ·  view source on GitHub ↗
(
      props: ExpressionNode | undefined,
      children: TemplateChildNode[],
    )

Source from the content-addressed store, hash-verified

311
312 if (!onComponentSlot) {
313 const buildDefaultSlotProperty = (
314 props: ExpressionNode | undefined,
315 children: TemplateChildNode[],
316 ) => {
317 const fn = buildSlotFn(props, undefined, children, loc)
318 if (__COMPAT__ && context.compatConfig) {
319 fn.isNonScopedSlot = true
320 }
321 return createObjectProperty(`default`, fn)
322 }
323
324 if (!hasTemplateSlots) {
325 // implicit default slot (on component)

Callers 1

buildSlotsFunction · 0.85

Calls 1

createObjectPropertyFunction · 0.90

Tested by

no test coverage detected