Browse Source

Pull request #1792: 无JIRA任务 增加basic_button组件

Merge in VISUAL/fineui from ~GUY/fineui:master to master

* commit 'dea170521980618143f1c467c81e36ff89e410ea':
  update
  update
  update
  update
es6
guy 4 years ago
parent
commit
5278d1f259
  1. 12
      src/base/single/button/button.basic.js
  2. 4
      src/case/segment/button.segment.js

12
src/base/single/button/button.basic.js

@ -357,6 +357,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
if (o.shadow && !o.isShadowShowingOnSelected) {
this.$mask && this.$mask.setVisible(false);
}
this.options.setSelected && this.options.setSelected.call(this, b);
},
isSelected: function () {
@ -381,12 +382,18 @@ BI.BasicButton = BI.inherit(BI.Single, {
setText: function (text) {
this.options.text = text;
this.options.setText && this.options.setText.call(this, text);
},
getText: function () {
return this.options.text;
},
setValue: function (value) {
BI.BasicButton.superclass.setValue.apply(this, arguments);
this.options.setValue && this.options.setValue.call(this, value);
},
_setEnable: function (enable) {
BI.BasicButton.superclass._setEnable.apply(this, arguments);
if (enable === true) {
@ -404,10 +411,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
empty: function () {
BI.Widget._renderEngine.createElement(document).unbind("mouseup." + this.getName());
BI.BasicButton.superclass.empty.apply(this, arguments);
},
destroy: function () {
BI.BasicButton.superclass.destroy.apply(this, arguments);
}
});
BI.BasicButton.EVENT_CHANGE = "BasicButton.EVENT_CHANGE";
BI.shortcut("bi.basic_button", BI.BasicButton);

4
src/case/segment/button.segment.js

@ -41,10 +41,6 @@ BI.SegmentButton = BI.inherit(BI.BasicButton, {
setText: function (text) {
BI.SegmentButton.superclass.setText.apply(this, arguments);
this.text.setText(text);
},
destroy: function () {
BI.SegmentButton.superclass.destroy.apply(this, arguments);
}
});
BI.shortcut("bi.segment_button", BI.SegmentButton);
Loading…
Cancel
Save