Browse Source

Merge pull request #1132 in VISUAL/fineui from ~WINDY/fineui:master to master

* commit 'c11ef59e6f14811a2bb3f913d3221dc768c68908':
  update
  BI-51100 && REPORT-21752 单测和搜索实际值配置
master
guy 5 years ago
parent
commit
4aca288b68
  1. 11
      dist/2.0/fineui.ie.js
  2. 11
      dist/2.0/fineui.js
  3. 11
      dist/bundle.ie.js
  4. 11
      dist/bundle.js
  5. 11
      dist/fineui.ie.js
  6. 11
      dist/fineui.js
  7. 11
      dist/fineui_without_jquery_polyfill.js
  8. 11
      dist/widget.js
  9. 70
      src/widget/datetime/__test__/datetime.test.js
  10. 182
      src/widget/editor/__test__/editor.search.test.js
  11. 5
      src/widget/editor/__test__/editor.text.test.js
  12. 3
      src/widget/editor/editor.search.js
  13. 4
      src/widget/multilayerselecttree/multilayerselecttree.trigger.js
  14. 4
      src/widget/multilayersingletree/multilayersingletree.trigger.js
  15. 6
      test/utils.js

11
dist/2.0/fineui.ie.js vendored

@ -66749,7 +66749,8 @@ BI.SearchEditor = BI.inherit(BI.Widget, {
hgap: 1,
errorText: o.errorText,
validationChecker: o.validationChecker,
quitChecker: o.quitChecker
quitChecker: o.quitChecker,
value: o.value
});
this.clear = BI.createWidget({
type: "bi.icon_button",
@ -69263,11 +69264,11 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
},
_getSearchItems: function(keyword) {
var o = this.options;
var self = this, o = this.options;
// 把数组搜索换成用BI.tree搜索节点, 搜到了就不再往下搜索
var items = [];
this.tree.traverse(function (node) {
var find = BI.Func.getSearchResult([node.text || (o.allowSearchValue && node.value) || ""], keyword);
var find = BI.Func.getSearchResult(self.tree.isRoot(node) ? [] : BI.concat([node.text], (o.allowSearchValue ? [node.value] : [])), keyword);
if(find.find.length > 0 || find.match.length > 0) {
items.push(node);
return true;
@ -70444,11 +70445,11 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
},
_getSearchItems: function(keyword) {
var o = this.options;
var self = this, o = this.options;
// 把数组搜索换成用BI.tree搜索节点, 搜到了就不再往下搜索
var items = [];
this.tree.traverse(function (node) {
var find = BI.Func.getSearchResult([node.text || (o.allowSearchValue && node.value) || ""], keyword);
var find = BI.Func.getSearchResult(self.tree.isRoot(node) ? [] : BI.concat([node.text], (o.allowSearchValue ? [node.value] : [])), keyword);
if(find.find.length > 0 || find.match.length > 0) {
items.push(node);
return true;

11
dist/2.0/fineui.js vendored

@ -67153,7 +67153,8 @@ BI.SearchEditor = BI.inherit(BI.Widget, {
hgap: 1,
errorText: o.errorText,
validationChecker: o.validationChecker,
quitChecker: o.quitChecker
quitChecker: o.quitChecker,
value: o.value
});
this.clear = BI.createWidget({
type: "bi.icon_button",
@ -69667,11 +69668,11 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
},
_getSearchItems: function(keyword) {
var o = this.options;
var self = this, o = this.options;
// 把数组搜索换成用BI.tree搜索节点, 搜到了就不再往下搜索
var items = [];
this.tree.traverse(function (node) {
var find = BI.Func.getSearchResult([node.text || (o.allowSearchValue && node.value) || ""], keyword);
var find = BI.Func.getSearchResult(self.tree.isRoot(node) ? [] : BI.concat([node.text], (o.allowSearchValue ? [node.value] : [])), keyword);
if(find.find.length > 0 || find.match.length > 0) {
items.push(node);
return true;
@ -70848,11 +70849,11 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
},
_getSearchItems: function(keyword) {
var o = this.options;
var self = this, o = this.options;
// 把数组搜索换成用BI.tree搜索节点, 搜到了就不再往下搜索
var items = [];
this.tree.traverse(function (node) {
var find = BI.Func.getSearchResult([node.text || (o.allowSearchValue && node.value) || ""], keyword);
var find = BI.Func.getSearchResult(self.tree.isRoot(node) ? [] : BI.concat([node.text], (o.allowSearchValue ? [node.value] : [])), keyword);
if(find.find.length > 0 || find.match.length > 0) {
items.push(node);
return true;

11
dist/bundle.ie.js vendored

@ -66749,7 +66749,8 @@ BI.SearchEditor = BI.inherit(BI.Widget, {
hgap: 1,
errorText: o.errorText,
validationChecker: o.validationChecker,
quitChecker: o.quitChecker
quitChecker: o.quitChecker,
value: o.value
});
this.clear = BI.createWidget({
type: "bi.icon_button",
@ -69263,11 +69264,11 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
},
_getSearchItems: function(keyword) {
var o = this.options;
var self = this, o = this.options;
// 把数组搜索换成用BI.tree搜索节点, 搜到了就不再往下搜索
var items = [];
this.tree.traverse(function (node) {
var find = BI.Func.getSearchResult([node.text || (o.allowSearchValue && node.value) || ""], keyword);
var find = BI.Func.getSearchResult(self.tree.isRoot(node) ? [] : BI.concat([node.text], (o.allowSearchValue ? [node.value] : [])), keyword);
if(find.find.length > 0 || find.match.length > 0) {
items.push(node);
return true;
@ -70444,11 +70445,11 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
},
_getSearchItems: function(keyword) {
var o = this.options;
var self = this, o = this.options;
// 把数组搜索换成用BI.tree搜索节点, 搜到了就不再往下搜索
var items = [];
this.tree.traverse(function (node) {
var find = BI.Func.getSearchResult([node.text || (o.allowSearchValue && node.value) || ""], keyword);
var find = BI.Func.getSearchResult(self.tree.isRoot(node) ? [] : BI.concat([node.text], (o.allowSearchValue ? [node.value] : [])), keyword);
if(find.find.length > 0 || find.match.length > 0) {
items.push(node);
return true;

11
dist/bundle.js vendored

@ -67153,7 +67153,8 @@ BI.SearchEditor = BI.inherit(BI.Widget, {
hgap: 1,
errorText: o.errorText,
validationChecker: o.validationChecker,
quitChecker: o.quitChecker
quitChecker: o.quitChecker,
value: o.value
});
this.clear = BI.createWidget({
type: "bi.icon_button",
@ -69667,11 +69668,11 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
},
_getSearchItems: function(keyword) {
var o = this.options;
var self = this, o = this.options;
// 把数组搜索换成用BI.tree搜索节点, 搜到了就不再往下搜索
var items = [];
this.tree.traverse(function (node) {
var find = BI.Func.getSearchResult([node.text || (o.allowSearchValue && node.value) || ""], keyword);
var find = BI.Func.getSearchResult(self.tree.isRoot(node) ? [] : BI.concat([node.text], (o.allowSearchValue ? [node.value] : [])), keyword);
if(find.find.length > 0 || find.match.length > 0) {
items.push(node);
return true;
@ -70848,11 +70849,11 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
},
_getSearchItems: function(keyword) {
var o = this.options;
var self = this, o = this.options;
// 把数组搜索换成用BI.tree搜索节点, 搜到了就不再往下搜索
var items = [];
this.tree.traverse(function (node) {
var find = BI.Func.getSearchResult([node.text || (o.allowSearchValue && node.value) || ""], keyword);
var find = BI.Func.getSearchResult(self.tree.isRoot(node) ? [] : BI.concat([node.text], (o.allowSearchValue ? [node.value] : [])), keyword);
if(find.find.length > 0 || find.match.length > 0) {
items.push(node);
return true;

11
dist/fineui.ie.js vendored

@ -66994,7 +66994,8 @@ BI.SearchEditor = BI.inherit(BI.Widget, {
hgap: 1,
errorText: o.errorText,
validationChecker: o.validationChecker,
quitChecker: o.quitChecker
quitChecker: o.quitChecker,
value: o.value
});
this.clear = BI.createWidget({
type: "bi.icon_button",
@ -69508,11 +69509,11 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
},
_getSearchItems: function(keyword) {
var o = this.options;
var self = this, o = this.options;
// 把数组搜索换成用BI.tree搜索节点, 搜到了就不再往下搜索
var items = [];
this.tree.traverse(function (node) {
var find = BI.Func.getSearchResult([node.text || (o.allowSearchValue && node.value) || ""], keyword);
var find = BI.Func.getSearchResult(self.tree.isRoot(node) ? [] : BI.concat([node.text], (o.allowSearchValue ? [node.value] : [])), keyword);
if(find.find.length > 0 || find.match.length > 0) {
items.push(node);
return true;
@ -70689,11 +70690,11 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
},
_getSearchItems: function(keyword) {
var o = this.options;
var self = this, o = this.options;
// 把数组搜索换成用BI.tree搜索节点, 搜到了就不再往下搜索
var items = [];
this.tree.traverse(function (node) {
var find = BI.Func.getSearchResult([node.text || (o.allowSearchValue && node.value) || ""], keyword);
var find = BI.Func.getSearchResult(self.tree.isRoot(node) ? [] : BI.concat([node.text], (o.allowSearchValue ? [node.value] : [])), keyword);
if(find.find.length > 0 || find.match.length > 0) {
items.push(node);
return true;

11
dist/fineui.js vendored

@ -67398,7 +67398,8 @@ BI.SearchEditor = BI.inherit(BI.Widget, {
hgap: 1,
errorText: o.errorText,
validationChecker: o.validationChecker,
quitChecker: o.quitChecker
quitChecker: o.quitChecker,
value: o.value
});
this.clear = BI.createWidget({
type: "bi.icon_button",
@ -69912,11 +69913,11 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
},
_getSearchItems: function(keyword) {
var o = this.options;
var self = this, o = this.options;
// 把数组搜索换成用BI.tree搜索节点, 搜到了就不再往下搜索
var items = [];
this.tree.traverse(function (node) {
var find = BI.Func.getSearchResult([node.text || (o.allowSearchValue && node.value) || ""], keyword);
var find = BI.Func.getSearchResult(self.tree.isRoot(node) ? [] : BI.concat([node.text], (o.allowSearchValue ? [node.value] : [])), keyword);
if(find.find.length > 0 || find.match.length > 0) {
items.push(node);
return true;
@ -71093,11 +71094,11 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
},
_getSearchItems: function(keyword) {
var o = this.options;
var self = this, o = this.options;
// 把数组搜索换成用BI.tree搜索节点, 搜到了就不再往下搜索
var items = [];
this.tree.traverse(function (node) {
var find = BI.Func.getSearchResult([node.text || (o.allowSearchValue && node.value) || ""], keyword);
var find = BI.Func.getSearchResult(self.tree.isRoot(node) ? [] : BI.concat([node.text], (o.allowSearchValue ? [node.value] : [])), keyword);
if(find.find.length > 0 || find.match.length > 0) {
items.push(node);
return true;

11
dist/fineui_without_jquery_polyfill.js vendored

@ -49697,7 +49697,8 @@ BI.SearchEditor = BI.inherit(BI.Widget, {
hgap: 1,
errorText: o.errorText,
validationChecker: o.validationChecker,
quitChecker: o.quitChecker
quitChecker: o.quitChecker,
value: o.value
});
this.clear = BI.createWidget({
type: "bi.icon_button",
@ -52211,11 +52212,11 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
},
_getSearchItems: function(keyword) {
var o = this.options;
var self = this, o = this.options;
// 把数组搜索换成用BI.tree搜索节点, 搜到了就不再往下搜索
var items = [];
this.tree.traverse(function (node) {
var find = BI.Func.getSearchResult([node.text || (o.allowSearchValue && node.value) || ""], keyword);
var find = BI.Func.getSearchResult(self.tree.isRoot(node) ? [] : BI.concat([node.text], (o.allowSearchValue ? [node.value] : [])), keyword);
if(find.find.length > 0 || find.match.length > 0) {
items.push(node);
return true;
@ -53392,11 +53393,11 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
},
_getSearchItems: function(keyword) {
var o = this.options;
var self = this, o = this.options;
// 把数组搜索换成用BI.tree搜索节点, 搜到了就不再往下搜索
var items = [];
this.tree.traverse(function (node) {
var find = BI.Func.getSearchResult([node.text || (o.allowSearchValue && node.value) || ""], keyword);
var find = BI.Func.getSearchResult(self.tree.isRoot(node) ? [] : BI.concat([node.text], (o.allowSearchValue ? [node.value] : [])), keyword);
if(find.find.length > 0 || find.match.length > 0) {
items.push(node);
return true;

11
dist/widget.js vendored

@ -4808,7 +4808,8 @@ BI.SearchEditor = BI.inherit(BI.Widget, {
hgap: 1,
errorText: o.errorText,
validationChecker: o.validationChecker,
quitChecker: o.quitChecker
quitChecker: o.quitChecker,
value: o.value
});
this.clear = BI.createWidget({
type: "bi.icon_button",
@ -7322,11 +7323,11 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
},
_getSearchItems: function(keyword) {
var o = this.options;
var self = this, o = this.options;
// 把数组搜索换成用BI.tree搜索节点, 搜到了就不再往下搜索
var items = [];
this.tree.traverse(function (node) {
var find = BI.Func.getSearchResult([node.text || (o.allowSearchValue && node.value) || ""], keyword);
var find = BI.Func.getSearchResult(self.tree.isRoot(node) ? [] : BI.concat([node.text], (o.allowSearchValue ? [node.value] : [])), keyword);
if(find.find.length > 0 || find.match.length > 0) {
items.push(node);
return true;
@ -8503,11 +8504,11 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
},
_getSearchItems: function(keyword) {
var o = this.options;
var self = this, o = this.options;
// 把数组搜索换成用BI.tree搜索节点, 搜到了就不再往下搜索
var items = [];
this.tree.traverse(function (node) {
var find = BI.Func.getSearchResult([node.text || (o.allowSearchValue && node.value) || ""], keyword);
var find = BI.Func.getSearchResult(self.tree.isRoot(node) ? [] : BI.concat([node.text], (o.allowSearchValue ? [node.value] : [])), keyword);
if(find.find.length > 0 || find.match.length > 0) {
items.push(node);
return true;

70
src/widget/datetime/__test__/datetime.test.js

@ -35,71 +35,49 @@ describe("DateTime", function () {
/**
* test_author_windy
*/
it("trigger的confirm-下拉面板选值confirm", function (done) {
it("点击确定选值", function (done) {
var dateCombo = BI.Test.createWidget({
type: "bi.dynamic_date_combo",
width: 220,
height: 30
type: "bi.date_time_combo",
value: {
year: 2018,
month: 2,
day: 23,
hour: 12,
minute: 12,
second: 12
}
});
// 点击日期,是否收起下拉
dateCombo.element.find(".bi-date-time-trigger .bi-basic-button").click();
dateCombo.element.find(".bi-date-time-trigger").click();
BI.nextTick(function () {
dateCombo.element.find(".bi-calendar:visible .bi-list-item-select :contains(5)").parent().click();
expect(dateCombo.element.find(".bi-date-time-trigger + .bi-popup-view").css("display")).to.equal("block");
dateCombo.element.find(".bi-calendar:visible .bi-list-item-select :contains(16)").parent().click();
dateCombo.element.find(".bi-date-time-popup .bi-text:contains(确定)").parent().click();
expect(dateCombo.element.find(".bi-date-time-trigger .bi-label").text()).to.equal("2018-02-16 12:12:12");
dateCombo.destroy();
done();
})
});
/**
* test_author_windy
*/
it("下拉后直接点击外部的触发的confirm", function (done) {
var dateCombo = BI.Test.createWidget({
type: "bi.dynamic_date_combo",
width: 220,
height: 30,
});
// 点击日期,是否收起下拉
BI.nextTick(function () {
dateCombo.element.find(".bi-date-time-trigger .bi-basic-button").click();
BI.nextTick(function () {
var input = dateCombo.element.find(".bi-date-time-trigger .bi-input");
BI.Test.triggerKeyDown(input, null, BI.KeyCode.ENTER, function () {
BI.delay(function () {
expect(dateCombo.element.find(".bi-date-time-trigger + .bi-popup-view").css("display")).to.equal("none");
dateCombo.destroy();
done();
}, 300);
});
})
});
});
/**
* test_author_windy
*/
it("点击确定", function (done) {
it("点击取消不选值", function () {
var dateCombo = BI.Test.createWidget({
type: "bi.dynamic_date_combo",
width: 220,
height: 30,
type: "bi.date_time_combo",
value: {
year: 2018,
month: 2,
day: 23
day: 23,
hour: 12,
minute: 12,
second: 12
}
});
dateCombo.element.find(".bi-date-time-trigger .bi-basic-button").click();
dateCombo.element.find(".bi-date-time-trigger").click();
BI.nextTick(function () {
dateCombo.element.find(".bi-dynamic-date-popup .bi-text:contains(确定)").parent().click();
expect(dateCombo.getValue()).to.deep.equal({
year: 2018,
month: 2,
day: 23
});
dateCombo.element.find(".bi-calendar:visible .bi-list-item-select :contains(16)").parent().click();
dateCombo.element.find(".bi-date-time-popup .bi-text:contains(取消)").parent().click();
expect(dateCombo.element.find(".bi-date-time-trigger .bi-label").text()).to.equal("2018-02-23 12:12:12");
dateCombo.destroy();
done();
})

182
src/widget/editor/__test__/editor.search.test.js

@ -0,0 +1,182 @@
/**
* @author windy
* @version 2.0
* Created by windy on 2019/9/9
*/
/**
* @author windy
* @version 2.0
* Created by windy on 2019/9/6
*/
describe("searchEditor", function () {
/**
* test_author_windy
*/
it("defaultValue", function (done) {
var editor = BI.Test.createWidget({
type: "bi.search_editor",
width: 300,
value: "12345",
watermark: "添加合法性判断",
errorText: "长度必须大于4",
validationChecker: function () {
return this.getValue().length > 4;
}
});
expect(editor.element.find(".bi-water-mark").text()).to.equal("添加合法性判断");
expect(editor.element.find(".bi-input").val()).to.equal("12345");
editor.focus();
BI.Test.triggerKeyDown(editor.element.find(".bi-input"), "8", 56, function () {
expect(editor.element.find(".bi-bubble .bubble-text:first-child").text()).to.equal("长度必须大于4");
editor.destroy();
done();
})
});
/**
* test_author_windy
*/
it("clear", function (done) {
var editor = BI.Test.createWidget({
type: "bi.search_editor",
width: 300,
value: "12345",
watermark: "添加合法性判断",
errorText: "长度必须大于4",
validationChecker: function () {
return this.getValue().length > 4;
}
});
BI.nextTick(function () {
editor.element.find(".close-font").click();
expect(editor.element.find(".bi-input").val()).to.equal("");
editor.destroy();
done();
});
});
/**
* test_author_windy
*/
it("setValue", function () {
var editor = BI.Test.createWidget({
type: "bi.search_editor",
width: 300,
watermark: "添加合法性判断",
errorText: "长度必须大于4",
validationChecker: function () {
return this.getValue().length > 4;
}
});
editor.setValue("12345");
expect(editor.element.find(".bi-input").val()).to.equal("12345");
editor.destroy();
});
/**
* test_author_windy
*/
it("getValue", function () {
var editor = BI.Test.createWidget({
type: "bi.search_editor",
width: 300,
value: "12346",
watermark: "添加合法性判断",
errorText: "长度必须大于4",
validationChecker: function () {
return this.getValue().length > 4;
}
});
expect(editor.getValue()).to.equal("12346");
editor.destroy();
});
/**
* test_author_windy
*/
it("defaultValue1", function (done) {
var editor = BI.Test.createWidget({
type: "bi.small_search_editor",
width: 300,
value: "12345",
watermark: "添加合法性判断",
errorText: "长度必须大于4",
validationChecker: function () {
return this.getValue().length > 4;
}
});
expect(editor.element.find(".bi-water-mark").text()).to.equal("添加合法性判断");
expect(editor.element.find(".bi-input").val()).to.equal("12345");
editor.focus();
BI.Test.triggerKeyDown(editor.element.find(".bi-input"), "8", 56, function () {
expect(editor.element.find(".bi-bubble .bubble-text:first-child").text()).to.equal("长度必须大于4");
editor.destroy();
done();
})
});
/**
* test_author_windy
*/
it("clear1", function (done) {
var editor = BI.Test.createWidget({
type: "bi.small_search_editor",
width: 300,
value: "12345",
watermark: "添加合法性判断",
errorText: "长度必须大于4",
validationChecker: function () {
return this.getValue().length > 4;
}
});
BI.nextTick(function () {
editor.element.find(".close-font").click();
expect(editor.element.find(".bi-input").val()).to.equal("");
editor.destroy();
done();
});
});
/**
* test_author_windy
*/
it("setValue1", function () {
var editor = BI.Test.createWidget({
type: "bi.small_search_editor",
width: 300,
watermark: "添加合法性判断",
errorText: "长度必须大于4",
validationChecker: function () {
return this.getValue().length > 4;
}
});
editor.setValue("12345");
expect(editor.element.find(".bi-input").val()).to.equal("12345");
editor.destroy();
});
/**
* test_author_windy
*/
it("getValue1", function () {
var editor = BI.Test.createWidget({
type: "bi.small_search_editor",
width: 300,
value: "12346",
watermark: "添加合法性判断",
errorText: "长度必须大于4",
validationChecker: function () {
return this.getValue().length > 4;
}
});
expect(editor.getValue()).to.equal("12346");
editor.destroy();
});
});

5
src/widget/editor/__test__/editor.text.test.js

@ -0,0 +1,5 @@
/**
* @author windy
* @version 2.0
* Created by windy on 2019/9/9
*/

3
src/widget/editor/editor.search.js

@ -25,7 +25,8 @@ BI.SearchEditor = BI.inherit(BI.Widget, {
hgap: 1,
errorText: o.errorText,
validationChecker: o.validationChecker,
quitChecker: o.quitChecker
quitChecker: o.quitChecker,
value: o.value
});
this.clear = BI.createWidget({
type: "bi.icon_button",

4
src/widget/multilayerselecttree/multilayerselecttree.trigger.js

@ -134,11 +134,11 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
},
_getSearchItems: function(keyword) {
var o = this.options;
var self = this, o = this.options;
// 把数组搜索换成用BI.tree搜索节点, 搜到了就不再往下搜索
var items = [];
this.tree.traverse(function (node) {
var find = BI.Func.getSearchResult([node.text || (o.allowSearchValue && node.value) || ""], keyword);
var find = BI.Func.getSearchResult(self.tree.isRoot(node) ? [] : BI.concat([node.text], (o.allowSearchValue ? [node.value] : [])), keyword);
if(find.find.length > 0 || find.match.length > 0) {
items.push(node);
return true;

4
src/widget/multilayersingletree/multilayersingletree.trigger.js

@ -134,11 +134,11 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
},
_getSearchItems: function(keyword) {
var o = this.options;
var self = this, o = this.options;
// 把数组搜索换成用BI.tree搜索节点, 搜到了就不再往下搜索
var items = [];
this.tree.traverse(function (node) {
var find = BI.Func.getSearchResult([node.text || (o.allowSearchValue && node.value) || ""], keyword);
var find = BI.Func.getSearchResult(self.tree.isRoot(node) ? [] : BI.concat([node.text], (o.allowSearchValue ? [node.value] : [])), keyword);
if(find.find.length > 0 || find.match.length > 0) {
items.push(node);
return true;

6
test/utils.js

@ -26,10 +26,10 @@
element.trigger(e1);
// keyup 至少等300ms后触发
var e2 = $.Event("keyup");
e2.keyCode = keyCode;
element.trigger(e2);
BI.delay(function () {
var e2 = jQuery.Event("keyup");
e2.keyCode = keyCode;
element.trigger(e2);
callback();
}, 300);
},

Loading…
Cancel
Save