Skip to content

Commit 9f7f591

Browse files
authored
feat(useOverlay): add closeAll method (#3984)
1 parent 88ff542 commit 9f7f591

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/runtime/composables/useOverlay.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ function _useOverlay() {
8888
}
8989
}
9090

91+
const closeAll = (): void => {
92+
overlays.forEach(overlay => close(overlay.id))
93+
}
94+
9195
const unMount = (id: symbol): void => {
9296
const overlay = getOverlay(id)
9397

@@ -121,6 +125,7 @@ function _useOverlay() {
121125
overlays,
122126
open,
123127
close,
128+
closeAll,
124129
create,
125130
patch,
126131
unMount

0 commit comments

Comments
 (0)