kebab case props on slots are not transformed to camelcase
Version
3.0.2
Reproduction link
https://codesandbox.io/s/vue-3-slot-props-cl5xj?file=/src/App.vue
Steps to reproduce
Open https://codesandbox.io/s/vue-3-slot-props-cl5xj?file=/src/App.vue and you'll see that <template #object>
slot will render value of props.hasBeenClicked
. Clicking on "Click me" button also works as expected and re-renders new value.
Nothing of this works when I use boolean value directly. Same goes for string and maybe other primitive type values.
What is expected?
Boolean prop should work same as object prop. I'd expect it to work same as in Vue 2: https://codesandbox.io/s/vue-2-slot-props-rv3vb?file=/src/App.vue
What is actually happening?
Boolean and string props don't work until they are wrapped in an object.
It looks like a casing problem, using <slot name="boolean" :hasBeenClicked="hasBeenClicked"></slot>
works
@posva I see. Actually very similar issue happens with $emit()
– please see this sandbox & open console. I suspect it will be fixed in same PR so I didn't open new issue.
For posterity: $emit
is fixed when you use latest @vue/compiler-sfc
as described in https://github.com/vuejs/vue-next/issues/2429