Browse Source

fix: 想了一下改一改

es6
windy 6 years ago
parent
commit
a3a3498213
  1. 5
      src/case/list/list.select.js
  2. 7
      src/widget/multiselect/multiselect.loader.js

5
src/case/list/list.select.js

@ -52,7 +52,7 @@ BI.SelectList = BI.inherit(BI.Widget, {
callback.apply(self, arguments); callback.apply(self, arguments);
if (op.times === 1) { if (op.times === 1) {
self.toolbar.setVisible(items && items.length > 0); self.toolbar.setVisible(items && items.length > 0);
self.toolbar.setEnable(items && items.length > 0); self.toolbar.setEnable(!o.disabled && items && items.length > 0);
} }
self._checkAllSelected(); self._checkAllSelected();
}); });
@ -159,8 +159,9 @@ BI.SelectList = BI.inherit(BI.Widget, {
}, },
populate: function (items) { populate: function (items) {
var o = this.options;
this.toolbar.setVisible(!BI.isEmptyArray(items)); this.toolbar.setVisible(!BI.isEmptyArray(items));
this.toolbar.setEnable(!BI.isEmptyArray(items)); this.toolbar.setEnable(!o.disabled && !BI.isEmptyArray(items));
this.list.populate.apply(this.list, arguments); this.list.populate.apply(this.list, arguments);
this._checkAllSelected(); this._checkAllSelected();
}, },

7
src/widget/multiselect/multiselect.loader.js

@ -127,6 +127,7 @@ BI.MultiSelectLoader = BI.inherit(BI.Widget, {
cls: "bi-list-item-active", cls: "bi-list-item-active",
height: 24, height: 24,
selected: this.isAllSelected(), selected: this.isAllSelected(),
disabled: this.options.disabled,
iconWrapperWidth: 36 iconWrapperWidth: 36
}); });
}, },
@ -172,12 +173,6 @@ BI.MultiSelectLoader = BI.inherit(BI.Widget, {
} }
}, },
_setEnable: function (enable) {
BI.MultiSelectLoader.superclass._setEnable.apply(this, arguments);
this._assertMasker();
this.masker.setVisible(!enable);
},
setStartValue: function (v) { setStartValue: function (v) {
this._startValue = v; this._startValue = v;
}, },

Loading…
Cancel
Save