Browse Source

text_value_combo接受value值

es6
windy 7 years ago
parent
commit
1a246b270a
  1. 15
      demo/js/case/combo/demo.text_value_combo.js
  2. 8
      dist/bundle.js
  3. 8
      dist/case.js
  4. 15
      dist/demo.js
  5. 8
      dist/fineui.js
  6. 8
      src/case/combo/textvaluecombo/combo.textvalue.js

15
demo/js/case/combo/demo.text_value_combo.js

@ -6,12 +6,16 @@ Demo.TextValueCombo = BI.inherit(BI.Widget, {
baseCls: ""
},
render: function () {
var combo;
return {
type: "bi.horizontal_auto",
items: [{
type: "bi.text_value_combo",
value: "默认值",
ref: function () {
combo = this;
},
text: "默认值",
value: 2,
width: 300,
items: [{
text: "MVC-1",
@ -26,6 +30,13 @@ Demo.TextValueCombo = BI.inherit(BI.Widget, {
iconCls: "pull-right-font",
value: 3
}]
}, {
type: "bi.button",
width: 90,
height: 25,
handler: function () {
combo.setValue("");
}
}],
vgap: 20
};

8
dist/bundle.js vendored

@ -68151,6 +68151,7 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
baseClass: "bi-text-value-combo",
height: 30,
chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
text: "",
value: "",
el: {}
});
@ -68163,11 +68164,13 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
type: "bi.select_text_trigger",
items: o.items,
height: o.height,
text: o.value
text: o.text,
value: o.value
});
this.popup = BI.createWidget({
type: "bi.text_value_combo_popup",
chooseType: o.chooseType,
value: o.value,
items: o.items
});
this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE, function () {
@ -68188,9 +68191,6 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
maxHeight: 300
}
});
if (BI.isKey(o.value)) {
this.setValue(o.value);
}
},
setValue: function (v) {

8
dist/case.js vendored

@ -5861,6 +5861,7 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
baseClass: "bi-text-value-combo",
height: 30,
chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
text: "",
value: "",
el: {}
});
@ -5873,11 +5874,13 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
type: "bi.select_text_trigger",
items: o.items,
height: o.height,
text: o.value
text: o.text,
value: o.value
});
this.popup = BI.createWidget({
type: "bi.text_value_combo_popup",
chooseType: o.chooseType,
value: o.value,
items: o.items
});
this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE, function () {
@ -5898,9 +5901,6 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
maxHeight: 300
}
});
if (BI.isKey(o.value)) {
this.setValue(o.value);
}
},
setValue: function (v) {

15
dist/demo.js vendored

@ -1905,12 +1905,16 @@ Demo.TextValueCombo = BI.inherit(BI.Widget, {
baseCls: ""
},
render: function () {
var combo;
return {
type: "bi.horizontal_auto",
items: [{
type: "bi.text_value_combo",
value: "默认值",
ref: function () {
combo = this;
},
text: "默认值",
value: 2,
width: 300,
items: [{
text: "MVC-1",
@ -1925,6 +1929,13 @@ Demo.TextValueCombo = BI.inherit(BI.Widget, {
iconCls: "pull-right-font",
value: 3
}]
}, {
type: "bi.button",
width: 90,
height: 25,
handler: function () {
combo.setValue("");
}
}],
vgap: 20
};

8
dist/fineui.js vendored

@ -69845,6 +69845,7 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
baseClass: "bi-text-value-combo",
height: 30,
chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
text: "",
value: "",
el: {}
});
@ -69857,11 +69858,13 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
type: "bi.select_text_trigger",
items: o.items,
height: o.height,
text: o.value
text: o.text,
value: o.value
});
this.popup = BI.createWidget({
type: "bi.text_value_combo_popup",
chooseType: o.chooseType,
value: o.value,
items: o.items
});
this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE, function () {
@ -69882,9 +69885,6 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
maxHeight: 300
}
});
if (BI.isKey(o.value)) {
this.setValue(o.value);
}
},
setValue: function (v) {

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

@ -10,6 +10,7 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
baseClass: "bi-text-value-combo",
height: 30,
chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
text: "",
value: "",
el: {}
});
@ -22,11 +23,13 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
type: "bi.select_text_trigger",
items: o.items,
height: o.height,
text: o.value
text: o.text,
value: o.value
});
this.popup = BI.createWidget({
type: "bi.text_value_combo_popup",
chooseType: o.chooseType,
value: o.value,
items: o.items
});
this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE, function () {
@ -47,9 +50,6 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
maxHeight: 300
}
});
if (BI.isKey(o.value)) {
this.setValue(o.value);
}
},
setValue: function (v) {

Loading…
Cancel
Save