Skip to content

Commit

Permalink
fix: 修复搜索值为空时没有返回完整列表
Browse files Browse the repository at this point in the history
  • Loading branch information
lengyibai committed Jul 2, 2024
1 parent 06d1231 commit 0162245
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/utils/tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@ export const _search = <T>(
keys: string | string[],
highlight = false,
): T[] => {
if (!Array.isArray(value) && value === "") {
return data;
}

const arr: T[] = [];

// 根据给定的值和键名进行搜索
Expand Down

0 comments on commit 0162245

Please sign in to comment.