vue 3.4.30 → 3.4.31
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/vue.cjs.js +1 -1
- package/dist/vue.cjs.prod.js +1 -1
- package/dist/vue.esm-browser.js +20 -35
- package/dist/vue.esm-browser.prod.js +6 -6
- package/dist/vue.esm-bundler.js +1 -1
- package/dist/vue.global.js +20 -35
- package/dist/vue.global.prod.js +6 -6
- package/dist/vue.runtime.esm-browser.js +20 -35
- package/dist/vue.runtime.esm-browser.prod.js +2 -2
- package/dist/vue.runtime.esm-bundler.js +1 -1
- package/dist/vue.runtime.global.js +20 -35
- package/dist/vue.runtime.global.prod.js +2 -2
- package/package.json +6 -6
package/dist/vue.cjs.js
CHANGED
package/dist/vue.cjs.prod.js
CHANGED
package/dist/vue.esm-browser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* vue v3.4.
|
|
2
|
+
* vue v3.4.31
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -327,11 +327,14 @@ function looseIndexOf(arr, val) {
|
|
|
327
327
|
return arr.findIndex((item) => looseEqual(item, val));
|
|
328
328
|
}
|
|
329
329
|
|
|
330
|
+
const isRef$1 = (val) => {
|
|
331
|
+
return !!(val && val.__v_isRef === true);
|
|
332
|
+
};
|
|
330
333
|
const toDisplayString = (val) => {
|
|
331
|
-
return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val);
|
|
334
|
+
return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef$1(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val);
|
|
332
335
|
};
|
|
333
336
|
const replacer = (_key, val) => {
|
|
334
|
-
if (val
|
|
337
|
+
if (isRef$1(val)) {
|
|
335
338
|
return replacer(_key, val.value);
|
|
336
339
|
} else if (isMap(val)) {
|
|
337
340
|
return {
|
|
@@ -478,7 +481,7 @@ class ReactiveEffect {
|
|
|
478
481
|
/**
|
|
479
482
|
* @internal
|
|
480
483
|
*/
|
|
481
|
-
this._dirtyLevel =
|
|
484
|
+
this._dirtyLevel = 4;
|
|
482
485
|
/**
|
|
483
486
|
* @internal
|
|
484
487
|
*/
|
|
@@ -498,20 +501,14 @@ class ReactiveEffect {
|
|
|
498
501
|
recordEffectScope(this, scope);
|
|
499
502
|
}
|
|
500
503
|
get dirty() {
|
|
501
|
-
if (this._dirtyLevel === 2)
|
|
502
|
-
return false;
|
|
503
|
-
if (this._dirtyLevel === 3 || this._dirtyLevel === 4) {
|
|
504
|
+
if (this._dirtyLevel === 2 || this._dirtyLevel === 3) {
|
|
504
505
|
this._dirtyLevel = 1;
|
|
505
506
|
pauseTracking();
|
|
506
507
|
for (let i = 0; i < this._depsLength; i++) {
|
|
507
508
|
const dep = this.deps[i];
|
|
508
509
|
if (dep.computed) {
|
|
509
|
-
if (dep.computed.effect._dirtyLevel === 2) {
|
|
510
|
-
resetTracking();
|
|
511
|
-
return true;
|
|
512
|
-
}
|
|
513
510
|
triggerComputed(dep.computed);
|
|
514
|
-
if (this._dirtyLevel >=
|
|
511
|
+
if (this._dirtyLevel >= 4) {
|
|
515
512
|
break;
|
|
516
513
|
}
|
|
517
514
|
}
|
|
@@ -521,10 +518,10 @@ class ReactiveEffect {
|
|
|
521
518
|
}
|
|
522
519
|
resetTracking();
|
|
523
520
|
}
|
|
524
|
-
return this._dirtyLevel >=
|
|
521
|
+
return this._dirtyLevel >= 4;
|
|
525
522
|
}
|
|
526
523
|
set dirty(v) {
|
|
527
|
-
this._dirtyLevel = v ?
|
|
524
|
+
this._dirtyLevel = v ? 4 : 0;
|
|
528
525
|
}
|
|
529
526
|
run() {
|
|
530
527
|
this._dirtyLevel = 0;
|
|
@@ -646,17 +643,8 @@ function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {
|
|
|
646
643
|
pauseScheduling();
|
|
647
644
|
for (const effect2 of dep.keys()) {
|
|
648
645
|
let tracking;
|
|
649
|
-
if (!dep.computed && effect2.computed) {
|
|
650
|
-
if (effect2._runnings > 0 && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
|
|
651
|
-
effect2._dirtyLevel = 2;
|
|
652
|
-
continue;
|
|
653
|
-
}
|
|
654
|
-
}
|
|
655
646
|
if (effect2._dirtyLevel < dirtyLevel && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
|
|
656
647
|
effect2._shouldSchedule || (effect2._shouldSchedule = effect2._dirtyLevel === 0);
|
|
657
|
-
if (effect2.computed && effect2._dirtyLevel === 2) {
|
|
658
|
-
effect2._shouldSchedule = true;
|
|
659
|
-
}
|
|
660
648
|
effect2._dirtyLevel = dirtyLevel;
|
|
661
649
|
}
|
|
662
650
|
if (effect2._shouldSchedule && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
|
|
@@ -664,7 +652,7 @@ function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {
|
|
|
664
652
|
(_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));
|
|
665
653
|
}
|
|
666
654
|
effect2.trigger();
|
|
667
|
-
if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !==
|
|
655
|
+
if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 2) {
|
|
668
656
|
effect2._shouldSchedule = false;
|
|
669
657
|
if (effect2.scheduler) {
|
|
670
658
|
queueEffectSchedulers.push(effect2.scheduler);
|
|
@@ -756,7 +744,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
756
744
|
if (dep) {
|
|
757
745
|
triggerEffects(
|
|
758
746
|
dep,
|
|
759
|
-
|
|
747
|
+
4,
|
|
760
748
|
{
|
|
761
749
|
target,
|
|
762
750
|
type,
|
|
@@ -1359,7 +1347,7 @@ class ComputedRefImpl {
|
|
|
1359
1347
|
() => getter(this._value),
|
|
1360
1348
|
() => triggerRefValue(
|
|
1361
1349
|
this,
|
|
1362
|
-
this.effect._dirtyLevel ===
|
|
1350
|
+
this.effect._dirtyLevel === 2 ? 2 : 3
|
|
1363
1351
|
)
|
|
1364
1352
|
);
|
|
1365
1353
|
this.effect.computed = this;
|
|
@@ -1368,11 +1356,8 @@ class ComputedRefImpl {
|
|
|
1368
1356
|
}
|
|
1369
1357
|
get value() {
|
|
1370
1358
|
const self = toRaw(this);
|
|
1371
|
-
const lastDirtyLevel = self.effect._dirtyLevel;
|
|
1372
1359
|
if ((!self._cacheable || self.effect.dirty) && hasChanged(self._value, self._value = self.effect.run())) {
|
|
1373
|
-
|
|
1374
|
-
triggerRefValue(self, 5);
|
|
1375
|
-
}
|
|
1360
|
+
triggerRefValue(self, 4);
|
|
1376
1361
|
}
|
|
1377
1362
|
trackRefValue(self);
|
|
1378
1363
|
if (self.effect._dirtyLevel >= 2) {
|
|
@@ -1381,7 +1366,7 @@ class ComputedRefImpl {
|
|
|
1381
1366
|
|
|
1382
1367
|
getter: `, this.getter);
|
|
1383
1368
|
}
|
|
1384
|
-
triggerRefValue(self,
|
|
1369
|
+
triggerRefValue(self, 2);
|
|
1385
1370
|
}
|
|
1386
1371
|
return self._value;
|
|
1387
1372
|
}
|
|
@@ -1436,7 +1421,7 @@ function trackRefValue(ref2) {
|
|
|
1436
1421
|
);
|
|
1437
1422
|
}
|
|
1438
1423
|
}
|
|
1439
|
-
function triggerRefValue(ref2, dirtyLevel =
|
|
1424
|
+
function triggerRefValue(ref2, dirtyLevel = 4, newVal, oldVal) {
|
|
1440
1425
|
ref2 = toRaw(ref2);
|
|
1441
1426
|
const dep = ref2.dep;
|
|
1442
1427
|
if (dep) {
|
|
@@ -1487,12 +1472,12 @@ class RefImpl {
|
|
|
1487
1472
|
const oldVal = this._rawValue;
|
|
1488
1473
|
this._rawValue = newVal;
|
|
1489
1474
|
this._value = useDirectValue ? newVal : toReactive(newVal);
|
|
1490
|
-
triggerRefValue(this,
|
|
1475
|
+
triggerRefValue(this, 4, newVal, oldVal);
|
|
1491
1476
|
}
|
|
1492
1477
|
}
|
|
1493
1478
|
}
|
|
1494
1479
|
function triggerRef(ref2) {
|
|
1495
|
-
triggerRefValue(ref2,
|
|
1480
|
+
triggerRefValue(ref2, 4, ref2.value );
|
|
1496
1481
|
}
|
|
1497
1482
|
function unref(ref2) {
|
|
1498
1483
|
return isRef(ref2) ? ref2.value : ref2;
|
|
@@ -9650,7 +9635,7 @@ function isMemoSame(cached, memo) {
|
|
|
9650
9635
|
return true;
|
|
9651
9636
|
}
|
|
9652
9637
|
|
|
9653
|
-
const version = "3.4.
|
|
9638
|
+
const version = "3.4.31";
|
|
9654
9639
|
const warn = warn$1 ;
|
|
9655
9640
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
9656
9641
|
const devtools = devtools$1 ;
|