Skip to content

Commit 9a957c8

Browse files
authored
Update events.md - Diff between Options API and Composition API text
The emits support for object sintax for Options API text was displayed for both, Options and Composition API.
1 parent ca0ece7 commit 9a957c8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/guide/components/events.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,10 @@ export default {
176176

177177
</div>
178178

179-
The `emits` option also supports an object syntax, which allows us to perform runtime validation of the payload of the emitted events:
180-
181179
<div class="composition-api">
182180

181+
The `defineEmits()` macro also supports an object syntax, which allows us to perform runtime validation of the payload of the emitted events:
182+
183183
```vue
184184
<script setup>
185185
const emit = defineEmits({
@@ -207,6 +207,8 @@ More details: [Typing Component Emits](/guide/typescript/composition-api#typing-
207207
</div>
208208
<div class="options-api">
209209

210+
The `emits` option also supports an object syntax, which allows us to perform runtime validation of the payload of the emitted events:
211+
210212
```js
211213
export default {
212214
emits: {

0 commit comments

Comments
 (0)