From a1afaa95424c939dd1200a61ff8f8a392d22c615 Mon Sep 17 00:00:00 2001 From: dailer Date: Mon, 21 Feb 2022 19:13:09 +0800 Subject: [PATCH] =?UTF-8?q?getSearchResult=E6=96=B9=E6=B3=95=E7=9A=84deepC?= =?UTF-8?q?lone?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/func/function.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/core/func/function.js b/src/core/func/function.js index 05c8fe78a..2d3f9a3e8 100644 --- a/src/core/func/function.js +++ b/src/core/func/function.js @@ -40,16 +40,14 @@ _.extend(BI.Func, { * @param items * @param keyword * @param param 搜索哪个属性 - * @param clone 是否需要deepClone */ - getSearchResult: function (items, keyword, param, clone) { + getSearchResult: function (items, keyword, param) { var isArray = BI.isArray(items); items = isArray ? BI.flatten(items) : items; param || (param = "text"); - BI.isNull(clone) && (clone = true); if (!BI.isKey(keyword)) { return { - find: clone ? BI.deepClone(items) : items, + find: items, match: isArray ? [] : {} }; } @@ -61,7 +59,6 @@ _.extend(BI.Func, { if (BI.isNull(item)) { return; } - clone && (item = BI.deepClone(item)); t = BI.stripEL(item); text = BI.find([t[param], t.text, t.value, t.name, t], function (index, val) { return BI.isNotNull(val);