From a3a34982138eb6d8616cdbf9316dd30fc3ffdab0 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Mon, 8 Jul 2019 19:47:17 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=83=B3=E4=BA=86=E4=B8=80=E4=B8=8B?= =?UTF-8?q?=E6=94=B9=E4=B8=80=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/case/list/list.select.js | 7 ++++--- src/widget/multiselect/multiselect.loader.js | 7 +------ 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/case/list/list.select.js b/src/case/list/list.select.js index 861e111de..9d5f47dde 100644 --- a/src/case/list/list.select.js +++ b/src/case/list/list.select.js @@ -52,7 +52,7 @@ BI.SelectList = BI.inherit(BI.Widget, { callback.apply(self, arguments); if (op.times === 1) { 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(); }); @@ -151,7 +151,7 @@ BI.SelectList = BI.inherit(BI.Widget, { value: this.list.getNotSelectedValue(), assist: this.list.getValue() }; - + }, empty: function () { @@ -159,8 +159,9 @@ BI.SelectList = BI.inherit(BI.Widget, { }, populate: function (items) { + var o = this.options; 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._checkAllSelected(); }, diff --git a/src/widget/multiselect/multiselect.loader.js b/src/widget/multiselect/multiselect.loader.js index 4f9e0fd97..456562995 100644 --- a/src/widget/multiselect/multiselect.loader.js +++ b/src/widget/multiselect/multiselect.loader.js @@ -127,6 +127,7 @@ BI.MultiSelectLoader = BI.inherit(BI.Widget, { cls: "bi-list-item-active", height: 24, selected: this.isAllSelected(), + disabled: this.options.disabled, 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) { this._startValue = v; },