Browse Source

整理代码

es6
guy 3 years ago
parent
commit
36edb243d8
  1. 14
      src/base/el.js

14
src/base/el.js

@ -9,18 +9,14 @@ BI.EL = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.EL.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.EL.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-el", baseCls: "bi-el",
el: {}, el: {}
layout: {}
}); });
}, },
_init: function () {
BI.EL.superclass._init.apply(this, arguments); render: function () {
var self = this, o = this.options; var self = this, o = this.options;
this.ele = BI.createWidget(o.el); this.ele = BI.createWidget(o.el, {
BI.createWidget(o.layout, { element: this
type: "bi.adaptive",
element: this,
items: [this.ele]
}); });
this.ele.on(BI.Controller.EVENT_CHANGE, function () { this.ele.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);

Loading…
Cancel
Save