Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/api/options-state.md
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,21 @@ Declare the custom events emitted by the component.
}
```

Listeners on events may be captured in components by defining them as properties with the naming scheme of `on{Event}`:

> If an event contains a colon, use the naming scheme `on{Event}:{event}`.

```js
export default {
props: {
onCheck: Function,
'onClick:export': Function,
},

emits: ['check', 'click:export'],
}
```

- **See also**
- [Guide - Fallthrough Attributes](/guide/components/attrs)
- [Guide - Typing Component Emits](/guide/typescript/options-api#typing-component-emits) <sup class="vt-badge ts" />
Expand Down