-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed
Labels
Description
Vue.js version
1.0.21
Reproduction Link
https://jsfiddle.net/paulpflug/5sH6A/312/
Steps to reproduce
// in component
this.$emit("testTest") // camelCase
// outside
<comp @test-test="test"></comp>
What is Expected?
Event should be called
What is actually happening?
Event isn't called
This is a bit delicate.
When working with attributes it is totally clear to expect the same behavior as props
.
current behavior:
case | $emit | $on in code | v-on in attributes |
---|---|---|---|
1 | camelCase | camelCase | not possible |
2 | lowercase | lowercase | lowercase /camelCase |
3 | hypenated | hypenated | hypenated |
I think this makes more sense:
case | $emit | $on in code | v-on in attributes |
---|---|---|---|
1 | camelCase | camelCase | hypenated |
2 | lowercase | lowercase | lowercase /camelCase |
3 | warn to use camelCase | warn to use camelCase | hypenated |
sirlancelot