@feng3d/reactivity 1.0.8 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +158 -158
- package/dist/index.js +4 -6
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +4 -6
- package/dist/index.umd.cjs.map +1 -1
- package/lib/batch.d.ts.map +1 -1
- package/lib/effectScope.d.ts.map +1 -1
- package/package.json +77 -69
- package/src/ReactiveObject.ts +130 -130
- package/src/Reactivity.ts +168 -168
- package/src/arrayInstrumentations.ts +801 -801
- package/src/baseHandlers.ts +312 -312
- package/src/batch.ts +130 -134
- package/src/collectionHandlers.ts +486 -486
- package/src/computed.ts +253 -253
- package/src/effect.ts +146 -146
- package/src/effectScope.ts +293 -294
- package/src/index.ts +10 -10
- package/src/property.ts +231 -231
- package/src/reactive.ts +186 -186
- package/src/ref.ts +150 -150
- package/src/shared/constants.ts +41 -41
- package/src/shared/general.ts +109 -109
- package/tsconfig.json +19 -19
package/dist/index.umd.cjs
CHANGED
|
@@ -69,15 +69,13 @@
|
|
|
69
69
|
let _shouldTrack = true;
|
|
70
70
|
function batch(dep, isRunning) {
|
|
71
71
|
if (isRunning) {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
console.warn("dep already in _isRunedDeps");
|
|
72
|
+
if (_isRunedDeps.indexOf(dep) !== -1) {
|
|
73
|
+
return;
|
|
75
74
|
}
|
|
76
75
|
_isRunedDeps.push(dep);
|
|
77
76
|
} else {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
console.warn("dep already in _needEffectDeps,存在多重依赖问题。可能是由于副作用中多次修改了同一个响应式对象。");
|
|
77
|
+
if (_needEffectDeps.indexOf(dep) !== -1) {
|
|
78
|
+
return;
|
|
81
79
|
}
|
|
82
80
|
_needEffectDeps.push(dep);
|
|
83
81
|
}
|