chore: rename emit function

This commit is contained in:
三咲智子 2023-01-02 06:06:27 +08:00
parent 72e03f8109
commit b48a893614
No known key found for this signature in database
GPG key ID: 69992F2250DFD93E
5 changed files with 11 additions and 11 deletions

View file

@ -4,14 +4,14 @@ const props = withDefaults(defineProps<{
}>(), {
modelValue: true,
})
const emits = defineEmits<{
const emit = defineEmits<{
(e: 'update:modelValue', v: boolean): void
(event: 'close'): void
}>()
const visible = useVModel(props, 'modelValue', emits, { passive: true })
const visible = useVModel(props, 'modelValue', emit, { passive: true })
function close() {
emits('close')
emit('close')
visible.value = false
}
</script>