Browse Source

Merge pull request #159876 in DEC/fineui from master to feature/x

* commit 'd9ce07082068c7572658d79f62339bd0a8556943':
  无JIRA feat: 给下拉框一个完全自由控制的tooltip方式
research/test
superman 2 years ago
parent
commit
d2437f3e83
  1. 28
      src/case/combo/textvaluecombo/combo.textvalue.js

28
src/case/combo/textvaluecombo/combo.textvalue.js

@ -14,7 +14,8 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
value: "", value: "",
defaultText: "", defaultText: "",
allowClear: false, allowClear: false,
status: "success", // success | warning | error status: "success", // success | warning | error,
title: null,
}); });
}, },
@ -35,15 +36,10 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
const o = this.options; const o = this.options;
const trigger = { const title = () => {
type: "bi.select_text_trigger", if (BI.isFunction(o.title)) {
ref: ref => this.trigger = ref, return o.title();
cls: "text-value-trigger", }
items: o.items,
height: o.height,
text: o.text,
value: o.value,
title: () => {
if (this.options.status === "error") { if (this.options.status === "error") {
return { return {
level: "warning", level: "warning",
@ -53,7 +49,17 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
return { return {
level: "success", level: "success",
}; };
}, };
const trigger = {
type: "bi.select_text_trigger",
ref: ref => this.trigger = ref,
cls: "text-value-trigger",
items: o.items,
height: o.height,
text: o.text,
value: o.value,
title,
allowClear: o.allowClear, allowClear: o.allowClear,
defaultText: o.defaultText, defaultText: o.defaultText,
listeners: [ listeners: [

Loading…
Cancel
Save