From f5c91cd6e80cecab4e07653575ffb4a1711da5d7 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Wed, 31 Jul 2019 15:44:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E5=80=BC=E5=8C=BA=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../trigger.searchtextvalue.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/case/combo/searchtextvaluecombo/trigger.searchtextvalue.js b/src/case/combo/searchtextvaluecombo/trigger.searchtextvalue.js index c1a6092d6..b88d5b84f 100644 --- a/src/case/combo/searchtextvaluecombo/trigger.searchtextvalue.js +++ b/src/case/combo/searchtextvaluecombo/trigger.searchtextvalue.js @@ -25,10 +25,16 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { ref: function () { self.editor = this; }, - text: this._digest(o.value, o.items), + text: this._getText(), value: o.value, height: o.height, - tipText: "" + tipText: "", + listeners: [{ + eventName: BI.Events.MOUNT, + action: function () { + self.editor.setState(self._digest(o.value, o.items)); + } + }] }, popup: { type: "bi.search_text_value_combo_popup", @@ -63,6 +69,11 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { this.editor.setState(v); }, + _getText: function () { + var o = this.options; + return (BI.isKey(o.value) && o.text === this._digest(o.value, o.items)) ? "" : o.text; + }, + _digest: function(vals, items){ var o = this.options; vals = BI.isArray(vals) ? vals : [vals];