Browse Source

Pull request #1370: REPORT-34299 下拉树系列支持isNeedAdjustWidth属性

Merge in VISUAL/fineui from ~WINDY/fui:master to master

* commit '8a0d76fe2598b11673ae9ed4f495180ed73c146a':
  REPORT-34299 下拉树系列支持isNeedAdjustWidth属性
master
windy 4 years ago
parent
commit
50be0b5cfe
  1. 1
      changelog.md
  2. 4
      src/component/treevaluechooser/combo.listtreevaluechooser.js
  3. 4
      src/component/treevaluechooser/combo.treevaluechooser.insert.js
  4. 4
      src/component/treevaluechooser/combo.treevaluechooser.js
  5. 5
      src/widget/multilayerselecttree/multilayerselecttree.combo.js
  6. 5
      src/widget/multilayersingletree/multilayersingletree.combo.js
  7. 7
      src/widget/multitree/multi.tree.combo.js
  8. 7
      src/widget/multitree/multi.tree.insert.combo.js
  9. 7
      src/widget/multitree/multi.tree.list.combo.js

1
changelog.md

@ -1,5 +1,6 @@
# 更新日志 # 更新日志
2.0(2020-06) 2.0(2020-06)
- 下拉树系列支持isNeedAdjustWidth以动态变化宽度
- 修复了新增值的下拉控件传递valueFormatter搜索完全匹配项提示新增 - 修复了新增值的下拉控件传递valueFormatter搜索完全匹配项提示新增
- 修复了选色控件历史记录没有选中的问题的问题 - 修复了选色控件历史记录没有选中的问题的问题
- 修复了单选下拉框新增值的时候没有发事件的问题 - 修复了单选下拉框新增值的时候没有发事件的问题

4
src/component/treevaluechooser/combo.listtreevaluechooser.js

@ -13,7 +13,8 @@ BI.ListTreeValueChooserInsertCombo = BI.inherit(BI.AbstractListTreeValueChooser,
width: 200, width: 200,
height: 24, height: 24,
items: null, items: null,
itemsCreator: BI.emptyFn itemsCreator: BI.emptyFn,
isNeedAdjustWidth: true,
}); });
}, },
@ -25,6 +26,7 @@ BI.ListTreeValueChooserInsertCombo = BI.inherit(BI.AbstractListTreeValueChooser,
} }
this.combo = BI.createWidget({ this.combo = BI.createWidget({
type: "bi.multi_tree_list_combo", type: "bi.multi_tree_list_combo",
isNeedAdjustWidth: o.isNeedAdjustWidth,
element: this, element: this,
text: o.text, text: o.text,
value: o.value, value: o.value,

4
src/component/treevaluechooser/combo.treevaluechooser.insert.js

@ -13,7 +13,8 @@ BI.TreeValueChooserInsertCombo = BI.inherit(BI.AbstractTreeValueChooser, {
width: 200, width: 200,
height: 24, height: 24,
items: null, items: null,
itemsCreator: BI.emptyFn itemsCreator: BI.emptyFn,
isNeedAdjustWidth: true
}); });
}, },
@ -25,6 +26,7 @@ BI.TreeValueChooserInsertCombo = BI.inherit(BI.AbstractTreeValueChooser, {
} }
this.combo = BI.createWidget({ this.combo = BI.createWidget({
type: "bi.multi_tree_insert_combo", type: "bi.multi_tree_insert_combo",
isNeedAdjustWidth: o.isNeedAdjustWidth,
allowEdit: o.allowEdit, allowEdit: o.allowEdit,
text: o.text, text: o.text,
value: o.value, value: o.value,

4
src/component/treevaluechooser/combo.treevaluechooser.js

@ -13,7 +13,8 @@ BI.TreeValueChooserCombo = BI.inherit(BI.AbstractTreeValueChooser, {
width: 200, width: 200,
height: 24, height: 24,
items: null, items: null,
itemsCreator: BI.emptyFn itemsCreator: BI.emptyFn,
isNeedAdjustWidth: true
}); });
}, },
@ -34,6 +35,7 @@ BI.TreeValueChooserCombo = BI.inherit(BI.AbstractTreeValueChooser, {
valueFormatter: BI.bind(this._valueFormatter, this), valueFormatter: BI.bind(this._valueFormatter, this),
width: o.width, width: o.width,
height: o.height, height: o.height,
isNeedAdjustWidth: o.isNeedAdjustWidth,
listeners: [{ listeners: [{
eventName: BI.MultiTreeCombo.EVENT_FOCUS, eventName: BI.MultiTreeCombo.EVENT_FOCUS,
action: function () { action: function () {

5
src/widget/multilayerselecttree/multilayerselecttree.combo.js

@ -18,7 +18,8 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
}, },
allowEdit: false, allowEdit: false,
allowSearchValue: false, allowSearchValue: false,
allowInsertValue: false allowInsertValue: false,
isNeedAdjustWidth: true
}); });
}, },
@ -95,8 +96,10 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
}, },
value: o.value, value: o.value,
maxHeight: 400, maxHeight: 400,
maxWidth: o.isNeedAdjustWidth ? "auto" : 500,
minHeight: 240 minHeight: 240
}, },
isNeedAdjustWidth: o.isNeedAdjustWidth,
listeners: [{ listeners: [{
eventName: BI.Combo.EVENT_BEFORE_POPUPVIEW, eventName: BI.Combo.EVENT_BEFORE_POPUPVIEW,
action: function () { action: function () {

5
src/widget/multilayersingletree/multilayersingletree.combo.js

@ -21,7 +21,8 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
}, },
allowEdit: false, allowEdit: false,
allowSearchValue: false, allowSearchValue: false,
allowInsertValue: false allowInsertValue: false,
isNeedAdjustWidth: true
}); });
}, },
@ -98,8 +99,10 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
}, },
value: o.value, value: o.value,
maxHeight: 400, maxHeight: 400,
maxWidth: o.isNeedAdjustWidth ? "auto" : 500,
minHeight: 240 minHeight: 240
}, },
isNeedAdjustWidth: o.isNeedAdjustWidth,
listeners: [{ listeners: [{
eventName: BI.Combo.EVENT_BEFORE_POPUPVIEW, eventName: BI.Combo.EVENT_BEFORE_POPUPVIEW,
action: function () { action: function () {

7
src/widget/multitree/multi.tree.combo.js

@ -21,7 +21,8 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, {
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
height: 24, height: 24,
allowEdit: true allowEdit: true,
isNeedAdjustWidth: true,
}); });
}, },
@ -106,8 +107,10 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, {
self.numberCounter.adjustView(); self.numberCounter.adjustView();
self.trigger.getSearcher().adjustView(); self.trigger.getSearcher().adjustView();
}); });
} },
maxWidth: o.isNeedAdjustWidth ? "auto" : 500,
}, },
isNeedAdjustWidth: o.isNeedAdjustWidth,
value: {value: o.value || {}}, value: {value: o.value || {}},
hideChecker: function (e) { hideChecker: function (e) {
return triggerBtn.element.find(e.target).length === 0 && return triggerBtn.element.find(e.target).length === 0 &&

7
src/widget/multitree/multi.tree.insert.combo.js

@ -21,7 +21,8 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
height: 24, height: 24,
allowEdit: true allowEdit: true,
isNeedAdjustWidth: true
}); });
}, },
@ -121,8 +122,10 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
self.numberCounter.adjustView(); self.numberCounter.adjustView();
self.trigger.getSearcher().adjustView(); self.trigger.getSearcher().adjustView();
}); });
} },
maxWidth: o.isNeedAdjustWidth ? "auto" : 500,
}, },
isNeedAdjustWidth: o.isNeedAdjustWidth,
value: {value: o.value || {}}, value: {value: o.value || {}},
hideChecker: function (e) { hideChecker: function (e) {
return triggerBtn.element.find(e.target).length === 0 && return triggerBtn.element.find(e.target).length === 0 &&

7
src/widget/multitree/multi.tree.list.combo.js

@ -22,7 +22,8 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
height: 24, height: 24,
allowEdit: true, allowEdit: true,
allowInsertValue: true allowInsertValue: true,
isNeedAdjustWidth: true
}); });
}, },
@ -140,8 +141,10 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
self.numberCounter.adjustView(); self.numberCounter.adjustView();
self.trigger.getSearcher().adjustView(); self.trigger.getSearcher().adjustView();
}); });
} },
maxWidth: o.isNeedAdjustWidth ? "auto" : 500,
}, },
isNeedAdjustWidth: o.isNeedAdjustWidth,
value: {value: o.value || {}}, value: {value: o.value || {}},
hideChecker: function (e) { hideChecker: function (e) {
return triggerBtn.element.find(e.target).length === 0 && return triggerBtn.element.find(e.target).length === 0 &&

Loading…
Cancel
Save