From d30ce3c4ce7d55f0adbe60d48de66286b5f48f07 Mon Sep 17 00:00:00 2001 From: zsmj Date: Wed, 31 Aug 2022 13:58:49 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=97=A0JIRA=20feat:=20=E7=BB=99=E4=B8=8B?= =?UTF-8?q?=E6=8B=89=E6=A1=86=E4=B8=80=E4=B8=AA=E5=AE=8C=E5=85=A8=E8=87=AA?= =?UTF-8?q?=E7=94=B1=E6=8E=A7=E5=88=B6=E7=9A=84tooltip=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../combo/textvaluecombo/combo.textvalue.js | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/src/case/combo/textvaluecombo/combo.textvalue.js b/src/case/combo/textvaluecombo/combo.textvalue.js index dc39d1b1e..b9aaac2ba 100644 --- a/src/case/combo/textvaluecombo/combo.textvalue.js +++ b/src/case/combo/textvaluecombo/combo.textvalue.js @@ -14,7 +14,8 @@ BI.TextValueCombo = BI.inherit(BI.Widget, { value: "", defaultText: "", allowClear: false, - status: "success", // success | warning | error + status: "success", // success | warning | error, + title: null, }); }, @@ -35,6 +36,21 @@ BI.TextValueCombo = BI.inherit(BI.Widget, { const o = this.options; + const title = () => { + if (BI.isFunction(o.title)) { + return o.title(); + } + if (this.options.status === "error") { + return { + level: "warning", + text: o.warningTitle, + }; + } + return { + level: "success", + }; + }; + const trigger = { type: "bi.select_text_trigger", ref: ref => this.trigger = ref, @@ -43,17 +59,7 @@ BI.TextValueCombo = BI.inherit(BI.Widget, { height: o.height, text: o.text, value: o.value, - title: () => { - if (this.options.status === "error") { - return { - level: "warning", - text: o.warningTitle, - }; - } - return { - level: "success", - }; - }, + title, allowClear: o.allowClear, defaultText: o.defaultText, listeners: [ From f8dbd3ce7e005b7b867b5122fe16152373752f1e Mon Sep 17 00:00:00 2001 From: data Date: Wed, 31 Aug 2022 17:10:53 +0800 Subject: [PATCH 2/2] auto upgrade version to 2.0.20220831171040 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 55f3b59f3..dbb5f3031 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20220831110508", + "version": "2.0.20220831171040", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts",