Browse Source

Pull request #1353: BI-66444 fix: setValue为空和空数组行为一致

Merge in VISUAL/fineui from ~WINDY/fui:master to master

* commit 'c858274279489788b320f44e2025e9ae74866bf1':
  update
  BI-66444 fix: setValue为空和空数组行为一致
es6
windy 4 years ago
parent
commit
c2c1971e78
  1. 1
      changelog.md
  2. 5
      src/case/combo/icontextvaluecombo/combo.icontextvalue.js
  3. 5
      src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js
  4. 5
      src/case/combo/textvaluecombo/combo.textvalue.js

1
changelog.md

@ -1,5 +1,6 @@
# 更新日志
2.0(2020-06)
- 修复了单选标红combo类setValue为空和空数组行为不一致的问题
- 单选列表支持新增选项
- 增加组件shortcut未定义的错误提示

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