diff --git a/src/utils/tool.ts b/src/utils/tool.ts index aef84463..5888a6bd 100644 --- a/src/utils/tool.ts +++ b/src/utils/tool.ts @@ -165,6 +165,10 @@ export const _search = ( keys: string | string[], highlight = false, ): T[] => { + if (!Array.isArray(value) && value === "") { + return data; + } + const arr: T[] = []; // 根据给定的值和键名进行搜索