From da85f8642341447b1361b98d771535fb3164cf5b Mon Sep 17 00:00:00 2001 From: catchonme Date: Tue, 26 Nov 2019 19:32:42 +0800 Subject: [PATCH] =?UTF-8?q?filter=E5=8C=B9=E9=85=8D=E4=B8=8D=E5=8C=BA?= =?UTF-8?q?=E5=88=86=E5=A4=A7=E5=B0=8F=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/tpl-builtin.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/utils/tpl-builtin.ts b/src/utils/tpl-builtin.ts index ffef1f42..167d2da1 100644 --- a/src/utils/tpl-builtin.ts +++ b/src/utils/tpl-builtin.ts @@ -257,10 +257,7 @@ export const filters: { return input; } - fn = value => - !!~String(value) - .toLowerCase() - .indexOf(arg1); + fn = value => new RegExp(arg1, 'i').test(String(value)); } keys = keys.split(/\s*,\s*/);