From 0a0015731fe7d9c873068ef834f6e9a473414004 Mon Sep 17 00:00:00 2001 From: guy Date: Fri, 10 Sep 2021 23:35:27 +0800 Subject: [PATCH 1/2] =?UTF-8?q?BI-93885=20=E4=B8=8B=E6=8B=89=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E7=9A=84=E6=9C=80=E5=A4=A7=E5=AE=BD=E5=BA=A6=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/combination/combo.js | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/src/base/combination/combo.js b/src/base/combination/combo.js index 1e63ec054..5afa61612 100644 --- a/src/base/combination/combo.js +++ b/src/base/combination/combo.js @@ -81,7 +81,7 @@ element: this }, BI.LogicFactory.createLogic("vertical", BI.extend(o.logic, { items: [ - { el: this.combo } + {el: this.combo} ] })))); o.isDefaultInit && (this._assertPopupView()); @@ -118,7 +118,7 @@ var enterPopup = false; - function hide(e) { + function hide (e) { if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid() && o.toggle === true) { self._hideView(e); self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, "", self.combo); @@ -259,7 +259,7 @@ scrolly: false, element: this.options.container || this, items: [ - { el: this.popupView } + {el: this.popupView} ] }); this._rendered = true; @@ -312,7 +312,7 @@ this._assertPopupViewRender(); this.fireEvent(BI.Combo.EVENT_BEFORE_POPUPVIEW); // popupVisible是为了获取其宽高, 放到可视范围之外以防止在IE下闪一下 - this.popupView.css({ left: -999999999, top: -99999999 }); + this.popupView.css({left: -999999999, top: -99999999}); this.popupView.visible(); BI.each(needHideWhenAnotherComboOpen, function (i, combo) { if (i !== self.getName()) { @@ -340,11 +340,20 @@ this.resetListWidth(""); var width = this.popupView.element.outerWidth(); var maxW = this.element.outerWidth() || o.width; - if (width > maxW + 80) { - maxW = maxW + 80; - } else if (width > maxW) { - maxW = width; + // BI-93885 最大列宽算法调整 + if (maxW < 500) { + if (width > 500) { + maxW = 500; + } else if (width > maxW) { + maxW = width; + } } + + // if (width > maxW + 80) { + // maxW = maxW + 80; + // } else if (width > maxW) { + // maxW = width; + // } this.resetListWidth(maxW < 100 ? 100 : maxW); } }, From ca47357a10a72211cd65e7d3e2aa2aaf5ba35d03 Mon Sep 17 00:00:00 2001 From: guy Date: Fri, 10 Sep 2021 23:38:02 +0800 Subject: [PATCH 2/2] =?UTF-8?q?BI-93885=20=E4=B8=8B=E6=8B=89=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E7=9A=84=E6=9C=80=E5=A4=A7=E5=AE=BD=E5=BA=A6=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/combination/combo.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/base/combination/combo.js b/src/base/combination/combo.js index 5afa61612..c9bbfc773 100644 --- a/src/base/combination/combo.js +++ b/src/base/combination/combo.js @@ -81,7 +81,7 @@ element: this }, BI.LogicFactory.createLogic("vertical", BI.extend(o.logic, { items: [ - {el: this.combo} + { el: this.combo } ] })))); o.isDefaultInit && (this._assertPopupView()); @@ -118,7 +118,7 @@ var enterPopup = false; - function hide (e) { + function hide(e) { if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid() && o.toggle === true) { self._hideView(e); self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, "", self.combo); @@ -259,7 +259,7 @@ scrolly: false, element: this.options.container || this, items: [ - {el: this.popupView} + { el: this.popupView } ] }); this._rendered = true; @@ -312,7 +312,7 @@ this._assertPopupViewRender(); this.fireEvent(BI.Combo.EVENT_BEFORE_POPUPVIEW); // popupVisible是为了获取其宽高, 放到可视范围之外以防止在IE下闪一下 - this.popupView.css({left: -999999999, top: -99999999}); + this.popupView.css({ left: -999999999, top: -99999999 }); this.popupView.visible(); BI.each(needHideWhenAnotherComboOpen, function (i, combo) { if (i !== self.getName()) { @@ -344,7 +344,7 @@ if (maxW < 500) { if (width > 500) { maxW = 500; - } else if (width > maxW) { + } else if(width > maxW) { maxW = width; } }