Browse Source

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

* commit 'c91476a59dfa8f4897caa05d0ba0d5c3d801733a':
  chore: 优化代码
master
superman 2 years ago
parent
commit
f4c87bb9b4
  1. 2
      src/case/combo/textvaluecombo/combo.textvalue.js
  2. 3
      src/case/trigger/trigger.text.select.js

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

@ -133,7 +133,7 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
mounted: function () {
const o = this.options;
if (BI.isKey(o.value)) {
if (BI.isKey(o.value) || BI.isObject(o.value)) {
this._checkError(o.value);
}
},

3
src/case/trigger/trigger.text.select.js

@ -67,10 +67,11 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
BI.each(formatItems, function (i, item) {
if (BI.contains(val, item.value) && !BI.contains(result, item.text || item.value)) {
result.push(item.text || item.value);
BI.remove(val, item.value);
}
});
if (result.length > 0) {
if (result.length > 0 && val.length === 0) {
return {
textCls: "",
text: result.join(","),

Loading…
Cancel
Save