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
v-model is now usable on web component :) see #1699 and this commit : 71c3c6e
However I have a suggestion concerning the type attribute on v-model on a custom element.
I think it could be safer to force the "type" and name the prop v-model-type instead of type. type looks to dangerous to me for naming collision. I was also thinking of but I do not think that it respects the design of the modifier, it is more an "adder" in this case.
What do you think : rename type to v-model-type and make it mandatory for custom element with a proper error message ? I can make a PR if you approve the idea :).
I don't really think this is necessary. If you have a custom input element that is expected to work with v-model and have something like type="radio" or type="checkbox" on it, it would be really weird for it to not indicate that "this element behaves like a native radio/checkbox".
Adding yet another built-in directive for this highly unlikely case seems overly cautious to me.
What problem does this feature solve?
v-model is now usable on web component :) see #1699 and this commit : 71c3c6e
However I have a suggestion concerning the type attribute on v-model on a custom element.
I think it could be safer to force the "type" and name the prop
v-model-type
instead of type. type looks to dangerous to me for naming collision. I was also thinking of but I do not think that it respects the design of the modifier, it is more an "adder" in this case.What do you think : rename
type
tov-model-type
and make it mandatory for custom element with a proper error message ? I can make a PR if you approve the idea :).What does the proposed API look like?
<my-custom-elt v-model="model" v-model-type="text" />
The text was updated successfully, but these errors were encountered: