From e4e26c3537f5752b5c54136c7c5d2083bb5c4772 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Mon, 8 Jun 2020 15:57:11 +0800 Subject: [PATCH] =?UTF-8?q?BI-66444=20fix:=20setValue=E4=B8=BA=E7=A9=BA?= =?UTF-8?q?=E5=92=8C=E7=A9=BA=E6=95=B0=E7=BB=84=E8=A1=8C=E4=B8=BA=E4=B8=80?= =?UTF-8?q?=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/case/combo/icontextvaluecombo/combo.icontextvalue.js | 5 ++++- src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js | 5 ++++- src/case/combo/textvaluecombo/combo.textvalue.js | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/case/combo/icontextvaluecombo/combo.icontextvalue.js b/src/case/combo/icontextvaluecombo/combo.icontextvalue.js index b69ad7307..ba3fead5b 100644 --- a/src/case/combo/icontextvaluecombo/combo.icontextvalue.js +++ b/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); diff --git a/src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js b/src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js index 5ce41c6af..ba6376b03 100644 --- a/src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js +++ b/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); diff --git a/src/case/combo/textvaluecombo/combo.textvalue.js b/src/case/combo/textvaluecombo/combo.textvalue.js index 4dc9b330a..982b263ea 100644 --- a/src/case/combo/textvaluecombo/combo.textvalue.js +++ b/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);