Vue.js · Function
defineEmits
defineEmits declares the custom events a Vue component can emit. In <script setup>, it returns a function for sending events with optional payloads and type checking.
Last updated
Syntax
defineEmits(events)
defineEmits<Type>()In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
$emitemits optionscript setupsetup()component events