simplify defineEmits
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -21,6 +21,6 @@ const props = defineProps<{
|
||||
}>()
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'set-window', window: Window): void
|
||||
'set-window': [window: Window]
|
||||
}>()
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user