|
|
@ -12237,21 +12237,45 @@ if (!_global.BI) { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
})();/** |
|
|
|
})();!(function () { |
|
|
|
|
|
|
|
function extend () { |
|
|
|
|
|
|
|
var target = arguments[0] || {}, length = arguments.length, i = 1, options, name, src, copy; |
|
|
|
|
|
|
|
for (; i < length; i++) { |
|
|
|
|
|
|
|
// Only deal with non-null/undefined values
|
|
|
|
|
|
|
|
if ((options = arguments[i]) != null) { |
|
|
|
|
|
|
|
// Extend the base object
|
|
|
|
|
|
|
|
for (name in options) { |
|
|
|
|
|
|
|
src = target[name]; |
|
|
|
|
|
|
|
copy = options[name]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Prevent never-ending loop
|
|
|
|
|
|
|
|
if (target === copy) { |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (copy !== undefined) { |
|
|
|
|
|
|
|
target[name] = copy; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 客户端观察者,主要处理事件的添加、删除、执行等 |
|
|
|
* 客户端观察者,主要处理事件的添加、删除、执行等 |
|
|
|
* @class BI.OB |
|
|
|
* @class BI.OB |
|
|
|
* @abstract |
|
|
|
* @abstract |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
BI.OB = function (config) { |
|
|
|
BI.OB = function (config) { |
|
|
|
var props = this.props; |
|
|
|
var props = this.props; |
|
|
|
if (BI.isFunction(this.props)) { |
|
|
|
if (BI.isFunction(this.props)) { |
|
|
|
props = this.props(config); |
|
|
|
props = this.props(config); |
|
|
|
} |
|
|
|
} |
|
|
|
this.options = (_global.$ || _global._).extend(this._defaultConfig(config), props, config); |
|
|
|
this.options = extend(this._defaultConfig(config), props, config); |
|
|
|
this._init(); |
|
|
|
this._init(); |
|
|
|
this._initRef(); |
|
|
|
this._initRef(); |
|
|
|
}; |
|
|
|
}; |
|
|
|
_.extend(BI.OB.prototype, { |
|
|
|
_.extend(BI.OB.prototype, { |
|
|
|
props: {}, |
|
|
|
props: {}, |
|
|
|
init: null, |
|
|
|
init: null, |
|
|
|
destroyed: null, |
|
|
|
destroyed: null, |
|
|
@ -12284,7 +12308,7 @@ _.extend(BI.OB.prototype, { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//释放当前对象
|
|
|
|
//释放当前对象
|
|
|
|
_purgeRef: function(){ |
|
|
|
_purgeRef: function () { |
|
|
|
if (this.options.ref) { |
|
|
|
if (this.options.ref) { |
|
|
|
this.options.ref.call(null); |
|
|
|
this.options.ref.call(null); |
|
|
|
} |
|
|
|
} |
|
|
@ -12388,7 +12412,8 @@ _.extend(BI.OB.prototype, { |
|
|
|
this._purgeRef(); |
|
|
|
this._purgeRef(); |
|
|
|
this.purgeListeners(); |
|
|
|
this.purgeListeners(); |
|
|
|
} |
|
|
|
} |
|
|
|
});(function () { |
|
|
|
}); |
|
|
|
|
|
|
|
})();(function () { |
|
|
|
var _global; |
|
|
|
var _global; |
|
|
|
if (typeof window !== "undefined") { |
|
|
|
if (typeof window !== "undefined") { |
|
|
|
_global = window; |
|
|
|
_global = window; |
|
|
|