From 42b499e14ebf19666dcb533c9b3c11483c21f212 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Thu, 11 Jun 2020 14:18:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20=E6=A0=87?= =?UTF-8?q?=E7=BA=A2=E7=B1=BB=E5=8D=95=E9=80=89=E6=A1=86setValue=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA=E5=AD=97=E7=AC=A6=E4=B8=B2=E4=BC=9A=E6=A0=87=E7=BA=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- changelog.md | 1 + src/case/combo/icontextvaluecombo/combo.icontextvalue.js | 2 +- src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js | 2 +- src/case/combo/textvaluecombo/combo.textvalue.js | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/changelog.md b/changelog.md index 48fe32596..b761e02fd 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,6 @@ # 更新日志 2.0(2020-06) +- 修复了单选标红combo类setValue为空字符串会标红的问题 - BI.history提供与注册路由对应的卸载路由方法unRoute - 修复了单选标红combo类setValue为空和空数组行为不一致的问题 - 单选列表支持新增选项 diff --git a/src/case/combo/icontextvaluecombo/combo.icontextvalue.js b/src/case/combo/icontextvaluecombo/combo.icontextvalue.js index ba3fead5b..ff29bfc44 100644 --- a/src/case/combo/icontextvaluecombo/combo.icontextvalue.js +++ b/src/case/combo/icontextvaluecombo/combo.icontextvalue.js @@ -67,7 +67,7 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, { }, _checkError: function (v) { - if(BI.isNull(v) || BI.isEmptyArray(v)) { + if(BI.isNull(v) || BI.isEmptyArray(v) || BI.isEmptyString(v)) { this.trigger.options.tipType = "success"; this.element.removeClass("combo-error"); } else { diff --git a/src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js b/src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js index ba6376b03..2875425df 100644 --- a/src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js +++ b/src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js @@ -124,7 +124,7 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, { }, _checkError: function (v) { - if(BI.isNull(v) || BI.isEmptyArray(v)) { + if(BI.isNull(v) || BI.isEmptyArray(v) || BI.isEmptyString(v)) { this.trigger.options.tipType = "success"; this.element.removeClass("combo-error"); } else { diff --git a/src/case/combo/textvaluecombo/combo.textvalue.js b/src/case/combo/textvaluecombo/combo.textvalue.js index 982b263ea..796ad0196 100644 --- a/src/case/combo/textvaluecombo/combo.textvalue.js +++ b/src/case/combo/textvaluecombo/combo.textvalue.js @@ -62,7 +62,7 @@ BI.TextValueCombo = BI.inherit(BI.Widget, { }, _checkError: function (v) { - if(BI.isNull(v) || BI.isEmptyArray(v)) { + if(BI.isNull(v) || BI.isEmptyArray(v) || BI.isEmptyString(v)) { this.trigger.options.tipType = "success"; this.element.removeClass("combo-error"); } else {