diff --git a/changelog.md b/changelog.md index 48fe325965..b761e02fd5 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 ba3fead5b0..ff29bfc445 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 ba6376b039..2875425dfb 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 982b263ea3..796ad0196c 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 {