Browse Source

Pull request #2311: 无JIRA任务 update

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

* commit 'c465a7f2ca32141d78679f942d6a0278b90820c7':
  update
  update
  update
es6
guy 3 years ago
parent
commit
77d4887437
  1. 14
      src/base/single/button/button.basic.js
  2. 9
      src/base/single/button/button.node.js

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

@ -31,12 +31,6 @@ BI.BasicButton = BI.inherit(BI.Single, {
_init: function () {
BI.BasicButton.superclass._init.apply(this, arguments);
var opts = this.options;
if (opts.selected === true) {
BI.nextTick(BI.bind(function () {
this.setSelected(opts.selected);
}, this));
}
BI.nextTick(BI.bind(this.bindEvent, this));
if (opts.shadow) {
this._createShadow();
@ -46,6 +40,14 @@ BI.BasicButton = BI.inherit(BI.Single, {
}
},
_initRef: function () {
if (this.options.selected === true) {
this.setSelected(true);
}
this.bindEvent();
BI.BasicButton.superclass._initRef.apply(this, arguments);
},
// 默认render方法
render: function () {
return this.options.el;

9
src/base/single/button/button.node.js

@ -15,12 +15,9 @@ BI.NodeButton = BI.inherit(BI.BasicButton, {
});
},
_init: function () {
BI.NodeButton.superclass._init.apply(this, arguments);
var self = this;
BI.nextTick(function () {
self.setOpened(self.isOpened());
});
_initRef: function () {
this.setOpened(this.isOpened());
BI.NodeButton.superclass._initRef.apply(this, arguments);
},
doClick: function () {

Loading…
Cancel
Save