From 581239ff8ccf90e47166ca59e01d09eb286e38c8 Mon Sep 17 00:00:00 2001 From: guy Date: Mon, 14 Mar 2022 22:10:01 +0800 Subject: [PATCH] chore: bugfix --- src/case/trigger/trigger.icon.text.js | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/case/trigger/trigger.icon.text.js b/src/case/trigger/trigger.icon.text.js index b820ebc71..65652b8e4 100644 --- a/src/case/trigger/trigger.icon.text.js +++ b/src/case/trigger/trigger.icon.text.js @@ -65,13 +65,14 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, { }, width: BI.isEmptyString(o.iconCls) ? 0 : (o.iconWrapperWidth || o.height) }, - { - el: this.text, - lgap: BI.isEmptyString(o.iconCls) ? 5 : 0 - }, { - el: this.trigerButton, - width: o.triggerWidth || o.height - } + { + el: this.text, + lgap: BI.isEmptyString(o.iconCls) ? 5 : 0, + width: "fill" + }, { + el: this.trigerButton, + width: o.triggerWidth || o.height + } ] }); }, @@ -86,13 +87,13 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, { var iconItem = this.wrapper.attr("items")[0]; var textItem = this.wrapper.attr("items")[1]; if (BI.isNull(iconCls) || BI.isEmptyString(iconCls)) { - if(iconItem.width !== 0) { + if (iconItem.width !== 0) { iconItem.width = 0; textItem.lgap = 5; this.wrapper.resize(); } } else { - if(iconItem.width !== (o.iconWrapperWidth || o.height)) { + if (iconItem.width !== (o.iconWrapperWidth || o.height)) { iconItem.width = (o.iconWrapperWidth || o.height); textItem.lgap = 0; this.wrapper.resize(); @@ -100,7 +101,7 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, { } }, - setTextCls: function(cls) { + setTextCls: function (cls) { var o = this.options; var oldCls = o.textCls; o.textCls = cls; @@ -111,4 +112,4 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, { this.text.setText(text); } }); -BI.shortcut("bi.icon_text_trigger", BI.IconTextTrigger); \ No newline at end of file +BI.shortcut("bi.icon_text_trigger", BI.IconTextTrigger);