From fc54af70a787b9ab3ced9851226e3e13874c3a86 Mon Sep 17 00:00:00 2001 From: Renzo Date: Wed, 1 Feb 2023 16:38:40 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"JSY-26063=20fix:=20=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E6=94=AF=E6=8C=81=E9=85=8D=E7=BD=AE=E5=A4=A7?= =?UTF-8?q?=E5=B0=8F=E5=86=99=E6=95=8F=E6=84=9F"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit bb7905bf0f347d7944e3255cecd3a64f61e46a0e. --- src/core/func/function.js | 10 +++------- typescript/core/func/function.ts | 3 +-- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/core/func/function.js b/src/core/func/function.js index cc77b7798..83d58c5ec 100644 --- a/src/core/func/function.js +++ b/src/core/func/function.js @@ -40,13 +40,11 @@ BI._.extend(BI.Func, { * @param items * @param keyword * @param param 搜索哪个属性 - * @param opt 额外配置,caseSensitive: 大小写敏感 */ - getSearchResult: function (items, keyword, param, opt) { + getSearchResult: function (items, keyword, param) { var isArray = BI.isArray(items); items = isArray ? BI.flatten(items) : items; param || (param = "text"); - opt || (opt = {caseSensitive: false}); if (!BI.isKey(keyword)) { return { find: items, @@ -71,10 +69,8 @@ BI._.extend(BI.Func, { py = BI.makeFirstPY(text, { splitChar: "\u200b" }); - if (!opt.caseSensitive) { - text = BI.toUpperCase(text); - py = BI.toUpperCase(py); - } + text = BI.toUpperCase(text); + py = BI.toUpperCase(py); var pidx; if (text.indexOf(keyword) > -1) { if (text === keyword) { diff --git a/typescript/core/func/function.ts b/typescript/core/func/function.ts index 12634e513..4da9ab104 100644 --- a/typescript/core/func/function.ts +++ b/typescript/core/func/function.ts @@ -13,9 +13,8 @@ export type _function = { * @param items 待搜索的数据 * @param keyword 关键字 * @param param 搜索哪个属性 - * @param opt 额外配置,caseSensitive: 大小写敏感 */ - getSearchResult: (items: any, keyword: any, param?: string, opt?: {caseSensitive: boolean}) => { find: any[], match: any[] }; + getSearchResult: (items: any, keyword: any, param?: string) => { find: any[], match: any[] }; /** * 获取编码后的url