@vue/runtime-dom 3.5.5 → 3.5.6
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/dist/runtime-dom.cjs.js +1 -1
- package/dist/runtime-dom.cjs.prod.js +1 -1
- package/dist/runtime-dom.esm-browser.js +37 -35
- package/dist/runtime-dom.esm-browser.prod.js +2 -2
- package/dist/runtime-dom.esm-bundler.js +1 -1
- package/dist/runtime-dom.global.js +32 -31
- package/dist/runtime-dom.global.prod.js +2 -2
- package/package.json +4 -4
package/dist/runtime-dom.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.5.
|
|
2
|
+
* @vue/runtime-dom v3.5.6
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -465,7 +465,7 @@ class ReactiveEffect {
|
|
|
465
465
|
/**
|
|
466
466
|
* @internal
|
|
467
467
|
*/
|
|
468
|
-
this.
|
|
468
|
+
this.next = void 0;
|
|
469
469
|
/**
|
|
470
470
|
* @internal
|
|
471
471
|
*/
|
|
@@ -495,9 +495,7 @@ class ReactiveEffect {
|
|
|
495
495
|
return;
|
|
496
496
|
}
|
|
497
497
|
if (!(this.flags & 8)) {
|
|
498
|
-
this
|
|
499
|
-
this.nextEffect = batchedEffect;
|
|
500
|
-
batchedEffect = this;
|
|
498
|
+
batch(this);
|
|
501
499
|
}
|
|
502
500
|
}
|
|
503
501
|
run() {
|
|
@@ -558,7 +556,12 @@ class ReactiveEffect {
|
|
|
558
556
|
}
|
|
559
557
|
}
|
|
560
558
|
let batchDepth = 0;
|
|
561
|
-
let
|
|
559
|
+
let batchedSub;
|
|
560
|
+
function batch(sub) {
|
|
561
|
+
sub.flags |= 8;
|
|
562
|
+
sub.next = batchedSub;
|
|
563
|
+
batchedSub = sub;
|
|
564
|
+
}
|
|
562
565
|
function startBatch() {
|
|
563
566
|
batchDepth++;
|
|
564
567
|
}
|
|
@@ -567,15 +570,16 @@ function endBatch() {
|
|
|
567
570
|
return;
|
|
568
571
|
}
|
|
569
572
|
let error;
|
|
570
|
-
while (
|
|
571
|
-
let e =
|
|
572
|
-
|
|
573
|
+
while (batchedSub) {
|
|
574
|
+
let e = batchedSub;
|
|
575
|
+
batchedSub = void 0;
|
|
573
576
|
while (e) {
|
|
574
|
-
const next = e.
|
|
575
|
-
e.
|
|
577
|
+
const next = e.next;
|
|
578
|
+
e.next = void 0;
|
|
576
579
|
e.flags &= ~8;
|
|
577
580
|
if (e.flags & 1) {
|
|
578
581
|
try {
|
|
582
|
+
;
|
|
579
583
|
e.trigger();
|
|
580
584
|
} catch (err) {
|
|
581
585
|
if (!error) error = err;
|
|
@@ -615,7 +619,7 @@ function cleanupDeps(sub) {
|
|
|
615
619
|
}
|
|
616
620
|
function isDirty(sub) {
|
|
617
621
|
for (let link = sub.deps; link; link = link.nextDep) {
|
|
618
|
-
if (link.dep.version !== link.version || link.dep.computed && refreshComputed(link.dep.computed) || link.dep.version !== link.version) {
|
|
622
|
+
if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) {
|
|
619
623
|
return true;
|
|
620
624
|
}
|
|
621
625
|
}
|
|
@@ -635,7 +639,7 @@ function refreshComputed(computed) {
|
|
|
635
639
|
computed.globalVersion = globalVersion;
|
|
636
640
|
const dep = computed.dep;
|
|
637
641
|
computed.flags |= 2;
|
|
638
|
-
if (dep.version > 0 && !computed.isSSR && !isDirty(computed)) {
|
|
642
|
+
if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) {
|
|
639
643
|
computed.flags &= ~2;
|
|
640
644
|
return;
|
|
641
645
|
}
|
|
@@ -830,7 +834,10 @@ class Dep {
|
|
|
830
834
|
}
|
|
831
835
|
}
|
|
832
836
|
for (let link = this.subs; link; link = link.prevSub) {
|
|
833
|
-
link.sub.notify()
|
|
837
|
+
if (link.sub.notify()) {
|
|
838
|
+
;
|
|
839
|
+
link.sub.dep.notify();
|
|
840
|
+
}
|
|
834
841
|
}
|
|
835
842
|
} finally {
|
|
836
843
|
endBatch();
|
|
@@ -1899,8 +1906,10 @@ class ComputedRefImpl {
|
|
|
1899
1906
|
*/
|
|
1900
1907
|
notify() {
|
|
1901
1908
|
this.flags |= 16;
|
|
1902
|
-
if (
|
|
1903
|
-
|
|
1909
|
+
if (!(this.flags & 8) && // avoid infinite self recursion
|
|
1910
|
+
activeSub !== this) {
|
|
1911
|
+
batch(this);
|
|
1912
|
+
return true;
|
|
1904
1913
|
}
|
|
1905
1914
|
}
|
|
1906
1915
|
get value() {
|
|
@@ -2048,20 +2057,12 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
|
2048
2057
|
remove(scope.effects, effect);
|
|
2049
2058
|
}
|
|
2050
2059
|
};
|
|
2051
|
-
if (once) {
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
};
|
|
2058
|
-
} else {
|
|
2059
|
-
const _getter = getter;
|
|
2060
|
-
getter = () => {
|
|
2061
|
-
_getter();
|
|
2062
|
-
watchHandle();
|
|
2063
|
-
};
|
|
2064
|
-
}
|
|
2060
|
+
if (once && cb) {
|
|
2061
|
+
const _cb = cb;
|
|
2062
|
+
cb = (...args) => {
|
|
2063
|
+
_cb(...args);
|
|
2064
|
+
watchHandle();
|
|
2065
|
+
};
|
|
2065
2066
|
}
|
|
2066
2067
|
let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
|
|
2067
2068
|
const job = (immediateFirstRun) => {
|
|
@@ -8206,11 +8207,12 @@ function doWatch(source, cb, options = EMPTY_OBJ) {
|
|
|
8206
8207
|
} else if (!cb || immediate) {
|
|
8207
8208
|
baseWatchOptions.once = true;
|
|
8208
8209
|
} else {
|
|
8209
|
-
|
|
8210
|
-
stop: NOOP,
|
|
8211
|
-
resume: NOOP,
|
|
8212
|
-
pause: NOOP
|
|
8210
|
+
const watchStopHandle = () => {
|
|
8213
8211
|
};
|
|
8212
|
+
watchStopHandle.stop = NOOP;
|
|
8213
|
+
watchStopHandle.resume = NOOP;
|
|
8214
|
+
watchStopHandle.pause = NOOP;
|
|
8215
|
+
return watchStopHandle;
|
|
8214
8216
|
}
|
|
8215
8217
|
}
|
|
8216
8218
|
const instance = currentInstance;
|
|
@@ -10395,7 +10397,7 @@ function isMemoSame(cached, memo) {
|
|
|
10395
10397
|
return true;
|
|
10396
10398
|
}
|
|
10397
10399
|
|
|
10398
|
-
const version = "3.5.
|
|
10400
|
+
const version = "3.5.6";
|
|
10399
10401
|
const warn = warn$1 ;
|
|
10400
10402
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
10401
10403
|
const devtools = devtools$1 ;
|