Browse Source

Merge pull request #66878 in DEC/fineui from master to feature/x

* commit 'b3da2db3fa28638564fbe8f3385246f3bd45424f':
  BI-107309 fix: 【6.0迭代】来源表是未更新到最新数据的自助数据集,切换数据量灰化的tooltip提示不对
es6
superman 3 years ago
parent
commit
f4447e8e0d
  1. 29
      src/case/combo/textvaluecombo/combo.textvalue.js

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

@ -83,25 +83,22 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
}, },
_checkError: function (v) { _checkError: function (v) {
if (BI.isNull(v) || BI.isEmptyArray(v) || BI.isEmptyString(v)) { v = BI.isArray(v) ? v[0] : v;
this.trigger.options.tipType = "success"; var tipType = null;
var result = BI.find(this.options.items, function (idx, item) {
return v === item.value;
});
if (BI.isNull(result)) {
if (this.isEnabled()) {
tipType = "warning";
}
this.element.addClass("error");
this.trigger.element.addClass("error");
} else {
this.element.removeClass("error"); this.element.removeClass("error");
this.trigger.element.removeClass("error"); this.trigger.element.removeClass("error");
} else {
v = BI.isArray(v) ? v : [v];
var result = BI.find(this.options.items, function (idx, item) {
return BI.contains(v, item.value);
});
if (BI.isNull(result)) {
this.trigger.setTipType("warning");
this.element.addClass("error");
this.trigger.element.addClass("error");
} else {
this.trigger.setTipType("success");
this.element.removeClass("error");
this.trigger.element.removeClass("error");
}
} }
this.trigger.setTipType(tipType);
}, },
setValue: function (v) { setValue: function (v) {

Loading…
Cancel
Save