Thread v-model as directive also when used with Component
What problem does this feature solve?
v-model directive used with component is not available for other directives (by vnode.dirs) like it is possible with native input. Even when the directive is invisible, I would at least expect access to the modelValue property inside vnode.props.
I'm playing with "template-driven" form validation and it hard to cooperate with v-model when you can combine it only with simple expressions (we can't pass function or scoped slot prop here)
What does the proposed API look like?
Create a new variant of v-model like V_MODEL_COMPONENT just to make it available to other directives.
You can read about how to handle this at https://v3.vuejs.org/guide/component-custom-events.html#multiple-v-model-bindings. You might also want to lookup inheritAttrs
for custom form elements.
Please, next time consider using the forum, the Discord server or StackOverflow for questions first. But feel free to come back and open an issue if it turns out to be a bug 🙂