Subscribe on changes!

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

avatar
Oct 25th 2021

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

avatar
Oct 25th 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>