Subscribe on changes!

Why @update:kebab-case compile different result on Codesandbox and Vue SFC Playground ?

avatar
Nov 4th 2022

Vue version

3.2.41

Link to minimal reproduction

Steps to reproduce

open link

Vue SFC Playground

Codesandbox

What is expected?

@update:foo-bar compile the same result

What is actually happening?

Vue SFC Playground: @update:foo-bar => onUpdate:fooBar

image

Codesandbox: @update:foo-bar => onUpdate:foo-bar

image

System Info

No response

Any additional comments?

is it bug?

avatar
Nov 4th 2022

I think codesandbox is using an outdated version of vue compiler. You should open an issue in Codesandbox repository

avatar
Nov 5th 2022

I think codesandbox is using an outdated version of vue compiler. You should open an issue in Codesandbox repository

I use the same version 3.2.41. and i have another question to ask, why v-model:foo-bar not work when used with @update:foo-bar, but if i change to v-model:fooBar, they were all work. Intuitively, these two way should all work, right?

   <demo v-model:foo-bar="modelVal" @update:foo-bar="update" />

compile result image


<demo v-model:fooBar="modelVal" @update:foo-bar="update" /> 

compile result image

Vue SFC Playground