genStatic() — vue Function Reference
Architecture documentation for the genStatic() function in index.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD 8d54f6c4_d0ee_4328_66df_a6c8aa0a56aa["genStatic()"] 4cfaef88_0bc8_30fc_0a01_09b4149fd58c["genElement()"] 4cfaef88_0bc8_30fc_0a01_09b4149fd58c -->|calls| 8d54f6c4_d0ee_4328_66df_a6c8aa0a56aa baea1fd5_74ae_11db_8cec_d9ecde977f21["genOnce()"] baea1fd5_74ae_11db_8cec_d9ecde977f21 -->|calls| 8d54f6c4_d0ee_4328_66df_a6c8aa0a56aa 4cfaef88_0bc8_30fc_0a01_09b4149fd58c["genElement()"] 8d54f6c4_d0ee_4328_66df_a6c8aa0a56aa -->|calls| 4cfaef88_0bc8_30fc_0a01_09b4149fd58c style 8d54f6c4_d0ee_4328_66df_a6c8aa0a56aa fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/compiler/codegen/index.ts lines 157–171
function genStatic(el: ASTElement, state: CodegenState): string {
el.staticProcessed = true
// Some elements (templates) need to behave differently inside of a v-pre
// node. All pre nodes are static roots, so we can use this as a location to
// wrap a state change and reset it upon exiting the pre node.
const originalPreState = state.pre
if (el.pre) {
state.pre = el.pre
}
state.staticRenderFns.push(`with(this){return ${genElement(el, state)}}`)
state.pre = originalPreState
return `_m(${state.staticRenderFns.length - 1}${
el.staticInFor ? ',true' : ''
})`
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does genStatic() do?
genStatic() is a function in the vue codebase.
What does genStatic() call?
genStatic() calls 1 function(s): genElement.
What calls genStatic()?
genStatic() is called by 2 function(s): genElement, genOnce.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free