From b23670a54b8446d025fca42f311e6b9a5c1c96ba Mon Sep 17 00:00:00 2001 From: iapyang Date: Mon, 16 Nov 2020 15:57:50 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-43504=20fix:=20=E5=A4=9A=E9=80=89?= =?UTF-8?q?=E6=A0=91=E6=9F=A5=E7=9C=8B=E5=B7=B2=E9=80=89=EF=BC=8C=E5=85=B3?= =?UTF-8?q?=E9=97=ADpopup=E6=97=B6=E9=9C=80=E8=A6=81=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E5=A4=A7=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/widget/multiselect/multiselect.combo.js | 6 ++++++ src/widget/multiselect/multiselect.combo.nobar.js | 6 ++++++ src/widget/multiselect/multiselect.insert.combo.js | 6 ++++++ src/widget/multiselect/multiselect.insert.combo.nobar.js | 6 ++++++ src/widget/multiselect/trigger/switcher.checkselected.js | 4 ++++ src/widget/multitree/multi.tree.combo.js | 6 ++++++ src/widget/multitree/multi.tree.insert.combo.js | 6 ++++++ src/widget/multitree/multi.tree.list.combo.js | 6 ++++++ 8 files changed, 46 insertions(+) diff --git a/src/widget/multiselect/multiselect.combo.js b/src/widget/multiselect/multiselect.combo.js index 2dcf68938..cfad24bf4 100644 --- a/src/widget/multiselect/multiselect.combo.js +++ b/src/widget/multiselect/multiselect.combo.js @@ -251,6 +251,12 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { }); }); + this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_AFTER_HIDEVIEW, function () { + BI.nextTick(function () {// 收起时自动调整宽度 + self.trigger.refreshPlaceHolderWidth(0); + }); + }); + this.trigger.element.click(function (e) { if (self.trigger.element.find(e.target).length > 0) { self.numberCounter.hideView(); diff --git a/src/widget/multiselect/multiselect.combo.nobar.js b/src/widget/multiselect/multiselect.combo.nobar.js index 34bfaf8f1..5df92c164 100644 --- a/src/widget/multiselect/multiselect.combo.nobar.js +++ b/src/widget/multiselect/multiselect.combo.nobar.js @@ -248,6 +248,12 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, { }); }); + this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_AFTER_HIDEVIEW, function () { + BI.nextTick(function () {// 收起时自动调整宽度 + self.trigger.refreshPlaceHolderWidth(0); + }); + }); + this.trigger.element.click(function (e) { if (self.trigger.element.find(e.target).length > 0) { self.numberCounter.hideView(); diff --git a/src/widget/multiselect/multiselect.insert.combo.js b/src/widget/multiselect/multiselect.insert.combo.js index 3cb876235..1d4bd8169 100644 --- a/src/widget/multiselect/multiselect.insert.combo.js +++ b/src/widget/multiselect/multiselect.insert.combo.js @@ -248,6 +248,12 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, { }); }); + this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_AFTER_HIDEVIEW, function () { + BI.nextTick(function () {// 收起时自动调整宽度 + self.trigger.refreshPlaceHolderWidth(0); + }); + }); + this.trigger.element.click(function (e) { if (self.trigger.element.find(e.target).length > 0) { self.numberCounter.hideView(); diff --git a/src/widget/multiselect/multiselect.insert.combo.nobar.js b/src/widget/multiselect/multiselect.insert.combo.nobar.js index 5e31b801f..6fc46c8b0 100644 --- a/src/widget/multiselect/multiselect.insert.combo.nobar.js +++ b/src/widget/multiselect/multiselect.insert.combo.nobar.js @@ -245,6 +245,12 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, { }); }); + this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_AFTER_HIDEVIEW, function () { + BI.nextTick(function () {// 收起时自动调整宽度 + self.trigger.refreshPlaceHolderWidth(0); + }); + }); + this.trigger.element.click(function (e) { if (self.trigger.element.find(e.target).length > 0) { self.numberCounter.hideView(); diff --git a/src/widget/multiselect/trigger/switcher.checkselected.js b/src/widget/multiselect/trigger/switcher.checkselected.js index feed4b25d..33be0de04 100644 --- a/src/widget/multiselect/trigger/switcher.checkselected.js +++ b/src/widget/multiselect/trigger/switcher.checkselected.js @@ -56,6 +56,9 @@ BI.MultiSelectCheckSelectedSwitcher = BI.inherit(BI.Widget, { this.switcher.on(BI.Switcher.EVENT_BEFORE_POPUPVIEW, function () { self.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW); }); + this.switcher.on(BI.Switcher.EVENT_AFTER_HIDEVIEW, function () { + self.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_AFTER_HIDEVIEW); + }); this.switcher.on(BI.Switcher.EVENT_AFTER_POPUPVIEW, function () { var me = this; BI.nextTick(function () { @@ -105,4 +108,5 @@ BI.MultiSelectCheckSelectedSwitcher = BI.inherit(BI.Widget, { BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE"; BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; +BI.MultiSelectCheckSelectedSwitcher.EVENT_AFTER_HIDEVIEW = "EVENT_AFTER_HIDEVIEW"; BI.shortcut("bi.multi_select_check_selected_switcher", BI.MultiSelectCheckSelectedSwitcher); \ No newline at end of file diff --git a/src/widget/multitree/multi.tree.combo.js b/src/widget/multitree/multi.tree.combo.js index 898b8fec4..f66ddc721 100644 --- a/src/widget/multitree/multi.tree.combo.js +++ b/src/widget/multitree/multi.tree.combo.js @@ -269,6 +269,12 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, { }); }); + this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_AFTER_HIDEVIEW, function () { + BI.nextTick(function () {// 收起时自动调整宽度 + self.trigger.refreshPlaceHolderWidth(0); + }); + }); + this.trigger.element.click(function (e) { if (self.trigger.element.find(e.target).length > 0) { self.numberCounter.hideView(); diff --git a/src/widget/multitree/multi.tree.insert.combo.js b/src/widget/multitree/multi.tree.insert.combo.js index d22a01bee..436fbe575 100644 --- a/src/widget/multitree/multi.tree.insert.combo.js +++ b/src/widget/multitree/multi.tree.insert.combo.js @@ -273,6 +273,12 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, { } }); + this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_AFTER_HIDEVIEW, function () { + BI.nextTick(function () {// 收起时自动调整宽度 + self.trigger.refreshPlaceHolderWidth(0); + }); + }); + this.numberCounter.on(BI.Events.VIEW, function (b) { BI.nextTick(function () {// 自动调整宽度 self.trigger.refreshPlaceHolderWidth((b === true ? self.numberCounter.element.outerWidth() + 8 : 0)); diff --git a/src/widget/multitree/multi.tree.list.combo.js b/src/widget/multitree/multi.tree.list.combo.js index ba5690199..be75e27ae 100644 --- a/src/widget/multitree/multi.tree.list.combo.js +++ b/src/widget/multitree/multi.tree.list.combo.js @@ -303,6 +303,12 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, { }); }); + this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_AFTER_HIDEVIEW, function () { + BI.nextTick(function () {// 收起时自动调整宽度 + self.trigger.refreshPlaceHolderWidth(0); + }); + }); + this.trigger.element.click(function (e) { if (self.trigger.element.find(e.target).length > 0) { self.numberCounter.hideView();