Browse Source

chore: bugfix

es6
guy 3 years ago
parent
commit
8ca5c26fcd
  1. 14
      src/case/trigger/trigger.icon.text.select.js
  2. 14
      src/case/trigger/trigger.text.select.js
  3. 18
      src/case/trigger/trigger.text.select.small.js
  4. 26
      src/case/trigger/trigger.text.small.js

14
src/case/trigger/trigger.icon.text.select.js

@ -9,6 +9,12 @@ BI.SelectIconTextTrigger = BI.inherit(BI.Trigger, {
height: 24,
iconHeight: null,
iconWidth: null,
textHgap: 0,
textVgap: 0,
textLgap: 0,
textRgap: 0,
textTgap: 0,
textBgap: 0,
iconCls: ""
});
},
@ -23,6 +29,12 @@ BI.SelectIconTextTrigger = BI.inherit(BI.Trigger, {
text: obj.text,
textCls: obj.textCls,
iconCls: obj.iconCls,
textHgap: o.textHgap,
textVgap: o.textVgap,
textLgap: o.textLgap,
textRgap: o.textRgap,
textTgap: o.textTgap,
textBgap: o.textBgap,
height: o.height,
iconHeight: o.iconHeight,
iconWidth: o.iconWidth,
@ -71,4 +83,4 @@ BI.SelectIconTextTrigger = BI.inherit(BI.Trigger, {
this.options.items = items;
}
});
BI.shortcut("bi.select_icon_text_trigger", BI.SelectIconTextTrigger);
BI.shortcut("bi.select_icon_text_trigger", BI.SelectIconTextTrigger);

14
src/case/trigger/trigger.text.select.js

@ -10,7 +10,13 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
_defaultConfig: function () {
return BI.extend(BI.SelectTextTrigger.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-select-text-trigger",
height: 24
height: 24,
textHgap: 6,
textVgap: 0,
textLgap: 0,
textRgap: 0,
textTgap: 0,
textBgap: 0,
});
},
@ -25,6 +31,12 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
readonly: o.readonly,
text: obj.text,
textCls: obj.textCls,
textHgap: o.textHgap,
textVgap: o.textVgap,
textLgap: o.textLgap,
textRgap: o.textRgap,
textTgap: o.textTgap,
textBgap: o.textBgap,
tipType: o.tipType,
warningTitle: o.warningTitle
});

18
src/case/trigger/trigger.text.select.small.js

@ -9,7 +9,13 @@ BI.SmallSelectTextTrigger = BI.inherit(BI.Trigger, {
_defaultConfig: function () {
return BI.extend(BI.SmallSelectTextTrigger.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-small-select-text-trigger bi-border",
height: 20
height: 20,
textHgap: 6,
textVgap: 0,
textLgap: 0,
textRgap: 0,
textTgap: 0,
textBgap: 0,
});
},
@ -23,7 +29,13 @@ BI.SmallSelectTextTrigger = BI.inherit(BI.Trigger, {
element: this,
height: o.height,
text: obj.text,
cls: obj.cls
cls: obj.cls,
textHgap: o.textHgap,
textVgap: o.textVgap,
textLgap: o.textLgap,
textRgap: o.textRgap,
textTgap: o.textTgap,
textBgap: o.textBgap,
});
},
@ -61,4 +73,4 @@ BI.SmallSelectTextTrigger = BI.inherit(BI.Trigger, {
this.options.items = items;
}
});
BI.shortcut("bi.small_select_text_trigger", BI.SmallSelectTextTrigger);
BI.shortcut("bi.small_select_text_trigger", BI.SmallSelectTextTrigger);

26
src/case/trigger/trigger.text.small.js

@ -5,15 +5,17 @@
* @extends BI.Trigger
*/
BI.SmallTextTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 6
},
_defaultConfig: function () {
var conf = BI.SmallTextTrigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-text-trigger",
height: 20
height: 20,
textHgap: 6,
textVgap: 0,
textLgap: 0,
textRgap: 0,
textTgap: 0,
textBgap: 0,
});
},
@ -25,7 +27,12 @@ BI.SmallTextTrigger = BI.inherit(BI.Trigger, {
textAlign: "left",
height: o.height,
text: o.text,
hgap: c.hgap
hgap: o.textHgap,
vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
tgap: o.textTgap,
bgap: o.textBgap,
});
this.trigerButton = BI.createWidget({
type: "bi.trigger_icon_button",
@ -34,10 +41,11 @@ BI.SmallTextTrigger = BI.inherit(BI.Trigger, {
BI.createWidget({
element: this,
type: "bi.htape",
type: "bi.horizontal_fill",
items: [
{
el: this.text
el: this.text,
width: "fill"
}, {
el: this.trigerButton,
width: o.triggerWidth || o.height
@ -54,4 +62,4 @@ BI.SmallTextTrigger = BI.inherit(BI.Trigger, {
this.text.setText(text);
}
});
BI.shortcut("bi.small_text_trigger", BI.SmallTextTrigger);
BI.shortcut("bi.small_text_trigger", BI.SmallTextTrigger);

Loading…
Cancel
Save