genProps() — vue Function Reference
Architecture documentation for the genProps() function in index.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD cac71b0e_014c_ebb4_99ba_c0a5c9456dff["genProps()"] 6a18399e_553e_fef8_6a39_746f79f94bd2["index.ts"] cac71b0e_014c_ebb4_99ba_c0a5c9456dff -->|defined in| 6a18399e_553e_fef8_6a39_746f79f94bd2 2f9548d4_5dab_e18c_c75b_5e2c2bf4a780["genData()"] 2f9548d4_5dab_e18c_c75b_5e2c2bf4a780 -->|calls| cac71b0e_014c_ebb4_99ba_c0a5c9456dff efff3f4c_82aa_c3e2_8ac7_3524fe9edc87["genSlot()"] efff3f4c_82aa_c3e2_8ac7_3524fe9edc87 -->|calls| cac71b0e_014c_ebb4_99ba_c0a5c9456dff 1165faf4_c5af_d40b_76bf_f3e684d1c07c["transformSpecialNewlines()"] cac71b0e_014c_ebb4_99ba_c0a5c9456dff -->|calls| 1165faf4_c5af_d40b_76bf_f3e684d1c07c style cac71b0e_014c_ebb4_99ba_c0a5c9456dff fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/compiler/codegen/index.ts lines 645–663
function genProps(props: Array<ASTAttr>): string {
let staticProps = ``
let dynamicProps = ``
for (let i = 0; i < props.length; i++) {
const prop = props[i]
const value = transformSpecialNewlines(prop.value)
if (prop.dynamic) {
dynamicProps += `${prop.name},${value},`
} else {
staticProps += `"${prop.name}":${value},`
}
}
staticProps = `{${staticProps.slice(0, -1)}}`
if (dynamicProps) {
return `_d(${staticProps},[${dynamicProps.slice(0, -1)}])`
} else {
return staticProps
}
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does genProps() do?
genProps() is a function in the vue codebase, defined in src/compiler/codegen/index.ts.
Where is genProps() defined?
genProps() is defined in src/compiler/codegen/index.ts at line 645.
What does genProps() call?
genProps() calls 1 function(s): transformSpecialNewlines.
What calls genProps()?
genProps() is called by 2 function(s): genData, genSlot.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free