|
|
@ -29,16 +29,15 @@ |
|
|
|
* @abstract |
|
|
|
* @abstract |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
BI.OB = function (config) { |
|
|
|
BI.OB = function (config) { |
|
|
|
this.__config = config; |
|
|
|
this._constructor(config); |
|
|
|
this._constructor(); |
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
_.extend(BI.OB.prototype, { |
|
|
|
_.extend(BI.OB.prototype, { |
|
|
|
props: {}, |
|
|
|
props: {}, |
|
|
|
init: null, |
|
|
|
init: null, |
|
|
|
destroyed: null, |
|
|
|
destroyed: null, |
|
|
|
|
|
|
|
|
|
|
|
_constructor: function () { |
|
|
|
_constructor: function (config) { |
|
|
|
this._initProps(); |
|
|
|
this._initProps(config); |
|
|
|
this._init(); |
|
|
|
this._init(); |
|
|
|
this._initRef(); |
|
|
|
this._initRef(); |
|
|
|
}, |
|
|
|
}, |
|
|
@ -47,12 +46,12 @@ |
|
|
|
return {}; |
|
|
|
return {}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_initProps: function () { |
|
|
|
_initProps: function (config) { |
|
|
|
var props = this.props; |
|
|
|
var props = this.props; |
|
|
|
if (BI.isFunction(this.props)) { |
|
|
|
if (BI.isFunction(this.props)) { |
|
|
|
props = this.props(this.__config); |
|
|
|
props = this.props(config); |
|
|
|
} |
|
|
|
} |
|
|
|
this.options = extend(this._defaultConfig(this.__config), props, this.__config); |
|
|
|
this.options = extend(this._defaultConfig(config), props, config); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_init: function () { |
|
|
|
_init: function () { |
|
|
|