valaxy icon indicating copy to clipboard operation
valaxy copied to clipboard

feat: add search components & enhancements

Open WRXinYue opened this issue 1 year ago • 1 comments

  • Added: New useFuseSearch composables to facilitate developer calls
  • Added: Added extendKeys configuration item to extend the fields obtained by search
  • Fixed: [yun] Fixed the issue where isLocked was ineffective in the yun theme
  • Changed: keys no longer extends the field 'content', but uses extendKeys for field extension
  • Changed: [yun] Updated the search code for the yun theme and encapsulated the hotkey tool

useFuseSearch demo

<script lang="ts" setup>
import { onMounted, ref } from 'vue'
import { useFuseSearch } from 'valaxy'

const input = ref()

const { results } = useFuseSearch(input)
</script>

<template>
  <input v-model="input">
</template>

extendKeys demo

import { defineSiteConfig } from 'valaxy'

export default defineSiteConfig({
  fuse: {
    extendKeys: ['cover'],
  },
})

WRXinYue avatar Oct 23 '24 09:10 WRXinYue

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
valaxy-docs-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 31, 2024 4:11am

vercel[bot] avatar Oct 23 '24 09:10 vercel[bot]

Could you add more description for the difference between extendKeys and keys?

YunYouJun avatar Oct 23 '24 10:10 YunYouJun

That’s a wrap

WRXinYue avatar Oct 24 '24 04:10 WRXinYue

The extendKeys configuration item needs to be modified and is not recommended to be written in siteConfig.

WRXinYue avatar Oct 25 '24 09:10 WRXinYue

The extendKeys configuration item needs to be modified and is not recommended to be written in siteConfig.

I'm a little confused about this.

YunYouJun avatar Oct 30 '24 13:10 YunYouJun

Yun Good!

github-actions[bot] avatar Nov 08 '24 01:11 github-actions[bot]