Browse Source

Pull request #2081: 无JIRA任务 feat: BI.SearchTextValueCombo 的defaultText和text区分开

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

* commit '152a297931c84913f677a8b37706cdbb0cb12ac3':
  无JIRA任务 feat: BI.SearchTextValueCombo 的defaultText和text区分开
es6
Dailer 3 years ago
parent
commit
7f2ea37069
  1. 6
      src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js
  2. 4
      src/case/combo/searchtextvaluecombo/trigger.searchtextvalue.js

6
src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js

@ -7,6 +7,7 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
baseCls: "bi-search-text-value-combo",
height: 24,
text: "",
defaultText: "",
items: [],
tipType: "",
warningTitle: "",
@ -36,6 +37,7 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
items: o.items,
height: o.height - 2,
text: o.text,
defaultText: o.defaultText,
value: o.value,
tipType: o.tipType,
warningTitle: o.warningTitle,
@ -117,13 +119,13 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
created: function () {
var o = this.options;
if(BI.isKey(o.value)) {
if (BI.isKey(o.value)) {
this._checkError(o.value);
}
},
_checkError: function (v) {
if(BI.isNull(v) || BI.isEmptyArray(v) || BI.isEmptyString(v)) {
if (BI.isNull(v) || BI.isEmptyArray(v) || BI.isEmptyString(v)) {
this.trigger.options.tipType = "success";
this.element.removeClass("combo-error");
} else {

4
src/case/combo/searchtextvaluecombo/trigger.searchtextvalue.js

@ -29,7 +29,7 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, {
self.editor = this;
},
watermark: o.watermark,
defaultText: o.text,
defaultText: o.defaultText,
text: this._digest(o.value, o.items),
value: o.value,
height: o.height,
@ -69,7 +69,7 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, {
this.editor.setState(v);
},
_digest: function(vals, items){
_digest: function (vals, items) {
var o = this.options;
vals = BI.isArray(vals) ? vals : [vals];
var result = [];

Loading…
Cancel
Save