|
|
|
@ -53,7 +53,16 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
|
|
|
|
|
_digest: function (val, items) { |
|
|
|
|
var o = this.options; |
|
|
|
|
val = BI.isArray(val) ? val[0] : val; |
|
|
|
|
|
|
|
|
|
// 提升valueFormatter的优先级
|
|
|
|
|
if (o.valueFormatter !== BI.emptyFn && BI.isFunction(o.valueFormatter)) { |
|
|
|
|
return { |
|
|
|
|
text: o.valueFormatter(val), |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var result = []; |
|
|
|
|
|
|
|
|
|
var formatItems = BI.Tree.transformToArrayFormat(items); |
|
|
|
|
BI.each(formatItems, function (i, item) { |
|
|
|
|
if (val === item.value && !BI.contains(result, item.text || item.value)) { |
|
|
|
@ -64,7 +73,7 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
|
|
|
|
|
if (result.length > 0) { |
|
|
|
|
return { |
|
|
|
|
textCls: "", |
|
|
|
|
text: o.valueFormatter(val) ?? result.join(","), |
|
|
|
|
text: result.join(","), |
|
|
|
|
}; |
|
|
|
|
} else { |
|
|
|
|
var text = BI.isFunction(o.text) ? o.text() : o.text; |
|
|
|
|