Browse Source

BI-93885 下拉列表的最大宽度优化

es6
guy 3 years ago
parent
commit
ca47357a10
  1. 10
      src/base/combination/combo.js

10
src/base/combination/combo.js

@ -81,7 +81,7 @@
element: this element: this
}, BI.LogicFactory.createLogic("vertical", BI.extend(o.logic, { }, BI.LogicFactory.createLogic("vertical", BI.extend(o.logic, {
items: [ items: [
{el: this.combo} { el: this.combo }
] ]
})))); }))));
o.isDefaultInit && (this._assertPopupView()); o.isDefaultInit && (this._assertPopupView());
@ -118,7 +118,7 @@
var enterPopup = false; var enterPopup = false;
function hide (e) { function hide(e) {
if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid() && o.toggle === true) { if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid() && o.toggle === true) {
self._hideView(e); self._hideView(e);
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, "", self.combo); self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, "", self.combo);
@ -259,7 +259,7 @@
scrolly: false, scrolly: false,
element: this.options.container || this, element: this.options.container || this,
items: [ items: [
{el: this.popupView} { el: this.popupView }
] ]
}); });
this._rendered = true; this._rendered = true;
@ -312,7 +312,7 @@
this._assertPopupViewRender(); this._assertPopupViewRender();
this.fireEvent(BI.Combo.EVENT_BEFORE_POPUPVIEW); this.fireEvent(BI.Combo.EVENT_BEFORE_POPUPVIEW);
// popupVisible是为了获取其宽高, 放到可视范围之外以防止在IE下闪一下 // popupVisible是为了获取其宽高, 放到可视范围之外以防止在IE下闪一下
this.popupView.css({left: -999999999, top: -99999999}); this.popupView.css({ left: -999999999, top: -99999999 });
this.popupView.visible(); this.popupView.visible();
BI.each(needHideWhenAnotherComboOpen, function (i, combo) { BI.each(needHideWhenAnotherComboOpen, function (i, combo) {
if (i !== self.getName()) { if (i !== self.getName()) {
@ -344,7 +344,7 @@
if (maxW < 500) { if (maxW < 500) {
if (width > 500) { if (width > 500) {
maxW = 500; maxW = 500;
} else if (width > maxW) { } else if(width > maxW) {
maxW = width; maxW = width;
} }
} }

Loading…
Cancel
Save