@ -76,7 +76,7 @@ function popTarget() {
export const Model = Fix . Model ;
const oldWatch = Fix . watch ;
Fix . watch = function ( model , expOrFn , cb , options ) {
Fix . watch = function ( model , expOrFn , cb , options ) {
if ( isPlainObject ( cb ) ) {
options = cb ;
cb = cb . handler ;
@ -89,7 +89,7 @@ Fix.watch = function(model, expOrFn, cb, options) {
this ,
model ,
expOrFn ,
function ( ) {
function ( ) {
options && options . store && pushTarget ( options . store ) ;
let res ;
try {
@ -167,7 +167,7 @@ export function createStore() {
}
const _init = Widget . prototype . _init ;
Widget . prototype . _init = function ( ) {
Widget . prototype . _init = function ( ) {
const needPop = createStore . call ( this ) ;
try {
_init . apply ( this , arguments ) ;
@ -178,7 +178,7 @@ Widget.prototype._init = function() {
} ;
const _ _initWatch = Widget . prototype . _ _initWatch ;
Widget . prototype . _ _initWatch = function ( ) {
Widget . prototype . _ _initWatch = function ( ) {
_ _initWatch . apply ( this , arguments ) ;
const workerMode =
Providers . getProvider ( "bi.provider.system" ) . getWorkerMode ( ) ;
@ -191,7 +191,7 @@ Widget.prototype.__initWatch = function() {
} ;
const unMount = Widget . prototype . _ _destroy ;
Widget . prototype . _ _destroy = function ( ) {
Widget . prototype . _ _destroy = function ( ) {
try {
unMount . apply ( this , arguments ) ;
} catch ( e ) {
@ -204,6 +204,7 @@ Widget.prototype.__destroy = function() {
unwatch ( ) ;
} ) ;
} ) ;
Fix . cleanupDeps ( ) ;
this . _watchers && ( this . _watchers = [ ] ) ;
if ( this . store ) {
this . store . _parent && ( this . store . _parent = null ) ;
@ -213,7 +214,7 @@ Widget.prototype.__destroy = function() {
delete this . _ _cacheStore ;
} ;
Widget . prototype . _ _watch = function ( getter , handler , options ) {
Widget . prototype . _ _watch = function ( getter , handler , options ) {
this . _watchers = this . _watchers || [ ] ;
const watcher = new Fix . Watcher (
null ,
@ -235,7 +236,7 @@ Widget.prototype.__watch = function(getter, handler, options) {
_ . each ( [ "_render" , "__afterRender" , "_mount" , "__afterMount" ] , ( name ) => {
const old = Widget . prototype [ name ] ;
old &&
( Widget . prototype [ name ] = function ( ) {
( Widget . prototype [ name ] = function ( ) {
this . store && pushTarget ( this . store ) ;
let res ;
try {