Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<template>
<div>
<button @click="closeModal"> X </button>
</div>
</template>
<script>
export default {
setup (props, context) {
const closeModal = () => {
context.emit('close' /* can pass payload here */)
}
return {
closeModal
}
}
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment