Browse Source

Pull request #2744: KERNEL-11422 feat: 给下拉框都添加valueFormatter属性

Merge in VISUAL/fineui from ~DAILER/fineui:master to master

* commit '7b2ff798aa603611a7d88ebd2ade69a9470b96e0':
  KERNEL-11422 feat: 给下拉框都添加valueFormatter属性
es6
Dailer 2 years ago
parent
commit
3640b7ac74
  1. 2
      src/case/trigger/trigger.text.select.js
  2. 4
      src/widget/multilayersingletree/multilayersingletree.combo.js
  3. 2
      src/widget/singletree/singletree.trigger.js

2
src/case/trigger/trigger.text.select.js

@ -61,7 +61,7 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
if (result.length > 0) { if (result.length > 0) {
return { return {
textCls: "", textCls: "",
text: result.join(",") text: o.valueFormatter(vals[0]) || result.join(","), // 只保留单个value的场景,后续会把BI.isArray(vals) ? vals : [vals];这种都去掉
}; };
} else { } else {
return { return {

4
src/widget/multilayersingletree/multilayersingletree.combo.js

@ -19,7 +19,8 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
allowEdit: false, allowEdit: false,
allowSearchValue: false, allowSearchValue: false,
allowInsertValue: false, allowInsertValue: false,
isNeedAdjustWidth: true isNeedAdjustWidth: true,
valueFormatter: BI.emptyFn,
}); });
}, },
@ -183,6 +184,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
value: o.value, value: o.value,
tipType: o.tipType, tipType: o.tipType,
warningTitle: o.warningTitle, warningTitle: o.warningTitle,
valueFormatter: o.valueFormatter,
} }
}); });
}, },

2
src/widget/singletree/singletree.trigger.js

@ -13,6 +13,7 @@ BI.SingleTreeTrigger = BI.inherit(BI.Trigger, {
items: [], items: [],
value: "", value: "",
allowClear: false, allowClear: false,
valueFormatter: BI.emptyFn,
}); });
}, },
@ -31,6 +32,7 @@ BI.SingleTreeTrigger = BI.inherit(BI.Trigger, {
tipType: o.tipType, tipType: o.tipType,
value: o.value, value: o.value,
allowClear: o.allowClear, allowClear: o.allowClear,
valueFormatter: o.valueFormatter,
listeners: [ listeners: [
{ {
eventName: BI.SelectTextTrigger.EVENT_CLEAR, eventName: BI.SelectTextTrigger.EVENT_CLEAR,

Loading…
Cancel
Save