fix(useOverlay)!: correct spelling of unmount function (#4051)

Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
Eugen Istoc
2025-05-30 11:27:22 -04:00
committed by GitHub
parent 37abcc6a5b
commit 546df572fc
3 changed files with 5 additions and 5 deletions

View File

@@ -62,7 +62,7 @@ Update an overlay using its `id`
- `id`: The identifier of the overlay
- `props`: An object of props to update on the rendered component.
### `unMount(id: symbol): void`
### `unmount(id: symbol): void`
Removes the overlay from the DOM using its `id`

View File

@@ -2,13 +2,13 @@
import { computed } from 'vue'
import { useOverlay, type Overlay } from '../composables/useOverlay'
const { overlays, unMount, close } = useOverlay()
const { overlays, unmount, close } = useOverlay()
const mountedOverlays = computed(() => overlays.filter((overlay: Overlay) => overlay.isMounted))
const onAfterLeave = (id: symbol) => {
close(id)
unMount(id)
unmount(id)
}
const onClose = (id: symbol, value: any) => {

View File

@@ -93,7 +93,7 @@ function _useOverlay() {
overlays.forEach(overlay => close(overlay.id))
}
const unMount = (id: symbol): void => {
const unmount = (id: symbol): void => {
const overlay = getOverlay(id)
overlay.isMounted = false
@@ -135,7 +135,7 @@ function _useOverlay() {
closeAll,
create,
patch,
unMount,
unmount,
isOpen
}
}