Browse Source

无JIRA selected也支持响应

es6
zsmj 3 years ago
parent
commit
563bdaa1fb
  1. 4
      src/base/single/button/button.basic.js

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

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

Loading…
Cancel
Save