{"record":{"id":"682f0242d461bb91","repo":"Meituan-Dianping/mpvue","slug":"el-tag-v-model-value-you-are-binding-v","errorCode":null,"errorMessage":"<${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.","messagePattern":"<(.+?) v-model=\"(.+?)\">: 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\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/weex-template-compiler/build.js","lineNumber":1908,"sourceCode":"\n/* istanbul ignore next */\nfunction guardIESVGBug (attrs) {\n  var res = [];\n  for (var i = 0; i < attrs.length; i++) {\n    var attr = attrs[i];\n    if (!ieNSBug.test(attr.name)) {\n      attr.name = attr.name.replace(ieNSPrefix, '');\n      res.push(attr);\n    }\n  }\n  return res\n}\n\nfunction checkForAliasModel (el, value) {\n  var _el = el;\n  while (_el) {\n    if (_el.for && _el.alias === value) {\n      warn(\n        \"<\" + (el.tag) + \" v-model=\\\"\" + value + \"\\\">: \" +\n        \"You are binding v-model directly to a v-for iteration alias. \" +\n        \"This will not be able to modify the v-for source array because \" +\n        \"writing to the alias is like modifying a function local variable. \" +\n        \"Consider using an array of objects and use v-model on an object property instead.\"\n      );\n    }\n    _el = _el.parent;\n  }\n}\n\n/*  */\n\nvar isStaticKey;\nvar isPlatformReservedTag;\n\nvar genStaticKeysCached = cached(genStaticKeys$1);\n","sourceCodeStart":1890,"sourceCodeEnd":1926,"githubUrl":"https://github.com/Meituan-Dianping/mpvue/blob/6c5d78ee04f58c6d782c456dfcf0fe63c0b7f89b/packages/weex-template-compiler/build.js#L1890-L1926","documentation":"Error \"<${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.\" thrown in Meituan-Dianping/mpvue.","triggerScenarios":"Thrown at packages/weex-template-compiler/build.js:1908 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Bind v-model to a property of the source array's objects, e.g. v-model=\"item.name\" on objects instead of the alias itself","Mutate the original array (this.list[i].value = x) rather than the iteration alias","Wrap primitives in objects: use an array of { value } entries so v-model can write to a property"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6c5d78ee04f58c6d782c456dfcf0fe63c0b7f89b","analyzedAt":"2026-09-02T05:17:40.946Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T11:17:12.671Z"}