Browse Source

按照comment修改

es6
windy 4 years ago
parent
commit
8a2ad961b7
  1. 28
      src/component/valuechooser/combo.valuechooser.nobar.js

28
src/component/valuechooser/combo.valuechooser.nobar.js

@ -5,26 +5,23 @@
*/ */
BI.ValueChooserNoBarCombo = BI.inherit(BI.AbstractValueChooser, { BI.ValueChooserNoBarCombo = BI.inherit(BI.AbstractValueChooser, {
_defaultConfig: function () { props: {
return BI.extend(BI.ValueChooserNoBarCombo.superclass._defaultConfig.apply(this, arguments), { baseCls: "bi-value-chooser-combo",
baseCls: "bi-value-chooser-combo", width: 200,
width: 200, height: 24,
height: 24, items: null,
items: null, itemsCreator: BI.emptyFn,
itemsCreator: BI.emptyFn, cache: true
cache: true
});
}, },
_init: function () { render: function () {
BI.ValueChooserNoBarCombo.superclass._init.apply(this, arguments);
var self = this, o = this.options; var self = this, o = this.options;
if (BI.isNotNull(o.items)) { if (BI.isNotNull(o.items)) {
this.items = o.items; this.items = o.items;
} }
this.combo = BI.createWidget({
return {
type: "bi.multi_select_no_bar_combo", type: "bi.multi_select_no_bar_combo",
element: this,
allowEdit: o.allowEdit, allowEdit: o.allowEdit,
text: o.text, text: o.text,
value: this._assertValue(o.value), value: this._assertValue(o.value),
@ -32,6 +29,9 @@ BI.ValueChooserNoBarCombo = BI.inherit(BI.AbstractValueChooser, {
valueFormatter: BI.bind(this._valueFormatter, this), valueFormatter: BI.bind(this._valueFormatter, this),
width: o.width, width: o.width,
height: o.height, height: o.height,
ref: function(_ref) {
self.combo = _ref;
},
listeners: [{ listeners: [{
eventName: BI.MultiSelectCombo.EVENT_FOCUS, eventName: BI.MultiSelectCombo.EVENT_FOCUS,
action: function () { action: function () {
@ -63,7 +63,7 @@ BI.ValueChooserNoBarCombo = BI.inherit(BI.AbstractValueChooser, {
self.fireEvent(BI.ValueChooserNoBarCombo.EVENT_CONFIRM); self.fireEvent(BI.ValueChooserNoBarCombo.EVENT_CONFIRM);
} }
}] }]
}); }
}, },
setValue: function (v) { setValue: function (v) {

Loading…
Cancel
Save