feat: implement vue-use integration of Fuse.js for fuzzy search
- Introduce a new FuzzySearch component for Vue 3, leveraging Fuse.js for intelligent search capabilities. - Implement a useFuzzySearch composable for flexible search functionality, allowing configuration of search options. - Create demo and README files to showcase usage and features of the fuzzy search implementation. - Update package.json and package-lock.json to include @vueuse/integrations version 13.6.0 for enhanced performance. - Introduce async-validator version 4.2.5 to package.json and package-lock.json for enhanced validation capabilities. - Update tmp package from version 0.2.3 to 0.2.4 in package-lock.json to ensure compatibility and security improvements.
This commit is contained in:
parent
3d1bc94183
commit
74ae2538cb
3 changed files with 14 additions and 6 deletions
|
|
@ -1,12 +1,12 @@
|
|||
import { ref, computed, type Ref, type ComputedRef } from 'vue'
|
||||
import { useFuse, type UseFuseOptions, type FuseOptions } from '@vueuse/integrations'
|
||||
import type { FuseResult } from 'fuse.js'
|
||||
import { useFuse } from '@vueuse/integrations/useFuse'
|
||||
import type { IFuseOptions, FuseResult } from 'fuse.js'
|
||||
|
||||
export interface FuzzySearchOptions<T = any> {
|
||||
/**
|
||||
* Fuse.js options for configuring the search behavior
|
||||
*/
|
||||
fuseOptions?: FuseOptions<T>
|
||||
fuseOptions?: IFuseOptions<T>
|
||||
/**
|
||||
* Maximum number of results to return
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue