You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On multiple occasions, the docs clearly stated that v-model on a component uses value as the prop and input as the event (here and there).
On standards inputs, the documentation (here) don't explain what can be expected from v-model, and how to replace its default behavior (when writting wrappers, for example). I have found that:
on input[type=text] and textarea, v-model uses value as the prop and input as the event
on input[type=radio] and input[type=checkbox], v-model uses checked as the prop and input as the event — but seems to collide with value (#8379)
on select, v-model uses value as the prop and change as the event
Some issues are related to this:
dynamic input value with radio buttons don't work in IE11 #8379 — related to this section of the docs which breaks the default IE9+ compatibility
<select @input="..."> doesn't work in IE11 but works with v-model #4701
May you please consider detailing for each control (input, radio, checkbox, select, textarea) what is the expected behaviour of v-model? This would be of great help!
@yamsellem Thanks for reporting the issue. I see that it's almost an exact copy from vuejs/vue#9370, which has been explained/clarified by @yyx990803. Do you think his clarification doesn't answer your question?
What problem does this feature solve?
On multiple occasions, the docs clearly stated that
v-model on a component uses value as the prop and input as the event
(here and there).On standards inputs, the documentation (here) don't explain what can be expected from
v-model
, and how to replace its default behavior (when writting wrappers, for example). I have found that:input[type=text]
andtextarea
, v-model usesvalue
as the prop andinput
as the eventinput[type=radio]
andinput[type=checkbox]
, v-model useschecked
as the prop andinput
as the event — but seems to collide withvalue
(#8379)select
, v-model usesvalue
as the prop andchange
as the eventSome issues are related to this:
May you please consider detailing for each control (input, radio, checkbox, select, textarea) what is the expected behaviour of v-model? This would be of great help!
What does the proposed API look like?
--
Related to #9370
The text was updated successfully, but these errors were encountered: