Skip to content

Commit edf61f8

Browse files
fix: fixed casing for event
1 parent 000b53c commit edf61f8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/guide/component-custom-events.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Unlike components and props, event names don't provide any automatic case transformation. Instead, the name of an emitted event must exactly match the name used to listen to that event. For example, if emitting a camelCased event name:
88

99
```js
10-
this.$emit('myEvent')
10+
this.$emit('my-event')
1111
```
1212

1313
Listening to the kebab-cased version will have no effect:
@@ -33,7 +33,7 @@ app.component('custom-form', {
3333
})
3434
```
3535

36-
When a native event (e.g., `click`) is defined in the `emits` option, the component event will be used __instead__ of a native event listener.
36+
When a native event (e.g., `click`) is defined in the `emits` option, the component event will be used **instead** of a native event listener.
3737

3838
::: tip
3939
It is recommended to define all emitted events in order to better document how a component should work.

0 commit comments

Comments
 (0)