valaxy-theme-press 0.18.6 → 0.18.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,20 +1,20 @@
1
1
  <script setup lang="ts">
2
2
  import { ref } from 'vue'
3
- import { useBodyScrollLock } from 'valaxy'
3
+ import { isClient, useScrollLock } from '@vueuse/core'
4
4
 
5
5
  defineProps<{
6
6
  open: boolean
7
7
  }>()
8
8
 
9
9
  const screen = ref<HTMLElement>()
10
- const { lockBodyScroll, unlockBodyScroll } = useBodyScrollLock(screen)
10
+ const isLocked = useScrollLock(isClient ? document.body : null)
11
11
  </script>
12
12
 
13
13
  <template>
14
14
  <Transition
15
15
  name="fade"
16
- @enter="lockBodyScroll"
17
- @after-leave="unlockBodyScroll"
16
+ @enter="isLocked = true"
17
+ @after-leave="isLocked = false"
18
18
  >
19
19
  <div v-if="open" ref="screen" class="pr-NavScreen">
20
20
  <div class="container" flex="~ col">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valaxy-theme-press",
3
- "version": "0.18.6",
3
+ "version": "0.18.8",
4
4
  "description": "Docs Theme for Valaxy",
5
5
  "author": {
6
6
  "email": "me@yunyoujun.cn",
@@ -23,6 +23,6 @@
23
23
  "@docsearch/js": "^3.6.0"
24
24
  },
25
25
  "devDependencies": {
26
- "valaxy": "0.18.6"
26
+ "valaxy": "0.18.8"
27
27
  }
28
28
  }