Browse Source

chore: bugfix

es6
guy 3 years ago
parent
commit
581239ff8c
  1. 9
      src/case/trigger/trigger.icon.text.js

9
src/case/trigger/trigger.icon.text.js

@ -67,7 +67,8 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
},
{
el: this.text,
lgap: BI.isEmptyString(o.iconCls) ? 5 : 0
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;

Loading…
Cancel
Save