Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic input type no longer works with v-model and :value at the same time. #7404

Closed
sourenaraya opened this issue Jan 7, 2018 · 3 comments

Comments

@sourenaraya
Copy link

Version

2.5.13

Reproduction link

https://codepen.io/anon/pen/KZyJyy

Steps to reproduce

Open JS console and see `[Vue warn]: Error compiling template:

{{ testitem }}
{{ testvalue }}
  • :value="testitem" conflicts with v-model on the same element because the latter already expands to a value binding internally

(found in )`

What is expected?

Template compiled without errors, just like in Vue 2.5.3

What is actually happening?

Errors while template compilation. On codepen this still renders component, but webpack wont build bundle because of this error.


This code worked on 2.5.3, https://codepen.io/anon/pen/opomGr

@jkzing
Copy link
Member

jkzing commented Jan 8, 2018

This warning message was added in v2.5.5, so that you were not able to see it on v2.5.3.

@sourenaraya
Copy link
Author

Ok, what do we do about it? I want this dynamic input :type.

Justineo added a commit to Justineo/vue that referenced this issue Jan 8, 2018
@Justineo
Copy link
Member

Justineo commented Jan 8, 2018

Actually I think the warning shouldn't be emitted here. For inputs with dynamic type binding, we may just skip the conflict check because the actual type is not available yet in the compiler.

I made a PR to resolve this issue: #7406.

f2009 pushed a commit to f2009/vue that referenced this issue Jan 25, 2019
aJean pushed a commit to aJean/vue that referenced this issue Aug 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants