Browse Source

Pull request #2558: 无JIRA selected也支持响应

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

* commit '7526749c99469fe5c4c142b8a639a422200cb6bc':
  无JIRA selected也支持响应式
  无JIRA selected也支持响应
es6
Dailer 3 years ago
parent
commit
88b6395abe
  1. 6
      src/base/single/button/button.basic.js

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

@ -29,8 +29,12 @@ BI.BasicButton = BI.inherit(BI.Single, {
}, },
_init: function () { _init: function () {
BI.BasicButton.superclass._init.apply(this, arguments); var self = this;
var opts = this.options; var opts = this.options;
opts.selected = BI.isFunction(opts.selected) ? this.__watch(opts.selected, function (context, newValue) {
self.setSelected(newValue);
}) : opts.selected;
BI.BasicButton.superclass._init.apply(this, arguments);
if (opts.shadow) { if (opts.shadow) {
this._createShadow(); this._createShadow();

Loading…
Cancel
Save