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

Function createVNodeCall

packages/compiler-core/src/ast.ts:611–649  ·  view source on GitHub ↗
(
  context: TransformContext | null,
  tag: VNodeCall['tag'],
  props?: VNodeCall['props'],
  children?: VNodeCall['children'],
  patchFlag?: VNodeCall['patchFlag'],
  dynamicProps?: VNodeCall['dynamicProps'],
  directives?: VNodeCall['directives'],
  isBlock: VNodeCall['isBlock'] = false,
  disableTracking: VNodeCall['disableTracking'] = false,
  isComponent: VNodeCall['isComponent'] = false,
  loc: SourceLocation = locStub,
)

Source from the content-addressed store, hash-verified

609}
610
611export function createVNodeCall(
612 context: TransformContext | null,
613 tag: VNodeCall['tag'],
614 props?: VNodeCall['props'],
615 children?: VNodeCall['children'],
616 patchFlag?: VNodeCall['patchFlag'],
617 dynamicProps?: VNodeCall['dynamicProps'],
618 directives?: VNodeCall['directives'],
619 isBlock: VNodeCall['isBlock'] = false,
620 disableTracking: VNodeCall['disableTracking'] = false,
621 isComponent: VNodeCall['isComponent'] = false,
622 loc: SourceLocation = locStub,
623): VNodeCall {
624 if (context) {
625 if (isBlock) {
626 context.helper(OPEN_BLOCK)
627 context.helper(getVNodeBlockHelper(context.inSSR, isComponent))
628 } else {
629 context.helper(getVNodeHelper(context.inSSR, isComponent))
630 }
631 if (directives) {
632 context.helper(WITH_DIRECTIVES)
633 }
634 }
635
636 return {
637 type: NodeTypes.VNODE_CALL,
638 tag,
639 props,
640 children,
641 patchFlag,
642 dynamicProps,
643 directives,
644 isBlock,
645 disableTracking,
646 isComponent,
647 loc,
648 }
649}
650
651export function createArrayExpression(
652 elements: ArrayExpression['elements'],

Callers 5

createRootCodegenFunction · 0.90
vFor.tsFile · 0.90
transformElementFunction · 0.90
codegen.spec.tsFile · 0.90

Calls 3

getVNodeBlockHelperFunction · 0.85
getVNodeHelperFunction · 0.85
helperMethod · 0.65

Tested by

no test coverage detected