Skip to content

Commit 54fd708

Browse files
committed
1 parent 782b66c commit 54fd708

File tree

1 file changed

+3
-1
lines changed
  • src/platforms/web/compiler/directives

1 file changed

+3
-1
lines changed

src/platforms/web/compiler/directives/model.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,11 @@ function genDefaultModel (
130130
const type = el.attrsMap.type
131131

132132
// warn if v-bind:value conflicts with v-model
133+
// except for inputs with v-bind:type
133134
if (process.env.NODE_ENV !== 'production') {
134135
const value = el.attrsMap['v-bind:value'] || el.attrsMap[':value']
135-
if (value) {
136+
const typeBinding = el.attrsMap['v-bind:type'] || el.attrsMap[':type']
137+
if (value && !typeBinding) {
136138
const binding = el.attrsMap['v-bind:value'] ? 'v-bind:value' : ':value'
137139
warn(
138140
`${binding}="${value}" conflicts with v-model on the same element ` +

0 commit comments

Comments
 (0)