diff --git a/changelog.md b/changelog.md index 97d0ec1fe..88bac7e89 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,6 @@ # 更新日志 2.0(2020-07) +- 复选下拉树和下拉列表添加showView和hideVIew方法 - number_editor支持自动检测数值与范围是否合法 - 修复了颜色选择器设置值为null的时候,trigger和popup表现不一致的问题 diff --git a/src/component/treevaluechooser/combo.listtreevaluechooser.js b/src/component/treevaluechooser/combo.listtreevaluechooser.js index 7fa35c6cf..b4d09b3d1 100644 --- a/src/component/treevaluechooser/combo.listtreevaluechooser.js +++ b/src/component/treevaluechooser/combo.listtreevaluechooser.js @@ -76,6 +76,14 @@ BI.ListTreeValueChooserInsertCombo = BI.inherit(BI.AbstractListTreeValueChooser, }); }, + showView: function () { + this.combo.showView(); + }, + + hideView: function () { + this.combo.hideView(); + }, + setValue: function (v) { this.combo.setValue(v); }, @@ -97,4 +105,4 @@ 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 +BI.shortcut("bi.list_tree_value_chooser_insert_combo", BI.ListTreeValueChooserInsertCombo); diff --git a/src/component/treevaluechooser/combo.treevaluechooser.insert.js b/src/component/treevaluechooser/combo.treevaluechooser.insert.js index 5ef51011c..8359d2fab 100644 --- a/src/component/treevaluechooser/combo.treevaluechooser.insert.js +++ b/src/component/treevaluechooser/combo.treevaluechooser.insert.js @@ -75,6 +75,14 @@ BI.TreeValueChooserInsertCombo = BI.inherit(BI.AbstractTreeValueChooser, { }); }, + showView: function () { + this.combo.showView(); + }, + + hideView: function () { + this.combo.hideView(); + }, + setValue: function (v) { this.combo.setValue(v); }, @@ -96,4 +104,4 @@ 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 +BI.shortcut("bi.tree_value_chooser_insert_combo", BI.TreeValueChooserInsertCombo); diff --git a/src/component/treevaluechooser/combo.treevaluechooser.js b/src/component/treevaluechooser/combo.treevaluechooser.js index 99ccfbbf7..1fa1b3d27 100644 --- a/src/component/treevaluechooser/combo.treevaluechooser.js +++ b/src/component/treevaluechooser/combo.treevaluechooser.js @@ -75,6 +75,14 @@ BI.TreeValueChooserCombo = BI.inherit(BI.AbstractTreeValueChooser, { }); }, + showView: function () { + this.combo.showView(); + }, + + hideView: function () { + this.combo.hideView(); + }, + setValue: function (v) { this.combo.setValue(v); }, @@ -96,4 +104,4 @@ BI.TreeValueChooserCombo.EVENT_BLUR = "EVENT_BLUR"; BI.TreeValueChooserCombo.EVENT_STOP = "EVENT_STOP"; BI.TreeValueChooserCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM"; BI.TreeValueChooserCombo.EVENT_SEARCHING = "EVENT_SEARCHING"; -BI.shortcut("bi.tree_value_chooser_combo", BI.TreeValueChooserCombo); \ No newline at end of file +BI.shortcut("bi.tree_value_chooser_combo", BI.TreeValueChooserCombo); diff --git a/src/widget/multiselect/multiselect.combo.js b/src/widget/multiselect/multiselect.combo.js index c591fcef4..e73d36e1c 100644 --- a/src/widget/multiselect/multiselect.combo.js +++ b/src/widget/multiselect/multiselect.combo.js @@ -425,6 +425,14 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { this.combo.populate.apply(this.combo, arguments); }, + showView:function (){ + this.combo.showView(); + }, + + hideView:function (){ + this.combo.hideView(); + }, + setValue: function (v) { this.storeValue = v || {}; this._assertValue(this.storeValue); @@ -454,4 +462,4 @@ BI.MultiSelectCombo.EVENT_SEARCHING = "EVENT_SEARCHING"; BI.MultiSelectCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM"; BI.MultiSelectCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; -BI.shortcut("bi.multi_select_combo", BI.MultiSelectCombo); \ No newline at end of file +BI.shortcut("bi.multi_select_combo", BI.MultiSelectCombo); diff --git a/src/widget/multiselect/multiselect.combo.nobar.js b/src/widget/multiselect/multiselect.combo.nobar.js index 41fb79faf..3c3da7379 100644 --- a/src/widget/multiselect/multiselect.combo.nobar.js +++ b/src/widget/multiselect/multiselect.combo.nobar.js @@ -418,6 +418,14 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, { this.combo.populate.apply(this.combo, arguments); }, + showView:function (){ + this.combo.showView(); + }, + + hideView:function (){ + this.combo.hideView(); + }, + setValue: function (v) { this.storeValue = { type: BI.Selection.Multi, @@ -449,4 +457,4 @@ BI.MultiSelectNoBarCombo.EVENT_SEARCHING = "EVENT_SEARCHING"; BI.MultiSelectNoBarCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM"; BI.MultiSelectNoBarCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; -BI.shortcut("bi.multi_select_no_bar_combo", BI.MultiSelectNoBarCombo); \ No newline at end of file +BI.shortcut("bi.multi_select_no_bar_combo", BI.MultiSelectNoBarCombo); diff --git a/src/widget/multiselect/multiselect.insert.combo.js b/src/widget/multiselect/multiselect.insert.combo.js index eb54fc2c8..bbc9a61d8 100644 --- a/src/widget/multiselect/multiselect.insert.combo.js +++ b/src/widget/multiselect/multiselect.insert.combo.js @@ -443,6 +443,14 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, { this.combo.populate.apply(this.combo, arguments); }, + showView:function (){ + this.combo.showView(); + }, + + hideView:function (){ + this.combo.hideView(); + }, + setValue: function (v) { this.storeValue = v || {}; this._assertValue(this.storeValue); @@ -473,4 +481,4 @@ BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM"; BI.MultiSelectInsertCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.MultiSelectInsertCombo.EVENT_ADD_ITEM = "EVENT_ADD_ITEM"; -BI.shortcut("bi.multi_select_insert_combo", BI.MultiSelectInsertCombo); \ No newline at end of file +BI.shortcut("bi.multi_select_insert_combo", BI.MultiSelectInsertCombo); diff --git a/src/widget/multiselect/multiselect.insert.combo.nobar.js b/src/widget/multiselect/multiselect.insert.combo.nobar.js index ce1522820..daf32aa20 100644 --- a/src/widget/multiselect/multiselect.insert.combo.nobar.js +++ b/src/widget/multiselect/multiselect.insert.combo.nobar.js @@ -438,6 +438,14 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, { this.combo.populate.apply(this.combo, arguments); }, + showView:function (){ + this.combo.showView(); + }, + + hideView:function (){ + this.combo.hideView(); + }, + setValue: function (v) { this.storeValue = { type: BI.Selection.Multi, @@ -465,4 +473,4 @@ BI.extend(BI.MultiSelectInsertNoBarCombo, { BI.MultiSelectInsertNoBarCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.MultiSelectInsertNoBarCombo.EVENT_ADD_ITEM = "EVENT_ADD_ITEM"; -BI.shortcut("bi.multi_select_insert_no_bar_combo", BI.MultiSelectInsertNoBarCombo); \ No newline at end of file +BI.shortcut("bi.multi_select_insert_no_bar_combo", BI.MultiSelectInsertNoBarCombo); diff --git a/src/widget/multitree/multi.tree.combo.js b/src/widget/multitree/multi.tree.combo.js index e431d918d..3561e28fa 100644 --- a/src/widget/multitree/multi.tree.combo.js +++ b/src/widget/multitree/multi.tree.combo.js @@ -311,6 +311,14 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, { this.combo.hideView(); }, + showView: function () { + this.combo.showView(); + }, + + hideView: function () { + this.combo.hideView(); + }, + setValue: function (v) { this.storeValue.value = v || {}; this.combo.setValue({ @@ -338,4 +346,4 @@ 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 +BI.shortcut("bi.multi_tree_combo", BI.MultiTreeCombo); diff --git a/src/widget/multitree/multi.tree.insert.combo.js b/src/widget/multitree/multi.tree.insert.combo.js index b44176039..ce0449dd5 100644 --- a/src/widget/multitree/multi.tree.insert.combo.js +++ b/src/widget/multitree/multi.tree.insert.combo.js @@ -326,6 +326,14 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, { this.combo.hideView(); }, + showView: function () { + this.combo.showView(); + }, + + hideView: function () { + this.combo.hideView(); + }, + setValue: function (v) { this.storeValue.value = v || {}; this.combo.setValue({ @@ -353,4 +361,4 @@ 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 +BI.shortcut("bi.multi_tree_insert_combo", BI.MultiTreeInsertCombo); diff --git a/src/widget/multitree/multi.tree.list.combo.js b/src/widget/multitree/multi.tree.list.combo.js index 72ba8966d..cbbf67286 100644 --- a/src/widget/multitree/multi.tree.list.combo.js +++ b/src/widget/multitree/multi.tree.list.combo.js @@ -350,6 +350,14 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, { this.combo.hideView(); }, + showView: function () { + this.combo.showView(); + }, + + hideView: function () { + this.combo.hideView(); + }, + setValue: function (v) { this.storeValue.value = v || []; this.combo.setValue({ @@ -377,4 +385,4 @@ 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 +BI.shortcut("bi.multi_tree_list_combo", BI.MultiTreeListCombo);