v-model can only be used on <input>, <textarea> and <select> elements. #456
Description
Version
5.0.0
Reproduction link
Steps to reproduce
Use v-model on any component-based field
What is expected?
VueJS allows you to use v-model on any element which implements the :value data binding and emits the @input event.
You can find this in the official documentation for custom components here:
https://vuejs.org/v2/guide/forms.html
And here:
https://vuejs.org/v2/guide/components.html#Using-v-model-on-Components
The current implementation does not allow for this
What is actually happening?
The resulting behavior is that any component which implements the above pattern results in an error which cannot be built
I believe there should not be a check on v-model on components. Any element can support v-model provided it accepts a value and emits an event, per the Vue2 documentation. It is possible there is something I am missing here, if so, any advice would be appreciated.
Thank you