genChildren() — vue Function Reference
Architecture documentation for the genChildren() function in index.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD c685f493_8cd2_1c26_d251_343fbd2a9498["genChildren()"] 6a18399e_553e_fef8_6a39_746f79f94bd2["index.ts"] c685f493_8cd2_1c26_d251_343fbd2a9498 -->|defined in| 6a18399e_553e_fef8_6a39_746f79f94bd2 009d7fc7_09cb_184e_e93c_1f468ff505c0["genElement()"] 009d7fc7_09cb_184e_e93c_1f468ff505c0 -->|calls| c685f493_8cd2_1c26_d251_343fbd2a9498 db876b7b_004a_9015_7afa_993985df7520["genScopedSlot()"] db876b7b_004a_9015_7afa_993985df7520 -->|calls| c685f493_8cd2_1c26_d251_343fbd2a9498 efff3f4c_82aa_c3e2_8ac7_3524fe9edc87["genSlot()"] efff3f4c_82aa_c3e2_8ac7_3524fe9edc87 -->|calls| c685f493_8cd2_1c26_d251_343fbd2a9498 c853697a_a300_4af8_8ebe_b8ab14fdba76["genComponent()"] c853697a_a300_4af8_8ebe_b8ab14fdba76 -->|calls| c685f493_8cd2_1c26_d251_343fbd2a9498 359087fb_2b37_f369_cfdb_ed6c4f7142a5["getNormalizationType()"] c685f493_8cd2_1c26_d251_343fbd2a9498 -->|calls| 359087fb_2b37_f369_cfdb_ed6c4f7142a5 style c685f493_8cd2_1c26_d251_343fbd2a9498 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/compiler/codegen/index.ts lines 513–545
export function genChildren(
el: ASTElement,
state: CodegenState,
checkSkip?: boolean,
altGenElement?: Function,
altGenNode?: Function
): string | void {
const children = el.children
if (children.length) {
const el: any = children[0]
// optimize single v-for
if (
children.length === 1 &&
el.for &&
el.tag !== 'template' &&
el.tag !== 'slot'
) {
const normalizationType = checkSkip
? state.maybeComponent(el)
? `,1`
: `,0`
: ``
return `${(altGenElement || genElement)(el, state)}${normalizationType}`
}
const normalizationType = checkSkip
? getNormalizationType(children, state.maybeComponent)
: 0
const gen = altGenNode || genNode
return `[${children.map(c => gen(c, state)).join(',')}]${
normalizationType ? `,${normalizationType}` : ''
}`
}
}
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does genChildren() do?
genChildren() is a function in the vue codebase, defined in src/compiler/codegen/index.ts.
Where is genChildren() defined?
genChildren() is defined in src/compiler/codegen/index.ts at line 513.
What does genChildren() call?
genChildren() calls 1 function(s): getNormalizationType.
What calls genChildren()?
genChildren() is called by 4 function(s): genComponent, genElement, genScopedSlot, genSlot.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free