-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
v-model on a custom element #1699
Comments
Thanks :). I was developping this and wanted to make a PR but it is done so it is perfect :). What do you think (rename |
Version
3.0.0-rc.4
Reproduction link
https://github.com/Benoit-Vasseur/bug-vue3-v-model-wc
Steps to reproduce
npm run dev
What is expected?
v-model
is working if the web component is using value prop and trigger the 'input' eventWhat is actually happening?
v-model can only be used on <input>, <textarea> and <select> elements.
I based my test on those RFCs :
vueCompilerOptions.isCustomElement seems to work but when i tried to add the v-model attribute it break the compilation :/.
I tried to read the compiler code to find a way to alter the tag of the node, but it does not seem possible : https://github.com/vuejs/vue-next/blob/master/packages/compiler-dom/src/transforms/vModel.ts#L47
Issue for vue2 is here : vuejs/vue#7830
I am open to try to make a PR for this if you give me some hints to implement the feature :).
Thank you in advance for your reply.
Can not wait to adopt Vue 3 :).
The text was updated successfully, but these errors were encountered: