Browse Source

Pull request #3018: 无JIRA fix:按钮 textAlign 失效

Merge in VISUAL/fineui from ~TREECAT/fineui:button to master

* commit 'ca4346814e26283c3180fe63f0dcc4a7c7b6ddfc':
  无JIRA fix:按钮 textAlign 失效
es6
treecat 2 years ago
parent
commit
f2fd5dba55
  1. 5
      demo/js/base/button/demo.button.js
  2. 3
      src/base/single/button/buttons/button.js

5
demo/js/base/button/demo.button.js

@ -376,6 +376,11 @@ Demo.Button = BI.inherit(BI.Widget, {
this.loaded(); this.loaded();
}, 5 * 1000); }, 5 * 1000);
}, },
}, {
type: "bi.button",
text: "文字偏左的按钮",
textAlign: "left",
width: 200,
}]; }];
return { return {

3
src/base/single/button/buttons/button.js

@ -141,6 +141,7 @@
// bi.center_adapt 作用:让 hgap 不影响 iconGap。 // bi.center_adapt 作用:让 hgap 不影响 iconGap。
BI.createWidget({ BI.createWidget({
type: "bi.center_adapt", type: "bi.center_adapt",
horizontalAlign: o.textAlign,
element: this, element: this,
hgap: o.hgap, hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
@ -161,7 +162,7 @@
}); });
if (o.minWidth > 0) { if (o.minWidth > 0) {
this.element.css({"min-width": o.minWidth / BI.pixRatio + BI.pixUnit}); this.element.css({ "min-width": o.minWidth / BI.pixRatio + BI.pixUnit });
} }
}, },

Loading…
Cancel
Save