Skip to content

Commit aff6313

Browse files
committed
fix: clean up before unmount
1 parent 61b3bd6 commit aff6313

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

docs/.vitepress/theme/glare-card/glare-card.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575

7676
<script setup lang="ts">
7777
import { motion, cubicBezier, AnimatePresence } from 'motion-v'
78-
import { watch } from 'vue'
78+
import { onBeforeUnmount, watch } from 'vue'
7979
8080
import Card from './card.vue'
8181
@@ -90,4 +90,9 @@ watch(model, (value) => {
9090
document.body.classList.remove('overflow-hidden')
9191
}
9292
}, { immediate: true })
93+
94+
onBeforeUnmount(() => {
95+
document.documentElement.classList.remove('overflow-hidden')
96+
document.body.classList.remove('overflow-hidden')
97+
})
9398
</script>

0 commit comments

Comments
 (0)