childrenToSegments() — vue Function Reference
Architecture documentation for the childrenToSegments() function in codegen.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD 44ae389a_3263_f16b_05af_9e93b3ed0124["childrenToSegments()"] b513831f_74af_d452_c5fb_ed9ab7651ec4["genChildrenAsStringNode()"] b513831f_74af_d452_c5fb_ed9ab7651ec4 -->|calls| 44ae389a_3263_f16b_05af_9e93b3ed0124 4d0b6945_0b17_a914_402c_b134ebc6a88e["elementToSegments()"] 4d0b6945_0b17_a914_402c_b134ebc6a88e -->|calls| 44ae389a_3263_f16b_05af_9e93b3ed0124 f563a18b_c92b_0663_f7dc_3d9177b3ecc0["nodesToSegments()"] 44ae389a_3263_f16b_05af_9e93b3ed0124 -->|calls| f563a18b_c92b_0663_f7dc_3d9177b3ecc0 style 44ae389a_3263_f16b_05af_9e93b3ed0124 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/server-renderer/src/optimizing-compiler/codegen.ts lines 198–210
function childrenToSegments(el, state): Array<StringSegment> {
let binding
if ((binding = el.attrsMap['v-html'])) {
return [{ type: EXPRESSION, value: `_s(${binding})` }]
}
if ((binding = el.attrsMap['v-text'])) {
return [{ type: INTERPOLATION, value: `_s(${binding})` }]
}
if (el.tag === 'textarea' && (binding = el.attrsMap['v-model'])) {
return [{ type: INTERPOLATION, value: `_s(${binding})` }]
}
return el.children ? nodesToSegments(el.children, state) : []
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does childrenToSegments() do?
childrenToSegments() is a function in the vue codebase.
What does childrenToSegments() call?
childrenToSegments() calls 1 function(s): nodesToSegments.
What calls childrenToSegments()?
childrenToSegments() is called by 2 function(s): elementToSegments, genChildrenAsStringNode.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free