Browse Source

Merge pull request #1304 in VISUAL/fineui from ~KOBI/fineui:master to master

* commit '1bb90a1c4dc45761d53578c80696bb8a30af5bb5':
  KERNEL-3911 用BI.concat替换concat
  KERNEL-3911 fix: 修复demo中搜索的结果没有对应的子节点的问题
es6
Kobi 4 years ago
parent
commit
137ef42d38
  1. 12
      demo/js/west.js

12
demo/js/west.js

@ -37,7 +37,17 @@ Demo.West = BI.inherit(BI.Widget, {
},
onSearch: function (op, callback) {
var result = BI.Func.getSearchResult(Demo.CONFIG, op.keyword, "text");
var items = result.match.concat(result.find);
var items = BI.concat(result.match, result.find);
var children = [];
BI.each(items, function (index, item) {
var childList = BI.Func.getSearchResult(Demo.CONFIG, item.id, "pId");
BI.each(childList.match, function (index, child) {
if (child.value) {
children.push(child);
}
});
});
items = BI.concat(items, children);
callback(items);
}
}],

Loading…
Cancel
Save