diff --git a/components/common/Modal.vue b/components/common/Modal.vue index b19c02b2..b88945f3 100644 --- a/components/common/Modal.vue +++ b/components/common/Modal.vue @@ -78,13 +78,19 @@ const props = defineProps({ }); const emit = defineEmits<{ + (eventName: "close"): void; (eventName: "update:opened", value: boolean): void; (eventName: "after-leave", value: boolean): void; }>(); const isModalOpened = computed({ get: () => props.opened, - set: (value) => emit("update:opened", value), + set: (value) => { + if (!value) { + emit("close"); + } + emit("update:opened", value); + }, }); const closeOnBackgroundClick = () => { if (props.closeOnBackgroundClick) { diff --git a/components/destination/DestinationItem.vue b/components/destination/DestinationItem.vue index 9c596c0b..013bdaaa 100644 --- a/components/destination/DestinationItem.vue +++ b/components/destination/DestinationItem.vue @@ -1,7 +1,9 @@