From aa7af7d885b6bb64045e1f3343cc868cb5eef837 Mon Sep 17 00:00:00 2001 From: guy Date: Mon, 17 Jan 2022 20:02:10 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/combination/combo.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/base/combination/combo.js b/src/base/combination/combo.js index 94c2fab8a..7f70a87de 100644 --- a/src/base/combination/combo.js +++ b/src/base/combination/combo.js @@ -83,7 +83,7 @@ element: this }, BI.LogicFactory.createLogic("vertical", BI.extend(o.logic, { items: [ - { el: this.combo } + {el: this.combo} ] })))); o.isDefaultInit && (this._assertPopupView()); @@ -152,7 +152,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()) { @@ -302,6 +302,14 @@ delete needHideWhenAnotherComboOpen[this.getName()]; } }); + BI.Combo.closeAll = function () { + BI.each(needHideWhenAnotherComboOpen, function (i, combo) { + if (combo) { + combo.hideView(); + } + }); + needHideWhenAnotherComboOpen = {}; + }; BI.Combo.EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE"; BI.Combo.EVENT_CHANGE = "EVENT_CHANGE"; BI.Combo.EVENT_EXPAND = "EVENT_EXPAND";