|
|
|
@ -1240,14 +1240,13 @@
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var queue = []; |
|
|
|
|
var activatedChildren = []; |
|
|
|
|
var has = {}; |
|
|
|
|
var waiting = false; |
|
|
|
|
var flushing = false; |
|
|
|
|
var index = 0; |
|
|
|
|
|
|
|
|
|
function resetSchedulerState() { |
|
|
|
|
index = queue.length = activatedChildren.length = 0; |
|
|
|
|
index = queue.length = 0; |
|
|
|
|
has = {}; |
|
|
|
|
waiting = flushing = false; |
|
|
|
|
} |
|
|
|
@ -1478,7 +1477,12 @@
|
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var runner = effect(getter, { |
|
|
|
|
var runner = effect(function () { |
|
|
|
|
try { |
|
|
|
|
return getter(); |
|
|
|
|
} catch (e) {// 吞掉异常
|
|
|
|
|
} |
|
|
|
|
}, { |
|
|
|
|
lazy: true, |
|
|
|
|
onTrack: onTrack, |
|
|
|
|
onTrigger: onTrigger, |
|
|
|
@ -1628,12 +1632,15 @@
|
|
|
|
|
var getter = exp === "**" ? function (m) { |
|
|
|
|
return m; |
|
|
|
|
} : parsePath(exp); |
|
|
|
|
var v = getter.call(model, model); |
|
|
|
|
watchers.push(innerWatch(v, function (newValue, oldValue) { |
|
|
|
|
watchers.push(innerWatch(function () { |
|
|
|
|
return getter.call(model, model); |
|
|
|
|
}, function (newValue, oldValue) { |
|
|
|
|
callback(i, newValue, oldValue, _.extend({ |
|
|
|
|
index: i |
|
|
|
|
})); |
|
|
|
|
})); |
|
|
|
|
}, _.extend({ |
|
|
|
|
deep: true |
|
|
|
|
}, options))); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1678,21 +1685,21 @@
|
|
|
|
|
prePaths[_i] = paths[_i]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var _v; |
|
|
|
|
var v; |
|
|
|
|
|
|
|
|
|
if (prePaths.length > 0) { |
|
|
|
|
var _getter = parsePath(prePaths.join(".")); |
|
|
|
|
|
|
|
|
|
_v = _getter.call(model, model); |
|
|
|
|
v = _getter.call(model, model); |
|
|
|
|
} else { |
|
|
|
|
_v = model; |
|
|
|
|
v = model; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
paths = paths.slice(prePaths.length); |
|
|
|
|
var changes = []; |
|
|
|
|
watchers.push(innerWatch(function () { |
|
|
|
|
var routes = []; |
|
|
|
|
travers(_v, [], _v, null, routes); |
|
|
|
|
travers(v, [], v, null, routes); |
|
|
|
|
|
|
|
|
|
for (var _i2 = 0, _len = routes.length; _i2 < _len; _i2++) { |
|
|
|
|
var _routes$_i = routes[_i2], |
|
|
|
@ -1717,7 +1724,7 @@
|
|
|
|
|
index: i |
|
|
|
|
})); |
|
|
|
|
} |
|
|
|
|
}, { |
|
|
|
|
}, BI.extend({}, options, { |
|
|
|
|
deep: true, |
|
|
|
|
onTrigger: function onTrigger(_ref) { |
|
|
|
|
var target = _ref.target, |
|
|
|
@ -1727,7 +1734,7 @@
|
|
|
|
|
key: key |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
})); |
|
|
|
|
}))); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1737,7 +1744,7 @@
|
|
|
|
|
callback(i, newValue, oldValue, _.extend({ |
|
|
|
|
index: i |
|
|
|
|
})); |
|
|
|
|
})); |
|
|
|
|
}, options)); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
return watchers; |
|
|
|
|