diff --git a/src/runtime/composables/useOverlay.ts b/src/runtime/composables/useOverlay.ts index 9497cb4a..f0522cf1 100644 --- a/src/runtime/composables/useOverlay.ts +++ b/src/runtime/composables/useOverlay.ts @@ -88,6 +88,10 @@ function _useOverlay() { } } + const closeAll = (): void => { + overlays.forEach(overlay => close(overlay.id)) + } + const unMount = (id: symbol): void => { const overlay = getOverlay(id) @@ -121,6 +125,7 @@ function _useOverlay() { overlays, open, close, + closeAll, create, patch, unMount