From 4d57f23831fa32a44cc24a7ec835d3f21ea1e7de Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Tue, 19 Nov 2019 16:06:50 +0800 Subject: [PATCH] =?UTF-8?q?BI-56029=20fix:=20getSearchResult=E4=BC=A0null?= =?UTF-8?q?=E4=BC=9A=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- changelog.md | 4 ++++ src/core/func/function.js | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/changelog.md b/changelog.md index 4714cc63c..6d85006d5 100644 --- a/changelog.md +++ b/changelog.md @@ -1,4 +1,8 @@ # 更新日志 +2.0(2019-11) +- getSearchResult兼容了对null值的处理 +- 增加了异步单选下拉树请求完数据后加载完节点后会自动调整宽高的逻辑 + 2.0(2019-10) - 修改了下拉树展开图标模糊的问题 - 修复了下拉树搜索高亮字符与正常字符间存在间距的问题 diff --git a/src/core/func/function.js b/src/core/func/function.js index b2d65b6f5..cb323c5ea 100644 --- a/src/core/func/function.js +++ b/src/core/func/function.js @@ -55,6 +55,10 @@ _.extend(BI.Func, { keyword = BI.toUpperCase(keyword); var matched = isArray ? [] : {}, find = isArray ? [] : {}; BI.each(items, function (i, item) { + // 兼容item为null的处理 + if (BI.isNull(item)) { + return; + } item = BI.deepClone(item); t = BI.stripEL(item); text = BI.find([t[param], t.text, t.value, t.name, t], function (index, val) {