Browse Source

Pull request #3032: 无JIRA feat: 给下拉框一个完全自由控制的tooltip方式

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

* commit 'd30ce3c4ce7d55f0adbe60d48de66286b5f48f07':
  无JIRA feat: 给下拉框一个完全自由控制的tooltip方式
es6
Dailer 2 years ago
parent
commit
d9ce070820
  1. 30
      src/case/combo/textvaluecombo/combo.textvalue.js

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

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

Loading…
Cancel
Save