Skip to content

Commit 09966c8

Browse files
committed
chore: fix nestedModal viteplay example
1 parent bbd57eb commit 09966c8

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

viteplay/src/components/VueFinalModal/ConfirmModal.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ defineProps<{
1212
const emit = defineEmits<{
1313
(e: 'confirm'): void
1414
(e: 'cancel'): void
15+
(e: 'closed'): void
1516
}>()
1617
</script>
1718

@@ -22,6 +23,7 @@ const emit = defineEmits<{
2223
:overlay-behavior="overlayBehavior"
2324
style="display: flex; justify-content: center; align-items: center;"
2425
overlay-style="background-color: rgba(0, 0, 0, 0.4)"
26+
@closed="() => emit('closed')"
2527
>
2628
<div class="confirm-modal">
2729
<h1>{{ title }}</h1>

viteplay/src/components/VueFinalModal/NestedModal.example.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ function openConfirmModal() {
2020
openConfirmModal()
2121
},
2222
onCancel: () => close(),
23+
onClosed: () => count.value -= 1,
2324
},
2425
})
2526
}

0 commit comments

Comments
 (0)