From 99e6e964b14655a59785fcf147b9be9202ce9430 Mon Sep 17 00:00:00 2001 From: guy Date: Thu, 16 Jul 2020 09:45:27 +0800 Subject: [PATCH] =?UTF-8?q?combo=E7=9A=84hidewhenanothercomboopen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/combination/combo.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/base/combination/combo.js b/src/base/combination/combo.js index 4c7ac88300..c4c7da2763 100644 --- a/src/base/combination/combo.js +++ b/src/base/combination/combo.js @@ -275,13 +275,14 @@ this.adjustWidth(); this.adjustHeight(); } - return; + return false; } var isHide = this.options.hideChecker.apply(this, [e]); if (isHide === false) { - return; + return false; } this._hideView(); + return true; }, _hideView: function () { @@ -308,10 +309,11 @@ this.popupView.visible(); BI.each(needHideWhenAnotherComboOpen, function (i, combo) { if (i !== self.getName()) { - combo && combo.hideView(); + if (combo && combo._hideIf(e)) { + delete needHideWhenAnotherComboOpen[i]; + } } }); - needHideWhenAnotherComboOpen = {}; this.options.hideWhenAnotherComboOpen && (needHideWhenAnotherComboOpen[this.getName()] = this); this.adjustWidth(e); this.adjustHeight(e);