Vue 3 · Components
Declare events
Declare the events a component emits, then emit one.
const emit = defineEmits<{ (e: "update", value: string): void }>();
emit("update", "hello");
Vue 3 · Components
Declare the events a component emits, then emit one.
const emit = defineEmits<{ (e: "update", value: string): void }>();
emit("update", "hello");
Was this page helpful?