|
|
@ -53,7 +53,16 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, { |
|
|
|
_digest: function (val, items) { |
|
|
|
_digest: function (val, items) { |
|
|
|
var o = this.options; |
|
|
|
var o = this.options; |
|
|
|
val = BI.isArray(val) ? val[0] : val; |
|
|
|
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 result = []; |
|
|
|
|
|
|
|
|
|
|
|
var formatItems = BI.Tree.transformToArrayFormat(items); |
|
|
|
var formatItems = BI.Tree.transformToArrayFormat(items); |
|
|
|
BI.each(formatItems, function (i, item) { |
|
|
|
BI.each(formatItems, function (i, item) { |
|
|
|
if (val === item.value && !BI.contains(result, item.text || item.value)) { |
|
|
|
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) { |
|
|
|
if (result.length > 0) { |
|
|
|
return { |
|
|
|
return { |
|
|
|
textCls: "", |
|
|
|
textCls: "", |
|
|
|
text: o.valueFormatter(val) ?? result.join(","), |
|
|
|
text: result.join(","), |
|
|
|
}; |
|
|
|
}; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
var text = BI.isFunction(o.text) ? o.text() : o.text; |
|
|
|
var text = BI.isFunction(o.text) ? o.text() : o.text; |
|
|
|