-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Inconsistent event casing for render functions #2249
Labels
🐞 bug
Something isn't working
Comments
I think the only one expected to work on a render function should be |
I am agree with you, and I think |
shadowings-zy
added a commit
to shadowings-zy/vuejs-core
that referenced
this issue
Oct 2, 2020
shadowings-zy
added a commit
to shadowings-zy/vuejs-core
that referenced
this issue
Oct 2, 2020
…sistent event casing for in-DOM template(vuejs#2249)
yyx990803
pushed a commit
that referenced
this issue
Oct 6, 2020
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Version
3.0.0
Reproduction link
https://codesandbox.io/s/nervous-surf-f5lbs
Steps to reproduce
Create a render function that recieves a custom event. In eslint-plugin-vue & the docs you recommend to use kebab case for events that are emitted.
This causes some friction for me when using render functions as when listening for those events in the prop arg of
h
we need to prefix the event name withon
& the name of the event to listen to.However I looked at the source and the only transformation done is that the first letter of the event is capitalised. This means that kebab-case events (as recommended) would need to be listened to as
onEvent-emitted
.What is expected?
That the casing would adhere to either camel or kebab case listening for events & not combining both.
What is actually happening?
Its a mixture of both.
onTest-Event
is the key required rather than eitheron-test-event
as specified in the component being emitted, oronTestEvent
to avoid the need to wrap the event key in quotes.I think the docs should be updated to clarify this inconsistency. I'll create an issue in the docs repo to talk about this once this has been clarified
The text was updated successfully, but these errors were encountered: