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
|
@@ -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
|
**/
|
|
@@ -263,11 +263,14 @@ var Vue = (function (exports) {
|
|
|
263
263
|
return arr.findIndex((item) => looseEqual(item, val));
|
|
264
264
|
}
|
|
265
265
|
|
|
266
|
+
const isRef$1 = (val) => {
|
|
267
|
+
return !!(val && val.__v_isRef === true);
|
|
268
|
+
};
|
|
266
269
|
const toDisplayString = (val) => {
|
|
267
|
-
return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val);
|
|
270
|
+
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);
|
|
268
271
|
};
|
|
269
272
|
const replacer = (_key, val) => {
|
|
270
|
-
if (val
|
|
273
|
+
if (isRef$1(val)) {
|
|
271
274
|
return replacer(_key, val.value);
|
|
272
275
|
} else if (isMap(val)) {
|
|
273
276
|
return {
|
|
@@ -414,7 +417,7 @@ var Vue = (function (exports) {
|
|
|
414
417
|
/**
|
|
415
418
|
* @internal
|
|
416
419
|
*/
|
|
417
|
-
this._dirtyLevel =
|
|
420
|
+
this._dirtyLevel = 4;
|
|
418
421
|
/**
|
|
419
422
|
* @internal
|
|
420
423
|
*/
|
|
@@ -434,20 +437,14 @@ var Vue = (function (exports) {
|
|
|
434
437
|
recordEffectScope(this, scope);
|
|
435
438
|
}
|
|
436
439
|
get dirty() {
|
|
437
|
-
if (this._dirtyLevel === 2)
|
|
438
|
-
return false;
|
|
439
|
-
if (this._dirtyLevel === 3 || this._dirtyLevel === 4) {
|
|
440
|
+
if (this._dirtyLevel === 2 || this._dirtyLevel === 3) {
|
|
440
441
|
this._dirtyLevel = 1;
|
|
441
442
|
pauseTracking();
|
|
442
443
|
for (let i = 0; i < this._depsLength; i++) {
|
|
443
444
|
const dep = this.deps[i];
|
|
444
445
|
if (dep.computed) {
|
|
445
|
-
if (dep.computed.effect._dirtyLevel === 2) {
|
|
446
|
-
resetTracking();
|
|
447
|
-
return true;
|
|
448
|
-
}
|
|
449
446
|
triggerComputed(dep.computed);
|
|
450
|
-
if (this._dirtyLevel >=
|
|
447
|
+
if (this._dirtyLevel >= 4) {
|
|
451
448
|
break;
|
|
452
449
|
}
|
|
453
450
|
}
|
|
@@ -457,10 +454,10 @@ var Vue = (function (exports) {
|
|
|
457
454
|
}
|
|
458
455
|
resetTracking();
|
|
459
456
|
}
|
|
460
|
-
return this._dirtyLevel >=
|
|
457
|
+
return this._dirtyLevel >= 4;
|
|
461
458
|
}
|
|
462
459
|
set dirty(v) {
|
|
463
|
-
this._dirtyLevel = v ?
|
|
460
|
+
this._dirtyLevel = v ? 4 : 0;
|
|
464
461
|
}
|
|
465
462
|
run() {
|
|
466
463
|
this._dirtyLevel = 0;
|
|
@@ -582,17 +579,8 @@ var Vue = (function (exports) {
|
|
|
582
579
|
pauseScheduling();
|
|
583
580
|
for (const effect2 of dep.keys()) {
|
|
584
581
|
let tracking;
|
|
585
|
-
if (!dep.computed && effect2.computed) {
|
|
586
|
-
if (effect2._runnings > 0 && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
|
|
587
|
-
effect2._dirtyLevel = 2;
|
|
588
|
-
continue;
|
|
589
|
-
}
|
|
590
|
-
}
|
|
591
582
|
if (effect2._dirtyLevel < dirtyLevel && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
|
|
592
583
|
effect2._shouldSchedule || (effect2._shouldSchedule = effect2._dirtyLevel === 0);
|
|
593
|
-
if (effect2.computed && effect2._dirtyLevel === 2) {
|
|
594
|
-
effect2._shouldSchedule = true;
|
|
595
|
-
}
|
|
596
584
|
effect2._dirtyLevel = dirtyLevel;
|
|
597
585
|
}
|
|
598
586
|
if (effect2._shouldSchedule && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
|
|
@@ -600,7 +588,7 @@ var Vue = (function (exports) {
|
|
|
600
588
|
(_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));
|
|
601
589
|
}
|
|
602
590
|
effect2.trigger();
|
|
603
|
-
if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !==
|
|
591
|
+
if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 2) {
|
|
604
592
|
effect2._shouldSchedule = false;
|
|
605
593
|
if (effect2.scheduler) {
|
|
606
594
|
queueEffectSchedulers.push(effect2.scheduler);
|
|
@@ -692,7 +680,7 @@ var Vue = (function (exports) {
|
|
|
692
680
|
if (dep) {
|
|
693
681
|
triggerEffects(
|
|
694
682
|
dep,
|
|
695
|
-
|
|
683
|
+
4,
|
|
696
684
|
{
|
|
697
685
|
target,
|
|
698
686
|
type,
|
|
@@ -1295,7 +1283,7 @@ var Vue = (function (exports) {
|
|
|
1295
1283
|
() => getter(this._value),
|
|
1296
1284
|
() => triggerRefValue(
|
|
1297
1285
|
this,
|
|
1298
|
-
this.effect._dirtyLevel ===
|
|
1286
|
+
this.effect._dirtyLevel === 2 ? 2 : 3
|
|
1299
1287
|
)
|
|
1300
1288
|
);
|
|
1301
1289
|
this.effect.computed = this;
|
|
@@ -1304,11 +1292,8 @@ var Vue = (function (exports) {
|
|
|
1304
1292
|
}
|
|
1305
1293
|
get value() {
|
|
1306
1294
|
const self = toRaw(this);
|
|
1307
|
-
const lastDirtyLevel = self.effect._dirtyLevel;
|
|
1308
1295
|
if ((!self._cacheable || self.effect.dirty) && hasChanged(self._value, self._value = self.effect.run())) {
|
|
1309
|
-
|
|
1310
|
-
triggerRefValue(self, 5);
|
|
1311
|
-
}
|
|
1296
|
+
triggerRefValue(self, 4);
|
|
1312
1297
|
}
|
|
1313
1298
|
trackRefValue(self);
|
|
1314
1299
|
if (self.effect._dirtyLevel >= 2) {
|
|
@@ -1317,7 +1302,7 @@ var Vue = (function (exports) {
|
|
|
1317
1302
|
|
|
1318
1303
|
getter: `, this.getter);
|
|
1319
1304
|
}
|
|
1320
|
-
triggerRefValue(self,
|
|
1305
|
+
triggerRefValue(self, 2);
|
|
1321
1306
|
}
|
|
1322
1307
|
return self._value;
|
|
1323
1308
|
}
|
|
@@ -1372,7 +1357,7 @@ getter: `, this.getter);
|
|
|
1372
1357
|
);
|
|
1373
1358
|
}
|
|
1374
1359
|
}
|
|
1375
|
-
function triggerRefValue(ref2, dirtyLevel =
|
|
1360
|
+
function triggerRefValue(ref2, dirtyLevel = 4, newVal, oldVal) {
|
|
1376
1361
|
ref2 = toRaw(ref2);
|
|
1377
1362
|
const dep = ref2.dep;
|
|
1378
1363
|
if (dep) {
|
|
@@ -1423,12 +1408,12 @@ getter: `, this.getter);
|
|
|
1423
1408
|
const oldVal = this._rawValue;
|
|
1424
1409
|
this._rawValue = newVal;
|
|
1425
1410
|
this._value = useDirectValue ? newVal : toReactive(newVal);
|
|
1426
|
-
triggerRefValue(this,
|
|
1411
|
+
triggerRefValue(this, 4, newVal, oldVal);
|
|
1427
1412
|
}
|
|
1428
1413
|
}
|
|
1429
1414
|
}
|
|
1430
1415
|
function triggerRef(ref2) {
|
|
1431
|
-
triggerRefValue(ref2,
|
|
1416
|
+
triggerRefValue(ref2, 4, ref2.value );
|
|
1432
1417
|
}
|
|
1433
1418
|
function unref(ref2) {
|
|
1434
1419
|
return isRef(ref2) ? ref2.value : ref2;
|
|
@@ -9580,7 +9565,7 @@ Component that was made reactive: `,
|
|
|
9580
9565
|
return true;
|
|
9581
9566
|
}
|
|
9582
9567
|
|
|
9583
|
-
const version = "3.4.
|
|
9568
|
+
const version = "3.4.31";
|
|
9584
9569
|
const warn = warn$1 ;
|
|
9585
9570
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
9586
9571
|
const devtools = devtools$1 ;
|