Browse Source

icon_button支持gap

es6
guy 3 years ago
parent
commit
0e196899d4
  1. 18
      src/base/single/button/buttons/button.icon.js

18
src/base/single/button/buttons/button.icon.js

@ -8,6 +8,12 @@ BI.IconButton = BI.inherit(BI.BasicButton, {
var conf = BI.IconButton.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
_baseCls: (conf._baseCls || "") + " bi-icon-button horizon-center",
hgap: 0,
vgap: 0,
tgap: 0,
bgap: 0,
lgap: 0,
rgap: 0,
iconWidth: null,
iconHeight: null
});
@ -28,6 +34,12 @@ BI.IconButton = BI.inherit(BI.BasicButton, {
BI.createWidget({
type: "bi.default",
element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
items: [this.icon]
});
} else {
@ -35,6 +47,12 @@ BI.IconButton = BI.inherit(BI.BasicButton, {
BI.createWidget({
element: this,
type: "bi.center_adapt",
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
items: [this.icon]
});
}

Loading…
Cancel
Save