|
|
@ -79,23 +79,25 @@ |
|
|
|
|
|
|
|
|
|
|
|
// 获得一个当前对象的引用
|
|
|
|
// 获得一个当前对象的引用
|
|
|
|
_initRef: function () { |
|
|
|
_initRef: function () { |
|
|
|
if (this.options.__ref) { |
|
|
|
var o = this.options; |
|
|
|
this.options.__ref.call(this, this); |
|
|
|
if (o.__ref) { |
|
|
|
|
|
|
|
BI.isFunction(o.__ref) ? o.__ref.call(this, this) : o.__ref.current = this; |
|
|
|
} |
|
|
|
} |
|
|
|
if (this.options.ref) { |
|
|
|
if (o.ref) { |
|
|
|
this.options.ref.call(this, this); |
|
|
|
BI.isFunction(o.ref) ? o.ref.call(this, this) : o.ref.current = this; |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//释放当前对象
|
|
|
|
//释放当前对象
|
|
|
|
_purgeRef: function () { |
|
|
|
_purgeRef: function () { |
|
|
|
if (this.options.__ref) { |
|
|
|
var o = this.options; |
|
|
|
this.options.__ref.call(null, null); |
|
|
|
if (o.__ref) { |
|
|
|
this.options.__ref = null; |
|
|
|
BI.isFunction(o.__ref) ? o.__ref.call(null, null) : o.__ref.current = null; |
|
|
|
} |
|
|
|
o.__ref = null; |
|
|
|
if (this.options.ref) { |
|
|
|
} |
|
|
|
this.options.ref.call(null, null); |
|
|
|
if (o.ref) { |
|
|
|
this.options.ref = null; |
|
|
|
BI.isFunction(o.ref) ? o.ref.call(null, null) : o.ref.current = null; |
|
|
|
|
|
|
|
o.ref = null; |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|