Browse Source

无JIRA selected也支持响应式

es6
zsmj 3 years ago
parent
commit
7526749c99
  1. 2
      src/base/single/button/button.basic.js

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

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

Loading…
Cancel
Save