From 0162245ce82d7d59bc7bb16509666f4f9d20e834 Mon Sep 17 00:00:00 2001 From: lengyibai <1329670984@qq.com> Date: Wed, 3 Jul 2024 00:02:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E5=80=BC=E4=B8=BA=E7=A9=BA=E6=97=B6=E6=B2=A1=E6=9C=89=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E5=AE=8C=E6=95=B4=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/tool.ts | 4 ++++ 1 file changed, 4 insertions(+) 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[] = []; // 根据给定的值和键名进行搜索