From e69dffc9484f2cae6cbcbdea29de6dcb2de38805 Mon Sep 17 00:00:00 2001 From: zsmj Date: Tue, 13 Dec 2022 10:50:08 +0800 Subject: [PATCH 1/3] =?UTF-8?q?BI-118262=20fix:=20=E6=A0=91=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=E7=BB=84=E4=BB=B6=E6=90=9C=E7=B4=A2=E8=BF=87=E6=BB=A4?= =?UTF-8?q?=E4=B8=8D=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit slow-3g 小霸王等时序问题导致. 这个判断没啥意义 --- src/widget/multiselect/multiselect.combo.js | 3 --- src/widget/multiselect/multiselect.combo.nobar.js | 3 --- src/widget/multiselect/multiselect.insert.combo.js | 3 --- src/widget/multiselect/multiselect.insert.combo.nobar.js | 3 --- src/widget/multiselect/multiselect.insert.trigger.js | 2 +- src/widget/multiselect/multiselect.trigger.js | 3 ++- src/widget/multitree/multi.tree.combo.js | 3 --- src/widget/multitree/multi.tree.insert.combo.js | 3 --- src/widget/multitree/multi.tree.list.combo.js | 3 --- .../searchmultitextvaluecombo/multitextvalue.combo.search.js | 3 --- src/widget/singleselect/singleselect.combo.js | 3 --- src/widget/singleselect/singleselect.insert.combo.js | 3 --- 12 files changed, 3 insertions(+), 32 deletions(-) diff --git a/src/widget/multiselect/multiselect.combo.js b/src/widget/multiselect/multiselect.combo.js index 5651fa04f..3a9570900 100644 --- a/src/widget/multiselect/multiselect.combo.js +++ b/src/widget/multiselect/multiselect.combo.js @@ -180,9 +180,6 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { }); this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { - if (!this.isViewVisible()) { - self._dataChange = false;// 标记数据是否发生变化 - } this.setValue(self.storeValue); BI.nextTick(function () { self._populate(); diff --git a/src/widget/multiselect/multiselect.combo.nobar.js b/src/widget/multiselect/multiselect.combo.nobar.js index ce84a730e..745247e20 100644 --- a/src/widget/multiselect/multiselect.combo.nobar.js +++ b/src/widget/multiselect/multiselect.combo.nobar.js @@ -180,9 +180,6 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, { }); this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { - if (!this.isViewVisible()) { - self._dataChange = false;// 标记数据是否发生变化 - } this.setValue(self.storeValue); BI.nextTick(function () { self._populate(); diff --git a/src/widget/multiselect/multiselect.insert.combo.js b/src/widget/multiselect/multiselect.insert.combo.js index 6540e0dc9..4d3de9118 100644 --- a/src/widget/multiselect/multiselect.insert.combo.js +++ b/src/widget/multiselect/multiselect.insert.combo.js @@ -181,9 +181,6 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, { }); this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { - if (!this.isViewVisible()) { - self._dataChange = false;// 标记数据是否发生变化 - } this.setValue(self.storeValue); BI.nextTick(function () { self._populate(); diff --git a/src/widget/multiselect/multiselect.insert.combo.nobar.js b/src/widget/multiselect/multiselect.insert.combo.nobar.js index c7ff2109d..354e7cd20 100644 --- a/src/widget/multiselect/multiselect.insert.combo.nobar.js +++ b/src/widget/multiselect/multiselect.insert.combo.nobar.js @@ -174,9 +174,6 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, { }); this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { - if (!this.isViewVisible()) { - self._dataChange = false;// 标记数据是否发生变化 - } this.setValue(self.storeValue); BI.nextTick(function () { self._populate(); diff --git a/src/widget/multiselect/multiselect.insert.trigger.js b/src/widget/multiselect/multiselect.insert.trigger.js index b04aebd07..19b4e800c 100644 --- a/src/widget/multiselect/multiselect.insert.trigger.js +++ b/src/widget/multiselect/multiselect.insert.trigger.js @@ -15,7 +15,7 @@ BI.MultiSelectInsertTrigger = BI.inherit(BI.Trigger, { _defaultConfig: function () { return BI.extend(BI.MultiSelectInsertTrigger.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-multi-select-trigger", + baseCls: "bi-multi-select-insert-trigger", itemsCreator: BI.emptyFn, valueFormatter: BI.emptyFn, itemHeight: 24, diff --git a/src/widget/multiselect/multiselect.trigger.js b/src/widget/multiselect/multiselect.trigger.js index 937e83804..0c3eba3dc 100644 --- a/src/widget/multiselect/multiselect.trigger.js +++ b/src/widget/multiselect/multiselect.trigger.js @@ -70,7 +70,8 @@ BI.MultiSelectTrigger = BI.inherit(BI.Trigger, { }); this.wrapNumberCounter = BI.createWidget({ - type: "bi.layout" + type: "bi.layout", + cls:"wrap-number-counter", }); this.wrapper = BI.createWidget({ diff --git a/src/widget/multitree/multi.tree.combo.js b/src/widget/multitree/multi.tree.combo.js index bdf374f07..e6f34bdc8 100644 --- a/src/widget/multitree/multi.tree.combo.js +++ b/src/widget/multitree/multi.tree.combo.js @@ -189,9 +189,6 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, { if (isSearching()) { return; } - if (!this.isViewVisible()) { - self._dataChange = false; // 标记数据是否发生变化 - } if (change === true) { self.storeValue = { value: self.combo.getValue() }; change = false; diff --git a/src/widget/multitree/multi.tree.insert.combo.js b/src/widget/multitree/multi.tree.insert.combo.js index 6db34dc61..af50934d4 100644 --- a/src/widget/multitree/multi.tree.insert.combo.js +++ b/src/widget/multitree/multi.tree.insert.combo.js @@ -202,9 +202,6 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, { if (isSearching()) { return; } - if (!this.isViewVisible()) { - self._dataChange = false; // 标记数据是否发生变化 - } if (change === true) { self.storeValue = { value: self.combo.getValue() }; change = false; diff --git a/src/widget/multitree/multi.tree.list.combo.js b/src/widget/multitree/multi.tree.list.combo.js index a3a016179..dfcd7c1d2 100644 --- a/src/widget/multitree/multi.tree.list.combo.js +++ b/src/widget/multitree/multi.tree.list.combo.js @@ -219,9 +219,6 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, { if (isSearching()) { return; } - if (!this.isViewVisible()) { - self._dataChange = false; // 标记数据是否发生变化 - } if (change === true) { self.storeValue = { value: self.combo.getValue() }; change = false; diff --git a/src/widget/searchmultitextvaluecombo/multitextvalue.combo.search.js b/src/widget/searchmultitextvaluecombo/multitextvalue.combo.search.js index 4fdbf42ee..2f38ca5dc 100644 --- a/src/widget/searchmultitextvaluecombo/multitextvalue.combo.search.js +++ b/src/widget/searchmultitextvaluecombo/multitextvalue.combo.search.js @@ -162,9 +162,6 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, { }); this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { - if (!this.isViewVisible()) { - self._dataChange = false;// 标记数据是否发生变化 - } this.setValue(self.storeValue); BI.nextTick(function () { self._populate(); diff --git a/src/widget/singleselect/singleselect.combo.js b/src/widget/singleselect/singleselect.combo.js index cc4d7c261..ac1fe3548 100644 --- a/src/widget/singleselect/singleselect.combo.js +++ b/src/widget/singleselect/singleselect.combo.js @@ -125,9 +125,6 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, { }); this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { - if (!this.isViewVisible()) { - self._dataChange = false;// 标记数据是否发生变化 - } this.setValue(self.storeValue); BI.nextTick(function () { self.populate(); diff --git a/src/widget/singleselect/singleselect.insert.combo.js b/src/widget/singleselect/singleselect.insert.combo.js index a36bf0bd6..7c259e007 100644 --- a/src/widget/singleselect/singleselect.insert.combo.js +++ b/src/widget/singleselect/singleselect.insert.combo.js @@ -136,9 +136,6 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, { }); this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { - if (!this.isViewVisible()) { - self._dataChange = false;// 标记数据是否发生变化 - } this.setValue(self.storeValue); BI.nextTick(function () { self.populate(); From dc2cf542e7d7180bd9d1bb40be2628d84e9fac8a Mon Sep 17 00:00:00 2001 From: zsmj Date: Tue, 13 Dec 2022 11:47:29 +0800 Subject: [PATCH 2/3] =?UTF-8?q?KERNEL-11877=20fix:=20firefox=20=E4=B8=8Bbo?= =?UTF-8?q?unds=E8=AE=A1=E7=AE=97=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/combination/combo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/base/combination/combo.js b/src/base/combination/combo.js index 879313495..c937f8f84 100644 --- a/src/base/combination/combo.js +++ b/src/base/combination/combo.js @@ -162,7 +162,7 @@ this._assertPopupViewRender(); this.fireEvent(BI.Combo.EVENT_BEFORE_POPUPVIEW); // popupVisible是为了获取其宽高, 放到可视范围之外以防止在IE下闪一下 - this.popupView.css({ left: -999999999, top: -99999999 }); + this.popupView.css({ left: -99999, top: -99999 }); this.popupView.visible(); BI.each(needHideWhenAnotherComboOpen, function (i, combo) { if (i !== self.getName()) { From 7a2e16068e1355086b18a425add7fcd99e217621 Mon Sep 17 00:00:00 2001 From: zsmj Date: Tue, 13 Dec 2022 13:34:01 +0800 Subject: [PATCH 3/3] =?UTF-8?q?Revert=20"BI-118262=20fix:=20=E6=A0=91?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E7=BB=84=E4=BB=B6=E6=90=9C=E7=B4=A2=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=E4=B8=8D=E7=94=9F=E6=95=88"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit e69dffc9484f2cae6cbcbdea29de6dcb2de38805. --- src/widget/multiselect/multiselect.combo.js | 3 +++ src/widget/multiselect/multiselect.combo.nobar.js | 3 +++ src/widget/multiselect/multiselect.insert.combo.js | 3 +++ src/widget/multiselect/multiselect.insert.combo.nobar.js | 3 +++ src/widget/multiselect/multiselect.insert.trigger.js | 2 +- src/widget/multiselect/multiselect.trigger.js | 3 +-- src/widget/multitree/multi.tree.combo.js | 3 +++ src/widget/multitree/multi.tree.insert.combo.js | 3 +++ src/widget/multitree/multi.tree.list.combo.js | 3 +++ .../searchmultitextvaluecombo/multitextvalue.combo.search.js | 3 +++ src/widget/singleselect/singleselect.combo.js | 3 +++ src/widget/singleselect/singleselect.insert.combo.js | 3 +++ 12 files changed, 32 insertions(+), 3 deletions(-) diff --git a/src/widget/multiselect/multiselect.combo.js b/src/widget/multiselect/multiselect.combo.js index 3a9570900..5651fa04f 100644 --- a/src/widget/multiselect/multiselect.combo.js +++ b/src/widget/multiselect/multiselect.combo.js @@ -180,6 +180,9 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { }); this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { + if (!this.isViewVisible()) { + self._dataChange = false;// 标记数据是否发生变化 + } this.setValue(self.storeValue); BI.nextTick(function () { self._populate(); diff --git a/src/widget/multiselect/multiselect.combo.nobar.js b/src/widget/multiselect/multiselect.combo.nobar.js index 745247e20..ce84a730e 100644 --- a/src/widget/multiselect/multiselect.combo.nobar.js +++ b/src/widget/multiselect/multiselect.combo.nobar.js @@ -180,6 +180,9 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, { }); this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { + if (!this.isViewVisible()) { + self._dataChange = false;// 标记数据是否发生变化 + } this.setValue(self.storeValue); BI.nextTick(function () { self._populate(); diff --git a/src/widget/multiselect/multiselect.insert.combo.js b/src/widget/multiselect/multiselect.insert.combo.js index 4d3de9118..6540e0dc9 100644 --- a/src/widget/multiselect/multiselect.insert.combo.js +++ b/src/widget/multiselect/multiselect.insert.combo.js @@ -181,6 +181,9 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, { }); this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { + if (!this.isViewVisible()) { + self._dataChange = false;// 标记数据是否发生变化 + } this.setValue(self.storeValue); BI.nextTick(function () { self._populate(); diff --git a/src/widget/multiselect/multiselect.insert.combo.nobar.js b/src/widget/multiselect/multiselect.insert.combo.nobar.js index 354e7cd20..c7ff2109d 100644 --- a/src/widget/multiselect/multiselect.insert.combo.nobar.js +++ b/src/widget/multiselect/multiselect.insert.combo.nobar.js @@ -174,6 +174,9 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, { }); this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { + if (!this.isViewVisible()) { + self._dataChange = false;// 标记数据是否发生变化 + } this.setValue(self.storeValue); BI.nextTick(function () { self._populate(); diff --git a/src/widget/multiselect/multiselect.insert.trigger.js b/src/widget/multiselect/multiselect.insert.trigger.js index 19b4e800c..b04aebd07 100644 --- a/src/widget/multiselect/multiselect.insert.trigger.js +++ b/src/widget/multiselect/multiselect.insert.trigger.js @@ -15,7 +15,7 @@ BI.MultiSelectInsertTrigger = BI.inherit(BI.Trigger, { _defaultConfig: function () { return BI.extend(BI.MultiSelectInsertTrigger.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-multi-select-insert-trigger", + baseCls: "bi-multi-select-trigger", itemsCreator: BI.emptyFn, valueFormatter: BI.emptyFn, itemHeight: 24, diff --git a/src/widget/multiselect/multiselect.trigger.js b/src/widget/multiselect/multiselect.trigger.js index 0c3eba3dc..937e83804 100644 --- a/src/widget/multiselect/multiselect.trigger.js +++ b/src/widget/multiselect/multiselect.trigger.js @@ -70,8 +70,7 @@ BI.MultiSelectTrigger = BI.inherit(BI.Trigger, { }); this.wrapNumberCounter = BI.createWidget({ - type: "bi.layout", - cls:"wrap-number-counter", + type: "bi.layout" }); this.wrapper = BI.createWidget({ diff --git a/src/widget/multitree/multi.tree.combo.js b/src/widget/multitree/multi.tree.combo.js index e6f34bdc8..bdf374f07 100644 --- a/src/widget/multitree/multi.tree.combo.js +++ b/src/widget/multitree/multi.tree.combo.js @@ -189,6 +189,9 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, { if (isSearching()) { return; } + if (!this.isViewVisible()) { + self._dataChange = false; // 标记数据是否发生变化 + } if (change === true) { self.storeValue = { value: self.combo.getValue() }; change = false; diff --git a/src/widget/multitree/multi.tree.insert.combo.js b/src/widget/multitree/multi.tree.insert.combo.js index af50934d4..6db34dc61 100644 --- a/src/widget/multitree/multi.tree.insert.combo.js +++ b/src/widget/multitree/multi.tree.insert.combo.js @@ -202,6 +202,9 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, { if (isSearching()) { return; } + if (!this.isViewVisible()) { + self._dataChange = false; // 标记数据是否发生变化 + } if (change === true) { self.storeValue = { value: self.combo.getValue() }; change = false; diff --git a/src/widget/multitree/multi.tree.list.combo.js b/src/widget/multitree/multi.tree.list.combo.js index dfcd7c1d2..a3a016179 100644 --- a/src/widget/multitree/multi.tree.list.combo.js +++ b/src/widget/multitree/multi.tree.list.combo.js @@ -219,6 +219,9 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, { if (isSearching()) { return; } + if (!this.isViewVisible()) { + self._dataChange = false; // 标记数据是否发生变化 + } if (change === true) { self.storeValue = { value: self.combo.getValue() }; change = false; diff --git a/src/widget/searchmultitextvaluecombo/multitextvalue.combo.search.js b/src/widget/searchmultitextvaluecombo/multitextvalue.combo.search.js index 2f38ca5dc..4fdbf42ee 100644 --- a/src/widget/searchmultitextvaluecombo/multitextvalue.combo.search.js +++ b/src/widget/searchmultitextvaluecombo/multitextvalue.combo.search.js @@ -162,6 +162,9 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, { }); this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { + if (!this.isViewVisible()) { + self._dataChange = false;// 标记数据是否发生变化 + } this.setValue(self.storeValue); BI.nextTick(function () { self._populate(); diff --git a/src/widget/singleselect/singleselect.combo.js b/src/widget/singleselect/singleselect.combo.js index ac1fe3548..cc4d7c261 100644 --- a/src/widget/singleselect/singleselect.combo.js +++ b/src/widget/singleselect/singleselect.combo.js @@ -125,6 +125,9 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, { }); this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { + if (!this.isViewVisible()) { + self._dataChange = false;// 标记数据是否发生变化 + } this.setValue(self.storeValue); BI.nextTick(function () { self.populate(); diff --git a/src/widget/singleselect/singleselect.insert.combo.js b/src/widget/singleselect/singleselect.insert.combo.js index 7c259e007..a36bf0bd6 100644 --- a/src/widget/singleselect/singleselect.insert.combo.js +++ b/src/widget/singleselect/singleselect.insert.combo.js @@ -136,6 +136,9 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, { }); this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { + if (!this.isViewVisible()) { + self._dataChange = false;// 标记数据是否发生变化 + } this.setValue(self.storeValue); BI.nextTick(function () { self.populate();