simplify defineEmits

This commit is contained in:
2023-05-11 20:55:28 +02:00
parent bf7ea2f97e
commit 7cb17ce453
2 changed files with 3 additions and 2 deletions

View File

@@ -41,8 +41,9 @@ const props = defineProps<{
}>()
const emit = defineEmits<{
(e: 'set-type', type: navType): void
'set-type': [type: navType]
}>()
const setType = (type: navType) => {
toggled.value = false
emit('set-type', type)

View File

@@ -21,6 +21,6 @@ const props = defineProps<{
}>()
const emit = defineEmits<{
(e: 'set-window', window: Window): void
'set-window': [window: Window]
}>()
</script>