From 4c7abdc0a45bd514d174d0a2d772ab34ac9322eb Mon Sep 17 00:00:00 2001 From: guy Date: Fri, 9 Sep 2022 17:43:55 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/case/combo/textvaluecombo/combo.textvalue.js | 2 +- src/case/trigger/trigger.text.select.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/case/combo/textvaluecombo/combo.textvalue.js b/src/case/combo/textvaluecombo/combo.textvalue.js index 022739fb3..7637773f2 100644 --- a/src/case/combo/textvaluecombo/combo.textvalue.js +++ b/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); } }, diff --git a/src/case/trigger/trigger.text.select.js b/src/case/trigger/trigger.text.select.js index c6c1b3923..dd7849115 100644 --- a/src/case/trigger/trigger.text.select.js +++ b/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(","),