From 22156f2c780b93d9f6bda54bff073df287e877e9 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Wed, 29 Apr 2020 16:41:51 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-30722=20=E4=B8=8B=E6=8B=89=E6=A0=91?= =?UTF-8?q?=E6=8F=90=E4=BE=9Bbefore=5Fpopup=5Fview=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- changelog.md | 1 + .../treevaluechooser/combo.listtreevaluechooser.js | 6 ++++++ .../treevaluechooser/combo.treevaluechooser.insert.js | 6 ++++++ src/component/treevaluechooser/combo.treevaluechooser.js | 6 ++++++ .../multilayerselecttree/multilayerselecttree.combo.js | 9 ++++++++- .../multilayersingletree/multilayersingletree.combo.js | 9 ++++++++- 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 ++- 9 files changed, 41 insertions(+), 5 deletions(-) diff --git a/changelog.md b/changelog.md index eff83fc03..ca684ef0e 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,6 @@ # 更新日志 2.0(2020-04) +- 下拉树系列添加下拉popup弹出前事件 - 修复了复选下拉勾选值和搜索结果中含有父子串关系时提示不正确的问题 - searcher提供可配是否支持搜索空格的allSearchBlank - 修复了复选下拉全选状态下使用空格添加值trigger显示更新不对的问题 diff --git a/src/component/treevaluechooser/combo.listtreevaluechooser.js b/src/component/treevaluechooser/combo.listtreevaluechooser.js index af58a9394..076849dcb 100644 --- a/src/component/treevaluechooser/combo.listtreevaluechooser.js +++ b/src/component/treevaluechooser/combo.listtreevaluechooser.js @@ -65,6 +65,11 @@ BI.ListTreeValueChooserInsertCombo = BI.inherit(BI.AbstractListTreeValueChooser, action: function () { self.fireEvent(BI.ListTreeValueChooserInsertCombo.EVENT_CONFIRM); } + }, { + eventName: BI.MultiTreeCombo.EVENT_BEFORE_POPUPVIEW, + action: function () { + self.fireEvent(BI.TreeValueChooserInsertCombo.EVENT_BEFORE_POPUPVIEW); + } }] }); }, @@ -89,4 +94,5 @@ BI.ListTreeValueChooserInsertCombo.EVENT_STOP = "EVENT_STOP"; BI.ListTreeValueChooserInsertCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM"; BI.ListTreeValueChooserInsertCombo.EVENT_SEARCHING = "EVENT_SEARCHING"; BI.ListTreeValueChooserInsertCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.ListTreeValueChooserInsertCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; BI.shortcut("bi.list_tree_value_chooser_insert_combo", BI.ListTreeValueChooserInsertCombo); \ No newline at end of file diff --git a/src/component/treevaluechooser/combo.treevaluechooser.insert.js b/src/component/treevaluechooser/combo.treevaluechooser.insert.js index 8a95f2e36..f89032c92 100644 --- a/src/component/treevaluechooser/combo.treevaluechooser.insert.js +++ b/src/component/treevaluechooser/combo.treevaluechooser.insert.js @@ -64,6 +64,11 @@ BI.TreeValueChooserInsertCombo = BI.inherit(BI.AbstractTreeValueChooser, { action: function () { self.fireEvent(BI.TreeValueChooserInsertCombo.EVENT_CONFIRM); } + }, { + eventName: BI.MultiTreeCombo.EVENT_BEFORE_POPUPVIEW, + action: function () { + self.fireEvent(BI.TreeValueChooserInsertCombo.EVENT_BEFORE_POPUPVIEW); + } }] }); }, @@ -88,4 +93,5 @@ BI.TreeValueChooserInsertCombo.EVENT_STOP = "EVENT_STOP"; BI.TreeValueChooserInsertCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM"; BI.TreeValueChooserInsertCombo.EVENT_SEARCHING = "EVENT_SEARCHING"; BI.TreeValueChooserInsertCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.TreeValueChooserInsertCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; BI.shortcut("bi.tree_value_chooser_insert_combo", BI.TreeValueChooserInsertCombo); \ No newline at end of file diff --git a/src/component/treevaluechooser/combo.treevaluechooser.js b/src/component/treevaluechooser/combo.treevaluechooser.js index fbf813247..32e8fac3e 100644 --- a/src/component/treevaluechooser/combo.treevaluechooser.js +++ b/src/component/treevaluechooser/combo.treevaluechooser.js @@ -64,6 +64,11 @@ BI.TreeValueChooserCombo = BI.inherit(BI.AbstractTreeValueChooser, { action: function () { self.fireEvent(BI.TreeValueChooserCombo.EVENT_CONFIRM); } + }, { + eventName: BI.MultiTreeCombo.EVENT_BEFORE_POPUPVIEW, + action: function () { + self.fireEvent(BI.TreeValueChooserCombo.EVENT_BEFORE_POPUPVIEW); + } }] }); }, @@ -82,6 +87,7 @@ BI.TreeValueChooserCombo = BI.inherit(BI.AbstractTreeValueChooser, { } }); +BI.TreeValueChooserCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; BI.TreeValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.TreeValueChooserCombo.EVENT_FOCUS = "EVENT_FOCUS"; BI.TreeValueChooserCombo.EVENT_BLUR = "EVENT_BLUR"; diff --git a/src/widget/multilayerselecttree/multilayerselecttree.combo.js b/src/widget/multilayerselecttree/multilayerselecttree.combo.js index f844cb2f1..fb6490468 100644 --- a/src/widget/multilayerselecttree/multilayerselecttree.combo.js +++ b/src/widget/multilayerselecttree/multilayerselecttree.combo.js @@ -96,7 +96,13 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, { value: o.value, maxHeight: 400, minHeight: 240 - } + }, + listeners: [{ + eventName: BI.Combo.EVENT_BEFORE_POPUPVIEW, + action: function () { + self.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_BEFORE_POPUPVIEW); + } + }] }; }, @@ -209,4 +215,5 @@ BI.MultiLayerSelectTreeCombo.EVENT_SEARCHING = "EVENT_SEARCHING"; BI.MultiLayerSelectTreeCombo.EVENT_BLUR = "EVENT_BLUR"; BI.MultiLayerSelectTreeCombo.EVENT_FOCUS = "EVENT_FOCUS"; BI.MultiLayerSelectTreeCombo.EVENT_CHANGE = "EVENT_CHANGE"; +BI.MultiLayerSelectTreeCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; BI.shortcut("bi.multilayer_select_tree_combo", BI.MultiLayerSelectTreeCombo); \ No newline at end of file diff --git a/src/widget/multilayersingletree/multilayersingletree.combo.js b/src/widget/multilayersingletree/multilayersingletree.combo.js index 319b9e5bf..7446ff5f5 100644 --- a/src/widget/multilayersingletree/multilayersingletree.combo.js +++ b/src/widget/multilayersingletree/multilayersingletree.combo.js @@ -99,7 +99,13 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, { value: o.value, maxHeight: 400, minHeight: 240 - } + }, + listeners: [{ + eventName: BI.Combo.EVENT_BEFORE_POPUPVIEW, + action: function () { + self.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_BEFORE_POPUPVIEW); + } + }] }; }, @@ -211,4 +217,5 @@ BI.MultiLayerSingleTreeCombo.EVENT_SEARCHING = "EVENT_SEARCHING"; BI.MultiLayerSingleTreeCombo.EVENT_BLUR = "EVENT_BLUR"; BI.MultiLayerSingleTreeCombo.EVENT_FOCUS = "EVENT_FOCUS"; BI.MultiLayerSingleTreeCombo.EVENT_CHANGE = "EVENT_CHANGE"; +BI.MultiLayerSingleTreeCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; BI.shortcut("bi.multilayer_single_tree_combo", BI.MultiLayerSingleTreeCombo); \ 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 e12d4fa2a..e62da553c 100644 --- a/src/widget/multitree/multi.tree.combo.js +++ b/src/widget/multitree/multi.tree.combo.js @@ -195,7 +195,7 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, { self.combo.setValue(self.storeValue); self.numberCounter.setValue(self.storeValue); self.populate(); - + self.fireEvent(BI.MultiTreeCombo.EVENT_BEFORE_POPUPVIEW); }); this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW, function () { if (isSearching()) { @@ -333,5 +333,6 @@ BI.MultiTreeCombo.EVENT_STOP = "EVENT_STOP"; BI.MultiTreeCombo.EVENT_SEARCHING = "EVENT_SEARCHING"; BI.MultiTreeCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM"; BI.MultiTreeCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.MultiTreeCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; BI.shortcut("bi.multi_tree_combo", BI.MultiTreeCombo); \ No newline at end of file diff --git a/src/widget/multitree/multi.tree.insert.combo.js b/src/widget/multitree/multi.tree.insert.combo.js index 77f4c9636..e005b8097 100644 --- a/src/widget/multitree/multi.tree.insert.combo.js +++ b/src/widget/multitree/multi.tree.insert.combo.js @@ -205,7 +205,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, { self.combo.setValue(self.storeValue); self.numberCounter.setValue(self.storeValue); self.populate(); - + self.fireEvent(BI.MultiTreeInsertCombo.EVENT_BEFORE_POPUPVIEW); }); this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW, function () { if (isSearching()) { @@ -348,5 +348,6 @@ BI.MultiTreeInsertCombo.EVENT_STOP = "EVENT_STOP"; BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM"; BI.MultiTreeInsertCombo.EVENT_SEARCHING = "EVENT_SEARCHING"; BI.MultiTreeInsertCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.MultiTreeInsertCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; BI.shortcut("bi.multi_tree_insert_combo", BI.MultiTreeInsertCombo); \ No newline at end of file diff --git a/src/widget/multitree/multi.tree.list.combo.js b/src/widget/multitree/multi.tree.list.combo.js index 6750b8192..31fb9893d 100644 --- a/src/widget/multitree/multi.tree.list.combo.js +++ b/src/widget/multitree/multi.tree.list.combo.js @@ -224,7 +224,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, { self.combo.setValue(self.storeValue); self.numberCounter.setValue(self.storeValue); self.populate(); - + self.fireEvent(BI.MultiTreeListCombo.EVENT_BEFORE_POPUPVIEW); }); this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW, function () { if (isSearching()) { @@ -372,5 +372,6 @@ BI.MultiTreeListCombo.EVENT_STOP = "EVENT_STOP"; BI.MultiTreeListCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM"; BI.MultiTreeListCombo.EVENT_SEARCHING = "EVENT_SEARCHING"; BI.MultiTreeListCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.MultiTreeListCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; BI.shortcut("bi.multi_tree_list_combo", BI.MultiTreeListCombo); \ No newline at end of file