windy 7 years ago
parent
commit
5527e5eca1
  1. 13
      demo/js/case/combo/demo.text_value_down_list_combo.js
  2. 22
      dist/bundle.js
  3. 22
      dist/case.js
  4. 13
      dist/demo.js
  5. 22
      dist/fineui.js
  6. 17
      src/case/combo/textvaluedownlistcombo/combo.textvaluedownlist.js
  7. 5
      src/case/combo/textvaluedownlistcombo/trigger.textvaluedownlist.js

13
demo/js/case/combo/demo.text_value_down_list_combo.js

@ -16,6 +16,8 @@ Demo.TextValueDownListCombo = BI.inherit(BI.Widget, {
ref: function (_ref) {
self.refs = _ref;
},
text: "默认值",
value: 11,
items: [
[{
el: {
@ -35,13 +37,16 @@ Demo.TextValueDownListCombo = BI.inherit(BI.Widget, {
value: 3
}]
]
}, {
type: "bi.button",
width: 90,
height: 25,
handler: function () {
self.refs.setValue(2);
}
}],
vgap: 20
};
},
mounted: function () {
this.refs.setValue(2);
}
});

22
dist/bundle.js vendored

@ -68348,10 +68348,16 @@ BI.TextValueDownListCombo = BI.inherit(BI.Widget, {
this._createValueMap();
var value;
if(BI.isNotNull(o.value)){
value = this._digest(o.value);
}
this.trigger = BI.createWidget({
type: "bi.down_list_select_text_trigger",
height: o.height,
items: o.items
items: o.items,
text: o.text,
value: value
});
this.combo = BI.createWidget({
@ -68361,6 +68367,7 @@ BI.TextValueDownListCombo = BI.inherit(BI.Widget, {
adjustLength: 2,
height: o.height,
el: this.trigger,
value: BI.isNull(value) ? [] : [value],
items: BI.deepClone(o.items)
});
@ -68389,10 +68396,14 @@ BI.TextValueDownListCombo = BI.inherit(BI.Widget, {
});
},
_digest: function (v) {
return this.valueMap[v];
},
setValue: function (v) {
v = this.valueMap[v];
v = this._digest(v);
this.combo.setValue([v]);
this.trigger.setValue(v.childValue || v.value);
this.trigger.setValue(v);
},
getValue: function () {
@ -68432,7 +68443,8 @@ BI.DownListSelectTextTrigger = BI.inherit(BI.Trigger, {
element: this,
height: o.height,
items: this._formatItemArray(o.items),
text: o.text
text: o.text,
value: BI.isNull(o.value) ? "" : o.value.childValue || o.value.value
});
},
@ -68453,7 +68465,7 @@ BI.DownListSelectTextTrigger = BI.inherit(BI.Trigger, {
},
setValue: function (vals) {
this.trigger.setValue(vals);
this.trigger.setValue(vals.childValue || vals.value);
},
populate: function (items) {

22
dist/case.js vendored

@ -6058,10 +6058,16 @@ BI.TextValueDownListCombo = BI.inherit(BI.Widget, {
this._createValueMap();
var value;
if(BI.isNotNull(o.value)){
value = this._digest(o.value);
}
this.trigger = BI.createWidget({
type: "bi.down_list_select_text_trigger",
height: o.height,
items: o.items
items: o.items,
text: o.text,
value: value
});
this.combo = BI.createWidget({
@ -6071,6 +6077,7 @@ BI.TextValueDownListCombo = BI.inherit(BI.Widget, {
adjustLength: 2,
height: o.height,
el: this.trigger,
value: BI.isNull(value) ? [] : [value],
items: BI.deepClone(o.items)
});
@ -6099,10 +6106,14 @@ BI.TextValueDownListCombo = BI.inherit(BI.Widget, {
});
},
_digest: function (v) {
return this.valueMap[v];
},
setValue: function (v) {
v = this.valueMap[v];
v = this._digest(v);
this.combo.setValue([v]);
this.trigger.setValue(v.childValue || v.value);
this.trigger.setValue(v);
},
getValue: function () {
@ -6142,7 +6153,8 @@ BI.DownListSelectTextTrigger = BI.inherit(BI.Trigger, {
element: this,
height: o.height,
items: this._formatItemArray(o.items),
text: o.text
text: o.text,
value: BI.isNull(o.value) ? "" : o.value.childValue || o.value.value
});
},
@ -6163,7 +6175,7 @@ BI.DownListSelectTextTrigger = BI.inherit(BI.Trigger, {
},
setValue: function (vals) {
this.trigger.setValue(vals);
this.trigger.setValue(vals.childValue || vals.value);
},
populate: function (items) {

13
dist/demo.js vendored

@ -1960,6 +1960,8 @@ Demo.TextValueDownListCombo = BI.inherit(BI.Widget, {
ref: function (_ref) {
self.refs = _ref;
},
text: "默认值",
value: 11,
items: [
[{
el: {
@ -1979,13 +1981,16 @@ Demo.TextValueDownListCombo = BI.inherit(BI.Widget, {
value: 3
}]
]
}, {
type: "bi.button",
width: 90,
height: 25,
handler: function () {
self.refs.setValue(2);
}
}],
vgap: 20
};
},
mounted: function () {
this.refs.setValue(2);
}
});

22
dist/fineui.js vendored

@ -70042,10 +70042,16 @@ BI.TextValueDownListCombo = BI.inherit(BI.Widget, {
this._createValueMap();
var value;
if(BI.isNotNull(o.value)){
value = this._digest(o.value);
}
this.trigger = BI.createWidget({
type: "bi.down_list_select_text_trigger",
height: o.height,
items: o.items
items: o.items,
text: o.text,
value: value
});
this.combo = BI.createWidget({
@ -70055,6 +70061,7 @@ BI.TextValueDownListCombo = BI.inherit(BI.Widget, {
adjustLength: 2,
height: o.height,
el: this.trigger,
value: BI.isNull(value) ? [] : [value],
items: BI.deepClone(o.items)
});
@ -70083,10 +70090,14 @@ BI.TextValueDownListCombo = BI.inherit(BI.Widget, {
});
},
_digest: function (v) {
return this.valueMap[v];
},
setValue: function (v) {
v = this.valueMap[v];
v = this._digest(v);
this.combo.setValue([v]);
this.trigger.setValue(v.childValue || v.value);
this.trigger.setValue(v);
},
getValue: function () {
@ -70126,7 +70137,8 @@ BI.DownListSelectTextTrigger = BI.inherit(BI.Trigger, {
element: this,
height: o.height,
items: this._formatItemArray(o.items),
text: o.text
text: o.text,
value: BI.isNull(o.value) ? "" : o.value.childValue || o.value.value
});
},
@ -70147,7 +70159,7 @@ BI.DownListSelectTextTrigger = BI.inherit(BI.Trigger, {
},
setValue: function (vals) {
this.trigger.setValue(vals);
this.trigger.setValue(vals.childValue || vals.value);
},
populate: function (items) {

17
src/case/combo/textvaluedownlistcombo/combo.textvaluedownlist.js

@ -16,10 +16,16 @@ BI.TextValueDownListCombo = BI.inherit(BI.Widget, {
this._createValueMap();
var value;
if(BI.isNotNull(o.value)){
value = this._digest(o.value);
}
this.trigger = BI.createWidget({
type: "bi.down_list_select_text_trigger",
height: o.height,
items: o.items
items: o.items,
text: o.text,
value: value
});
this.combo = BI.createWidget({
@ -29,6 +35,7 @@ BI.TextValueDownListCombo = BI.inherit(BI.Widget, {
adjustLength: 2,
height: o.height,
el: this.trigger,
value: BI.isNull(value) ? [] : [value],
items: BI.deepClone(o.items)
});
@ -57,10 +64,14 @@ BI.TextValueDownListCombo = BI.inherit(BI.Widget, {
});
},
_digest: function (v) {
return this.valueMap[v];
},
setValue: function (v) {
v = this.valueMap[v];
v = this._digest(v);
this.combo.setValue([v]);
this.trigger.setValue(v.childValue || v.value);
this.trigger.setValue(v);
},
getValue: function () {

5
src/case/combo/textvaluedownlistcombo/trigger.textvaluedownlist.js

@ -23,7 +23,8 @@ BI.DownListSelectTextTrigger = BI.inherit(BI.Trigger, {
element: this,
height: o.height,
items: this._formatItemArray(o.items),
text: o.text
text: o.text,
value: BI.isNull(o.value) ? "" : o.value.childValue || o.value.value
});
},
@ -44,7 +45,7 @@ BI.DownListSelectTextTrigger = BI.inherit(BI.Trigger, {
},
setValue: function (vals) {
this.trigger.setValue(vals);
this.trigger.setValue(vals.childValue || vals.value);
},
populate: function (items) {

Loading…
Cancel
Save