diff --git a/src/widget/multiselect/multiselect.combo.js b/src/widget/multiselect/multiselect.combo.js index 2dcf689381..cfad24bf4e 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 34bfaf8f17..5df92c1640 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 3cb8762351..1d4bd81690 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 5e31b801fb..6fc46c8b06 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 feed4b25de..33be0de04c 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 898b8fec43..f66ddc721b 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 d22a01beef..436fbe575b 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 ba56901997..be75e27ae1 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();