Browse Source

chore: bugfix

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

23
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);
BI.shortcut("bi.icon_text_trigger", BI.IconTextTrigger);

Loading…
Cancel
Save