mirror of
https://github.com/tiny-craft/tiny-rdm.git
synced 2025-05-12 05:48:05 +08:00
pref: add *
to filter keyword prefix when use fuzzy matching (#437)
This commit is contained in:
parent
2aa302c652
commit
69752d2a90
@ -1,5 +1,5 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { endsWith, get, isEmpty, join, map, now, size, slice, split } from 'lodash'
|
||||
import { endsWith, get, isEmpty, join, map, now, size, slice, split, startsWith } from 'lodash'
|
||||
import {
|
||||
AddHashField,
|
||||
AddListItem,
|
||||
@ -644,6 +644,9 @@ const useBrowserStore = defineStore('browser', {
|
||||
}
|
||||
|
||||
if (!isRedisGlob(match) && !exact) {
|
||||
if (!startsWith(match, '*')) {
|
||||
match = '*' + match
|
||||
}
|
||||
if (!endsWith(match, '*')) {
|
||||
match = match + '*'
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user