Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

v-model Modifiers trim/number did not work if use hyphenate string in props and camelize in emits, or reverse #4848

Closed
zhaozhongyu opened this issue Oct 25, 2021 · 1 comment · Fixed by #9609
Labels
🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. has workaround A workaround has been found to avoid the problem 🐞 bug Something isn't working scope: v-model

Comments

@zhaozhongyu
Copy link

Version

3.2.20

Reproduction link

sfc.vuejs.org/

Steps to reproduce

see message

What is expected?

trim modifier work

What is actually happening?

trim modifier did not work

image

@posva posva added 🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. 🐞 bug Something isn't working has workaround A workaround has been found to avoid the problem labels Oct 25, 2021
@posva
Copy link
Member

posva commented Oct 25, 2021

Use the camelCase version v-model:msgTest as a workaround (will not work in HTML templates, e.g. outside vue files)

It also looks like the modifiers are being passed as attributes (kebab or camel case):

<div id="app" data-v-app=""><h1>testtttt</h1><h2 msgtestmodifiers="[object Object]">beforetestttttafter</h2></div>

yyx990803 added a commit that referenced this issue Jul 13, 2024
…don't match (#9609)

close #4848
close #4850 (based on commits from #4850)

Co-authored-by: zhaozhongyu <zhaozhongyu@xunlei.com>
Co-authored-by: Evan You <evan@vuejs.org>
jacobfogolyan pushed a commit to jacobfogolyan/vuejs-core that referenced this issue Jul 13, 2024
…don't match (vuejs#9609)

close vuejs#4848
close vuejs#4850 (based on commits from vuejs#4850)

Co-authored-by: zhaozhongyu <zhaozhongyu@xunlei.com>
Co-authored-by: Evan You <evan@vuejs.org>
@github-actions github-actions bot locked and limited conversation to collaborators Jul 28, 2024
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. has workaround A workaround has been found to avoid the problem 🐞 bug Something isn't working scope: v-model
Projects
None yet
3 participants