Browse Source

新特性

es6
guy 3 years ago
parent
commit
2d27257f50
  1. 19
      src/case/trigger/trigger.icon.text.js

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

@ -6,15 +6,18 @@
* @extends BI.Trigger
*/
BI.IconTextTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 4
},
_defaultConfig: function () {
var conf = BI.IconTextTrigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-text-trigger",
height: 24,
textHgap: 0,
textVgap: 0,
textLgap: 0,
textRgap: 0,
textTgap: 0,
textBgap: 0,
iconHeight: null,
iconWidth: null,
textCls: ""
@ -23,12 +26,18 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
_init: function () {
BI.IconTextTrigger.superclass._init.apply(this, arguments);
var self = this, o = this.options, c = this._const;
var self = this, o = this.options;
this.text = BI.createWidget({
type: "bi.label",
cls: "select-text-label" + (BI.isKey(o.textCls) ? (" " + o.textCls) : ""),
textAlign: "left",
height: o.height,
hgap: o.textHgap,
vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
tgap: o.textTgap,
bgap: o.textBgap,
text: o.text
});
this.trigerButton = BI.createWidget({
@ -38,7 +47,7 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
BI.createWidget({
element: this,
type: "bi.htape",
type: "bi.horizontal_fill",
ref: function (_ref) {
self.wrapper = _ref;
},

Loading…
Cancel
Save