Skip to content

Commit

Permalink
fix: fuse options position
Browse files Browse the repository at this point in the history
  • Loading branch information
YunYouJun committed Apr 29, 2024
1 parent d7111a0 commit bbb3b73
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
8 changes: 4 additions & 4 deletions packages/valaxy-theme-press/components/PressNavScreen.vue
@@ -1,20 +1,20 @@
<script setup lang="ts">
import { ref } from 'vue'
import { useBodyScrollLock } from 'valaxy'
import { isClient, useScrollLock } from '@vueuse/core'
defineProps<{
open: boolean
}>()
const screen = ref<HTMLElement>()
const { lockBodyScroll, unlockBodyScroll } = useBodyScrollLock(screen)
const isLocked = useScrollLock(isClient ? document.body : null)
</script>

<template>
<Transition
name="fade"
@enter="lockBodyScroll"
@after-leave="unlockBodyScroll"
@enter="isLocked = true"
@after-leave="isLocked = false"
>
<div v-if="open" ref="screen" class="pr-NavScreen">
<div class="container" flex="~ col">
Expand Down
9 changes: 5 additions & 4 deletions packages/valaxy-theme-yun/components/YunFuseSearch.vue
Expand Up @@ -32,20 +32,21 @@ const keys = computed(() => {
const input = ref('')
// todo export options
const fuseOptions = computed<UseFuseOptions<FuseListItem>>(() => ({
const useFuseOptions = computed<UseFuseOptions<FuseListItem>>(() => ({
fuseOptions: {
includeMatches: true,
findAllMatches: true,
...siteConfig.value.fuse.options,
keys: keys.value,
// threshold: 0.99,
// ignoreLocation: true,
},
includeMatches: true,
findAllMatches: true,
// resultLimit: resultLimit.value,
// matchAllWhenSearchEmpty: matchAllWhenSearchEmpty.value,
}))
const { results } = useFuse(input, fuseListData, fuseOptions)
const { results } = useFuse(input, fuseListData, useFuseOptions)
const searchInputRef = ref<HTMLInputElement>()
Expand Down

1 comment on commit bbb3b73

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 Published on https://yun.valaxy.site as production
🚀 Deployed on https://662f68da8f12040875d6503b--valaxy.netlify.app

Please sign in to comment.