Browse Source

Pull request #2782: 无jira任务 写法问题

Merge in VISUAL/fineui from ~IMP/fineui_fui:master to master

* commit '2d3fb04edec048cca7cc797cdb59746bba66035f':
  无jira任务 写法问题
es6
imp 3 years ago
parent
commit
b52c04d8b0
  1. 40
      src/widget/downlist/combo.downlist.js

40
src/widget/downlist/combo.downlist.js

@ -22,23 +22,6 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
_init: function () { _init: function () {
BI.DownListCombo.superclass._init.apply(this, arguments); BI.DownListCombo.superclass._init.apply(this, arguments);
var self = this, o = this.options; var self = this, o = this.options;
this.popupview = BI.createWidget({
type: "bi.down_list_popup",
items: o.items,
chooseType: o.chooseType,
value: o.value
});
this.popupview.on(BI.DownListPopup.EVENT_CHANGE, function (value) {
self.fireEvent(BI.DownListCombo.EVENT_CHANGE, value);
self.downlistcombo.hideView();
});
this.popupview.on(BI.DownListPopup.EVENT_SON_VALUE_CHANGE, function (value, fatherValue) {
self.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE, value, fatherValue);
self.downlistcombo.hideView();
});
this.downlistcombo = BI.createWidget({ this.downlistcombo = BI.createWidget({
element: this, element: this,
@ -58,7 +41,28 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
height: o.height height: o.height
}), }),
popup: { popup: {
el: this.popupview, el: {
type: "bi.down_list_popup",
ref: function (ref) {
self.popupView = ref;
},
items: o.items,
chooseType: o.chooseType,
value: o.value,
listeners: [{
eventName: BI.DownListPopup.EVENT_CHANGE,
action: function (value) {
self.fireEvent(BI.DownListCombo.EVENT_CHANGE, value);
self.downlistcombo.hideView();
}
}, {
eventName: BI.DownListPopup.EVENT_SON_VALUE_CHANGE,
action: function (value, fatherValue) {
self.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE, value, fatherValue);
self.downlistcombo.hideView();
}
}]
},
stopPropagation: o.stopPropagation, stopPropagation: o.stopPropagation,
maxHeight: o.maxHeight, maxHeight: o.maxHeight,
minWidth: o.minWidth minWidth: o.minWidth

Loading…
Cancel
Save