checkForAliasModel() — vue Function Reference
Architecture documentation for the checkForAliasModel() function in index.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD 3a79cd2e_18de_bdee_1bd2_a1afbad5bf50["checkForAliasModel()"] 320ee0f4_351d_a6b2_1c1c_f0f6f42fb987["index.ts"] 3a79cd2e_18de_bdee_1bd2_a1afbad5bf50 -->|defined in| 320ee0f4_351d_a6b2_1c1c_f0f6f42fb987 94cd3ed6_4fec_eddb_c90a_1c38249e5b02["processAttrs()"] 94cd3ed6_4fec_eddb_c90a_1c38249e5b02 -->|calls| 3a79cd2e_18de_bdee_1bd2_a1afbad5bf50 style 3a79cd2e_18de_bdee_1bd2_a1afbad5bf50 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/compiler/parser/index.ts lines 984–999
function checkForAliasModel(el, value) {
let _el = el
while (_el) {
if (_el.for && _el.alias === value) {
warn(
`<${el.tag} v-model="${value}">: ` +
`You are binding v-model directly to a v-for iteration alias. ` +
`This will not be able to modify the v-for source array because ` +
`writing to the alias is like modifying a function local variable. ` +
`Consider using an array of objects and use v-model on an object property instead.`,
el.rawAttrsMap['v-model']
)
}
_el = _el.parent
}
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does checkForAliasModel() do?
checkForAliasModel() is a function in the vue codebase, defined in src/compiler/parser/index.ts.
Where is checkForAliasModel() defined?
checkForAliasModel() is defined in src/compiler/parser/index.ts at line 984.
What calls checkForAliasModel()?
checkForAliasModel() is called by 1 function(s): processAttrs.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free