Browse Source

BI-66444 fix: setValue为空和空数组行为一致

es6
windy 4 years ago
parent
commit
e4e26c3537
  1. 5
      src/case/combo/icontextvaluecombo/combo.icontextvalue.js
  2. 5
      src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js
  3. 5
      src/case/combo/textvaluecombo/combo.textvalue.js

5
src/case/combo/icontextvaluecombo/combo.icontextvalue.js

@ -67,7 +67,10 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
},
_checkError: function (v) {
if(BI.isNotNull(v)) {
if(BI.isNull(v) || BI.isEmptyArray(v)) {
this.trigger.options.tipType = "success";
this.element.removeClass("combo-error");
} else {
v = BI.isArray(v) ? v : [v];
var result = BI.find(this.options.items, function (idx, item) {
return BI.contains(v, item.value);

5
src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js

@ -124,7 +124,10 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
},
_checkError: function (v) {
if(BI.isNotNull(v)) {
if(BI.isNull(v) || BI.isEmptyArray(v)) {
this.trigger.options.tipType = "success";
this.element.removeClass("combo-error");
} else {
v = BI.isArray(v) ? v : [v];
var result = BI.find(this.options.items, function (idx, item) {
return BI.contains(v, item.value);

5
src/case/combo/textvaluecombo/combo.textvalue.js

@ -62,7 +62,10 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
},
_checkError: function (v) {
if(BI.isNotNull(v)) {
if(BI.isNull(v) || BI.isEmptyArray(v)) {
this.trigger.options.tipType = "success";
this.element.removeClass("combo-error");
} else {
v = BI.isArray(v) ? v : [v];
var result = BI.find(this.options.items, function (idx, item) {
return BI.contains(v, item.value);

Loading…
Cancel
Save