You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
export function trackEffects(dep) {
//看看 dep 之前有没有添加过,添加过的话 那么就不添加了
if (dep.has(activeEffect)) return;
dep.add(activeEffect)
activeEffect.deps.push(dep); // 反向搜集
// start --- test
let count = 0;
if( activeEffect.deps.length ){
testMethod(activeEffect);
}
function testMethod(activeEffect){
const dep = activeEffect.deps[0]
for (const effect of dep) { // debugger
count++;
if(count > 1000){
debugger
console.log('循环结束')
return;
}
testMethod(effect);
}
}
// end -- test
}
The text was updated successfully, but these errors were encountered:
export function trackEffects(dep) {
//看看 dep 之前有没有添加过,添加过的话 那么就不添加了
if (dep.has(activeEffect)) return;
dep.add(activeEffect)
activeEffect.deps.push(dep); // 反向搜集
}
The text was updated successfully, but these errors were encountered: