Browse Source

Merge pull request #900 in VISUAL/fineui from ~LEI.WANG/fineui:master to master

* commit '57ea70af2735db710bd9465ea863c621448420bd':
  BI-43211 feat:createDistinctName支持字符串数组
es6
windy 6 years ago
parent
commit
6cb7e77b81
  1. 2
      dist/2.0/fineui.ie.js
  2. 2
      dist/2.0/fineui.js
  3. 2
      dist/bundle.ie.js
  4. 2
      dist/bundle.js
  5. 2
      dist/core.js
  6. 2
      dist/fineui.ie.js
  7. 2
      dist/fineui.js
  8. 2
      dist/fineui_without_jquery_polyfill.js
  9. 2
      dist/utils.js
  10. 2
      src/core/func/function.js
  11. 24
      test/utils/func.test.js

2
dist/2.0/fineui.ie.js vendored

@ -18105,7 +18105,7 @@ _.extend(BI.Func, {
name = name || ""; name = name || "";
while (true) { while (true) {
if (BI.every(array, function (i, item) { if (BI.every(array, function (i, item) {
return item.name !== name; return BI.isKey(item) ? item !== name : item.name !== name;
})) { })) {
break; break;
} }

2
dist/2.0/fineui.js vendored

@ -18105,7 +18105,7 @@ _.extend(BI.Func, {
name = name || ""; name = name || "";
while (true) { while (true) {
if (BI.every(array, function (i, item) { if (BI.every(array, function (i, item) {
return item.name !== name; return BI.isKey(item) ? item !== name : item.name !== name;
})) { })) {
break; break;
} }

2
dist/bundle.ie.js vendored

@ -18105,7 +18105,7 @@ _.extend(BI.Func, {
name = name || ""; name = name || "";
while (true) { while (true) {
if (BI.every(array, function (i, item) { if (BI.every(array, function (i, item) {
return item.name !== name; return BI.isKey(item) ? item !== name : item.name !== name;
})) { })) {
break; break;
} }

2
dist/bundle.js vendored

@ -18105,7 +18105,7 @@ _.extend(BI.Func, {
name = name || ""; name = name || "";
while (true) { while (true) {
if (BI.every(array, function (i, item) { if (BI.every(array, function (i, item) {
return item.name !== name; return BI.isKey(item) ? item !== name : item.name !== name;
})) { })) {
break; break;
} }

2
dist/core.js vendored

@ -18105,7 +18105,7 @@ _.extend(BI.Func, {
name = name || ""; name = name || "";
while (true) { while (true) {
if (BI.every(array, function (i, item) { if (BI.every(array, function (i, item) {
return item.name !== name; return BI.isKey(item) ? item !== name : item.name !== name;
})) { })) {
break; break;
} }

2
dist/fineui.ie.js vendored

@ -18350,7 +18350,7 @@ _.extend(BI.Func, {
name = name || ""; name = name || "";
while (true) { while (true) {
if (BI.every(array, function (i, item) { if (BI.every(array, function (i, item) {
return item.name !== name; return BI.isKey(item) ? item !== name : item.name !== name;
})) { })) {
break; break;
} }

2
dist/fineui.js vendored

@ -18350,7 +18350,7 @@ _.extend(BI.Func, {
name = name || ""; name = name || "";
while (true) { while (true) {
if (BI.every(array, function (i, item) { if (BI.every(array, function (i, item) {
return item.name !== name; return BI.isKey(item) ? item !== name : item.name !== name;
})) { })) {
break; break;
} }

2
dist/fineui_without_jquery_polyfill.js vendored

@ -17851,7 +17851,7 @@ _.extend(BI.Func, {
name = name || ""; name = name || "";
while (true) { while (true) {
if (BI.every(array, function (i, item) { if (BI.every(array, function (i, item) {
return item.name !== name; return BI.isKey(item) ? item !== name : item.name !== name;
})) { })) {
break; break;
} }

2
dist/utils.js vendored

@ -10841,7 +10841,7 @@ _.extend(BI.Func, {
name = name || ""; name = name || "";
while (true) { while (true) {
if (BI.every(array, function (i, item) { if (BI.every(array, function (i, item) {
return item.name !== name; return BI.isKey(item) ? item !== name : item.name !== name;
})) { })) {
break; break;
} }

2
src/core/func/function.js

@ -15,7 +15,7 @@ _.extend(BI.Func, {
name = name || ""; name = name || "";
while (true) { while (true) {
if (BI.every(array, function (i, item) { if (BI.every(array, function (i, item) {
return item.name !== name; return BI.isKey(item) ? item !== name : item.name !== name;
})) { })) {
break; break;
} }

24
test/utils/func.test.js

@ -0,0 +1,24 @@
/**
* @Author: lei.wang
* @Maintainers: lei.wang
* @Date: 2019-04-16
*/
describe("core-function-test", function () {
/**
* test_author_lei.wang
*/
it("createDistinctName-支持字符串数组", function () {
var names = ["name", "name1"];
expect(BI.Func.createDistinctName(names, "name")).to.equal("name2");
expect(BI.Func.createDistinctName(names, "name2")).to.equal("name2");
});
/**
* test_author_lei.wang
*/
it("createDistinctName-支持对象数组数组", function () {
var names = [{ name: "name" }, { name: "name1" }];
expect(BI.Func.createDistinctName(names, "name")).to.equal("name2");
expect(BI.Func.createDistinctName(names, "name2")).to.equal("name2");
});
});
Loading…
Cancel
Save