vue 3.2.27 → 3.2.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.esm-browser.js +152 -114
- package/dist/vue.esm-browser.prod.js +1 -1
- package/dist/vue.global.js +151 -113
- package/dist/vue.global.prod.js +1 -1
- package/dist/vue.runtime.esm-browser.js +136 -103
- package/dist/vue.runtime.esm-browser.prod.js +1 -1
- package/dist/vue.runtime.global.js +136 -102
- package/dist/vue.runtime.global.prod.js +1 -1
- package/package.json +9 -9
package/dist/vue.global.js
CHANGED
|
@@ -209,8 +209,20 @@ var Vue = (function (exports) {
|
|
|
209
209
|
'polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,' +
|
|
210
210
|
'text,textPath,title,tspan,unknown,use,view';
|
|
211
211
|
const VOID_TAGS = 'area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr';
|
|
212
|
+
/**
|
|
213
|
+
* Compiler only.
|
|
214
|
+
* Do NOT use in runtime code paths unless behind `true` flag.
|
|
215
|
+
*/
|
|
212
216
|
const isHTMLTag = /*#__PURE__*/ makeMap(HTML_TAGS);
|
|
217
|
+
/**
|
|
218
|
+
* Compiler only.
|
|
219
|
+
* Do NOT use in runtime code paths unless behind `true` flag.
|
|
220
|
+
*/
|
|
213
221
|
const isSVGTag = /*#__PURE__*/ makeMap(SVG_TAGS);
|
|
222
|
+
/**
|
|
223
|
+
* Compiler only.
|
|
224
|
+
* Do NOT use in runtime code paths unless behind `true` flag.
|
|
225
|
+
*/
|
|
214
226
|
const isVoidTag = /*#__PURE__*/ makeMap(VOID_TAGS);
|
|
215
227
|
|
|
216
228
|
function looseCompareArrays(a, b) {
|
|
@@ -268,13 +280,15 @@ var Vue = (function (exports) {
|
|
|
268
280
|
* @private
|
|
269
281
|
*/
|
|
270
282
|
const toDisplayString = (val) => {
|
|
271
|
-
return val
|
|
272
|
-
?
|
|
273
|
-
:
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
283
|
+
return isString(val)
|
|
284
|
+
? val
|
|
285
|
+
: val == null
|
|
286
|
+
? ''
|
|
287
|
+
: isArray(val) ||
|
|
288
|
+
(isObject(val) &&
|
|
289
|
+
(val.toString === objectToString || !isFunction(val.toString)))
|
|
290
|
+
? JSON.stringify(val, replacer, 2)
|
|
291
|
+
: String(val);
|
|
278
292
|
};
|
|
279
293
|
const replacer = (_key, val) => {
|
|
280
294
|
// can't use isRef here since @vue/shared has no deps
|
|
@@ -348,6 +362,7 @@ var Vue = (function (exports) {
|
|
|
348
362
|
'onVnodeBeforeMount,onVnodeMounted,' +
|
|
349
363
|
'onVnodeBeforeUpdate,onVnodeUpdated,' +
|
|
350
364
|
'onVnodeBeforeUnmount,onVnodeUnmounted');
|
|
365
|
+
const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo');
|
|
351
366
|
const cacheStringFunction = (fn) => {
|
|
352
367
|
const cache = Object.create(null);
|
|
353
368
|
return ((str) => {
|
|
@@ -413,7 +428,6 @@ var Vue = (function (exports) {
|
|
|
413
428
|
}
|
|
414
429
|
|
|
415
430
|
let activeEffectScope;
|
|
416
|
-
const effectScopeStack = [];
|
|
417
431
|
class EffectScope {
|
|
418
432
|
constructor(detached = false) {
|
|
419
433
|
this.active = true;
|
|
@@ -428,11 +442,11 @@ var Vue = (function (exports) {
|
|
|
428
442
|
run(fn) {
|
|
429
443
|
if (this.active) {
|
|
430
444
|
try {
|
|
431
|
-
this
|
|
445
|
+
activeEffectScope = this;
|
|
432
446
|
return fn();
|
|
433
447
|
}
|
|
434
448
|
finally {
|
|
435
|
-
this.
|
|
449
|
+
activeEffectScope = this.parent;
|
|
436
450
|
}
|
|
437
451
|
}
|
|
438
452
|
else {
|
|
@@ -440,23 +454,24 @@ var Vue = (function (exports) {
|
|
|
440
454
|
}
|
|
441
455
|
}
|
|
442
456
|
on() {
|
|
443
|
-
|
|
444
|
-
effectScopeStack.push(this);
|
|
445
|
-
activeEffectScope = this;
|
|
446
|
-
}
|
|
457
|
+
activeEffectScope = this;
|
|
447
458
|
}
|
|
448
459
|
off() {
|
|
449
|
-
|
|
450
|
-
effectScopeStack.pop();
|
|
451
|
-
activeEffectScope = effectScopeStack[effectScopeStack.length - 1];
|
|
452
|
-
}
|
|
460
|
+
activeEffectScope = this.parent;
|
|
453
461
|
}
|
|
454
462
|
stop(fromParent) {
|
|
455
463
|
if (this.active) {
|
|
456
|
-
|
|
457
|
-
this.
|
|
464
|
+
let i, l;
|
|
465
|
+
for (i = 0, l = this.effects.length; i < l; i++) {
|
|
466
|
+
this.effects[i].stop();
|
|
467
|
+
}
|
|
468
|
+
for (i = 0, l = this.cleanups.length; i < l; i++) {
|
|
469
|
+
this.cleanups[i]();
|
|
470
|
+
}
|
|
458
471
|
if (this.scopes) {
|
|
459
|
-
this.scopes.
|
|
472
|
+
for (i = 0, l = this.scopes.length; i < l; i++) {
|
|
473
|
+
this.scopes[i].stop(true);
|
|
474
|
+
}
|
|
460
475
|
}
|
|
461
476
|
// nested scope, dereference from parent to avoid memory leaks
|
|
462
477
|
if (this.parent && !fromParent) {
|
|
@@ -474,8 +489,7 @@ var Vue = (function (exports) {
|
|
|
474
489
|
function effectScope(detached) {
|
|
475
490
|
return new EffectScope(detached);
|
|
476
491
|
}
|
|
477
|
-
function recordEffectScope(effect, scope) {
|
|
478
|
-
scope = scope || activeEffectScope;
|
|
492
|
+
function recordEffectScope(effect, scope = activeEffectScope) {
|
|
479
493
|
if (scope && scope.active) {
|
|
480
494
|
scope.effects.push(effect);
|
|
481
495
|
}
|
|
@@ -538,7 +552,6 @@ var Vue = (function (exports) {
|
|
|
538
552
|
* When recursion depth is greater, fall back to using a full cleanup.
|
|
539
553
|
*/
|
|
540
554
|
const maxMarkerBits = 30;
|
|
541
|
-
const effectStack = [];
|
|
542
555
|
let activeEffect;
|
|
543
556
|
const ITERATE_KEY = Symbol('iterate' );
|
|
544
557
|
const MAP_KEY_ITERATE_KEY = Symbol('Map key iterate' );
|
|
@@ -548,35 +561,42 @@ var Vue = (function (exports) {
|
|
|
548
561
|
this.scheduler = scheduler;
|
|
549
562
|
this.active = true;
|
|
550
563
|
this.deps = [];
|
|
564
|
+
this.parent = undefined;
|
|
551
565
|
recordEffectScope(this, scope);
|
|
552
566
|
}
|
|
553
567
|
run() {
|
|
554
568
|
if (!this.active) {
|
|
555
569
|
return this.fn();
|
|
556
570
|
}
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
if (effectTrackDepth <= maxMarkerBits) {
|
|
563
|
-
initDepMarkers(this);
|
|
564
|
-
}
|
|
565
|
-
else {
|
|
566
|
-
cleanupEffect(this);
|
|
567
|
-
}
|
|
568
|
-
return this.fn();
|
|
571
|
+
let parent = activeEffect;
|
|
572
|
+
let lastShouldTrack = shouldTrack;
|
|
573
|
+
while (parent) {
|
|
574
|
+
if (parent === this) {
|
|
575
|
+
return;
|
|
569
576
|
}
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
577
|
+
parent = parent.parent;
|
|
578
|
+
}
|
|
579
|
+
try {
|
|
580
|
+
this.parent = activeEffect;
|
|
581
|
+
activeEffect = this;
|
|
582
|
+
shouldTrack = true;
|
|
583
|
+
trackOpBit = 1 << ++effectTrackDepth;
|
|
584
|
+
if (effectTrackDepth <= maxMarkerBits) {
|
|
585
|
+
initDepMarkers(this);
|
|
586
|
+
}
|
|
587
|
+
else {
|
|
588
|
+
cleanupEffect(this);
|
|
589
|
+
}
|
|
590
|
+
return this.fn();
|
|
591
|
+
}
|
|
592
|
+
finally {
|
|
593
|
+
if (effectTrackDepth <= maxMarkerBits) {
|
|
594
|
+
finalizeDepMarkers(this);
|
|
579
595
|
}
|
|
596
|
+
trackOpBit = 1 << --effectTrackDepth;
|
|
597
|
+
activeEffect = this.parent;
|
|
598
|
+
shouldTrack = lastShouldTrack;
|
|
599
|
+
this.parent = undefined;
|
|
580
600
|
}
|
|
581
601
|
}
|
|
582
602
|
stop() {
|
|
@@ -624,32 +644,24 @@ var Vue = (function (exports) {
|
|
|
624
644
|
trackStack.push(shouldTrack);
|
|
625
645
|
shouldTrack = false;
|
|
626
646
|
}
|
|
627
|
-
function enableTracking() {
|
|
628
|
-
trackStack.push(shouldTrack);
|
|
629
|
-
shouldTrack = true;
|
|
630
|
-
}
|
|
631
647
|
function resetTracking() {
|
|
632
648
|
const last = trackStack.pop();
|
|
633
649
|
shouldTrack = last === undefined ? true : last;
|
|
634
650
|
}
|
|
635
651
|
function track(target, type, key) {
|
|
636
|
-
if (
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
652
|
+
if (shouldTrack && activeEffect) {
|
|
653
|
+
let depsMap = targetMap.get(target);
|
|
654
|
+
if (!depsMap) {
|
|
655
|
+
targetMap.set(target, (depsMap = new Map()));
|
|
656
|
+
}
|
|
657
|
+
let dep = depsMap.get(key);
|
|
658
|
+
if (!dep) {
|
|
659
|
+
depsMap.set(key, (dep = createDep()));
|
|
660
|
+
}
|
|
661
|
+
const eventInfo = { effect: activeEffect, target, type, key }
|
|
662
|
+
;
|
|
663
|
+
trackEffects(dep, eventInfo);
|
|
646
664
|
}
|
|
647
|
-
const eventInfo = { effect: activeEffect, target, type, key }
|
|
648
|
-
;
|
|
649
|
-
trackEffects(dep, eventInfo);
|
|
650
|
-
}
|
|
651
|
-
function isTracking() {
|
|
652
|
-
return shouldTrack && activeEffect !== undefined;
|
|
653
665
|
}
|
|
654
666
|
function trackEffects(dep, debuggerEventExtraInfo) {
|
|
655
667
|
let shouldTrack = false;
|
|
@@ -810,6 +822,9 @@ var Vue = (function (exports) {
|
|
|
810
822
|
else if (key === "__v_isReadonly" /* IS_READONLY */) {
|
|
811
823
|
return isReadonly;
|
|
812
824
|
}
|
|
825
|
+
else if (key === "__v_isShallow" /* IS_SHALLOW */) {
|
|
826
|
+
return shallow;
|
|
827
|
+
}
|
|
813
828
|
else if (key === "__v_raw" /* RAW */ &&
|
|
814
829
|
receiver ===
|
|
815
830
|
(isReadonly
|
|
@@ -854,9 +869,14 @@ var Vue = (function (exports) {
|
|
|
854
869
|
function createSetter(shallow = false) {
|
|
855
870
|
return function set(target, key, value, receiver) {
|
|
856
871
|
let oldValue = target[key];
|
|
872
|
+
if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) {
|
|
873
|
+
return false;
|
|
874
|
+
}
|
|
857
875
|
if (!shallow && !isReadonly(value)) {
|
|
858
|
-
|
|
859
|
-
|
|
876
|
+
if (!isShallow(value)) {
|
|
877
|
+
value = toRaw(value);
|
|
878
|
+
oldValue = toRaw(oldValue);
|
|
879
|
+
}
|
|
860
880
|
if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
|
|
861
881
|
oldValue.value = value;
|
|
862
882
|
return true;
|
|
@@ -1243,7 +1263,7 @@ var Vue = (function (exports) {
|
|
|
1243
1263
|
}
|
|
1244
1264
|
function reactive(target) {
|
|
1245
1265
|
// if trying to observe a readonly proxy, return the readonly version.
|
|
1246
|
-
if (target
|
|
1266
|
+
if (isReadonly(target)) {
|
|
1247
1267
|
return target;
|
|
1248
1268
|
}
|
|
1249
1269
|
return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap);
|
|
@@ -1308,6 +1328,9 @@ var Vue = (function (exports) {
|
|
|
1308
1328
|
function isReadonly(value) {
|
|
1309
1329
|
return !!(value && value["__v_isReadonly" /* IS_READONLY */]);
|
|
1310
1330
|
}
|
|
1331
|
+
function isShallow(value) {
|
|
1332
|
+
return !!(value && value["__v_isShallow" /* IS_SHALLOW */]);
|
|
1333
|
+
}
|
|
1311
1334
|
function isProxy(value) {
|
|
1312
1335
|
return isReactive(value) || isReadonly(value);
|
|
1313
1336
|
}
|
|
@@ -1323,13 +1346,10 @@ var Vue = (function (exports) {
|
|
|
1323
1346
|
const toReadonly = (value) => isObject(value) ? readonly(value) : value;
|
|
1324
1347
|
|
|
1325
1348
|
function trackRefValue(ref) {
|
|
1326
|
-
if (
|
|
1349
|
+
if (shouldTrack && activeEffect) {
|
|
1327
1350
|
ref = toRaw(ref);
|
|
1328
|
-
if (!ref.dep) {
|
|
1329
|
-
ref.dep = createDep();
|
|
1330
|
-
}
|
|
1331
1351
|
{
|
|
1332
|
-
trackEffects(ref.dep, {
|
|
1352
|
+
trackEffects(ref.dep || (ref.dep = createDep()), {
|
|
1333
1353
|
target: ref,
|
|
1334
1354
|
type: "get" /* GET */,
|
|
1335
1355
|
key: 'value'
|
|
@@ -1351,7 +1371,7 @@ var Vue = (function (exports) {
|
|
|
1351
1371
|
}
|
|
1352
1372
|
}
|
|
1353
1373
|
function isRef(r) {
|
|
1354
|
-
return
|
|
1374
|
+
return !!(r && r.__v_isRef === true);
|
|
1355
1375
|
}
|
|
1356
1376
|
function ref(value) {
|
|
1357
1377
|
return createRef(value, false);
|
|
@@ -1366,22 +1386,22 @@ var Vue = (function (exports) {
|
|
|
1366
1386
|
return new RefImpl(rawValue, shallow);
|
|
1367
1387
|
}
|
|
1368
1388
|
class RefImpl {
|
|
1369
|
-
constructor(value,
|
|
1370
|
-
this.
|
|
1389
|
+
constructor(value, __v_isShallow) {
|
|
1390
|
+
this.__v_isShallow = __v_isShallow;
|
|
1371
1391
|
this.dep = undefined;
|
|
1372
1392
|
this.__v_isRef = true;
|
|
1373
|
-
this._rawValue =
|
|
1374
|
-
this._value =
|
|
1393
|
+
this._rawValue = __v_isShallow ? value : toRaw(value);
|
|
1394
|
+
this._value = __v_isShallow ? value : toReactive(value);
|
|
1375
1395
|
}
|
|
1376
1396
|
get value() {
|
|
1377
1397
|
trackRefValue(this);
|
|
1378
1398
|
return this._value;
|
|
1379
1399
|
}
|
|
1380
1400
|
set value(newVal) {
|
|
1381
|
-
newVal = this.
|
|
1401
|
+
newVal = this.__v_isShallow ? newVal : toRaw(newVal);
|
|
1382
1402
|
if (hasChanged(newVal, this._rawValue)) {
|
|
1383
1403
|
this._rawValue = newVal;
|
|
1384
|
-
this._value = this.
|
|
1404
|
+
this._value = this.__v_isShallow ? newVal : toReactive(newVal);
|
|
1385
1405
|
triggerRefValue(this, newVal);
|
|
1386
1406
|
}
|
|
1387
1407
|
}
|
|
@@ -1464,22 +1484,23 @@ var Vue = (function (exports) {
|
|
|
1464
1484
|
constructor(getter, _setter, isReadonly, isSSR) {
|
|
1465
1485
|
this._setter = _setter;
|
|
1466
1486
|
this.dep = undefined;
|
|
1467
|
-
this._dirty = true;
|
|
1468
1487
|
this.__v_isRef = true;
|
|
1488
|
+
this._dirty = true;
|
|
1469
1489
|
this.effect = new ReactiveEffect(getter, () => {
|
|
1470
1490
|
if (!this._dirty) {
|
|
1471
1491
|
this._dirty = true;
|
|
1472
1492
|
triggerRefValue(this);
|
|
1473
1493
|
}
|
|
1474
1494
|
});
|
|
1475
|
-
this.effect.
|
|
1495
|
+
this.effect.computed = this;
|
|
1496
|
+
this.effect.active = this._cacheable = !isSSR;
|
|
1476
1497
|
this["__v_isReadonly" /* IS_READONLY */] = isReadonly;
|
|
1477
1498
|
}
|
|
1478
1499
|
get value() {
|
|
1479
1500
|
// the computed ref may get wrapped by other proxies e.g. readonly() #3376
|
|
1480
1501
|
const self = toRaw(this);
|
|
1481
1502
|
trackRefValue(self);
|
|
1482
|
-
if (self._dirty) {
|
|
1503
|
+
if (self._dirty || !self._cacheable) {
|
|
1483
1504
|
self._dirty = false;
|
|
1484
1505
|
self._value = self.effect.run();
|
|
1485
1506
|
}
|
|
@@ -1656,7 +1677,7 @@ var Vue = (function (exports) {
|
|
|
1656
1677
|
[12 /* FUNCTION_REF */]: 'ref function',
|
|
1657
1678
|
[13 /* ASYNC_COMPONENT_LOADER */]: 'async component loader',
|
|
1658
1679
|
[14 /* SCHEDULER */]: 'scheduler flush. This is likely a Vue internals bug. ' +
|
|
1659
|
-
'Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/
|
|
1680
|
+
'Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core'
|
|
1660
1681
|
};
|
|
1661
1682
|
function callWithErrorHandling(fn, instance, type, args) {
|
|
1662
1683
|
let res;
|
|
@@ -3117,7 +3138,7 @@ var Vue = (function (exports) {
|
|
|
3117
3138
|
if (instance) {
|
|
3118
3139
|
// #2400
|
|
3119
3140
|
// to support `app.use` plugins,
|
|
3120
|
-
// fallback to appContext's `provides` if the
|
|
3141
|
+
// fallback to appContext's `provides` if the instance is at root
|
|
3121
3142
|
const provides = instance.parent == null
|
|
3122
3143
|
? instance.vnode.appContext && instance.vnode.appContext.provides
|
|
3123
3144
|
: instance.parent.provides;
|
|
@@ -3183,7 +3204,7 @@ var Vue = (function (exports) {
|
|
|
3183
3204
|
let isMultiSource = false;
|
|
3184
3205
|
if (isRef(source)) {
|
|
3185
3206
|
getter = () => source.value;
|
|
3186
|
-
forceTrigger =
|
|
3207
|
+
forceTrigger = isShallow(source);
|
|
3187
3208
|
}
|
|
3188
3209
|
else if (isReactive(source)) {
|
|
3189
3210
|
getter = () => source;
|
|
@@ -4058,7 +4079,7 @@ var Vue = (function (exports) {
|
|
|
4058
4079
|
return pattern.some((p) => matches(p, name));
|
|
4059
4080
|
}
|
|
4060
4081
|
else if (isString(pattern)) {
|
|
4061
|
-
return pattern.split(',').
|
|
4082
|
+
return pattern.split(',').includes(name);
|
|
4062
4083
|
}
|
|
4063
4084
|
else if (pattern.test) {
|
|
4064
4085
|
return pattern.test(name);
|
|
@@ -4311,7 +4332,7 @@ var Vue = (function (exports) {
|
|
|
4311
4332
|
warn$1(`Write operation failed: computed property "${key}" is readonly.`);
|
|
4312
4333
|
}
|
|
4313
4334
|
;
|
|
4314
|
-
const c = computed({
|
|
4335
|
+
const c = computed$1({
|
|
4315
4336
|
get,
|
|
4316
4337
|
set
|
|
4317
4338
|
});
|
|
@@ -4710,7 +4731,9 @@ var Vue = (function (exports) {
|
|
|
4710
4731
|
// attrs point to the same object so it should already have been updated.
|
|
4711
4732
|
if (attrs !== rawCurrentProps) {
|
|
4712
4733
|
for (const key in attrs) {
|
|
4713
|
-
if (!rawProps ||
|
|
4734
|
+
if (!rawProps ||
|
|
4735
|
+
(!hasOwn(rawProps, key) &&
|
|
4736
|
+
(!false ))) {
|
|
4714
4737
|
delete attrs[key];
|
|
4715
4738
|
hasAttrsChanged = true;
|
|
4716
4739
|
}
|
|
@@ -5160,7 +5183,6 @@ var Vue = (function (exports) {
|
|
|
5160
5183
|
[bar, this.y]
|
|
5161
5184
|
])
|
|
5162
5185
|
*/
|
|
5163
|
-
const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo');
|
|
5164
5186
|
function validateDirectiveName(name) {
|
|
5165
5187
|
if (isBuiltInDirective(name)) {
|
|
5166
5188
|
warn$1('Do not use built-in directive ids as custom directive id: ' + name);
|
|
@@ -5641,7 +5663,8 @@ var Vue = (function (exports) {
|
|
|
5641
5663
|
// e.g. <option :value="obj">, <input type="checkbox" :true-value="1">
|
|
5642
5664
|
const forcePatchValue = (type === 'input' && dirs) || type === 'option';
|
|
5643
5665
|
// skip props & children if this is hoisted static nodes
|
|
5644
|
-
|
|
5666
|
+
// #5405 in dev, always hydrate children for HMR
|
|
5667
|
+
{
|
|
5645
5668
|
if (dirs) {
|
|
5646
5669
|
invokeDirectiveHook(vnode, null, parentComponent, 'created');
|
|
5647
5670
|
}
|
|
@@ -5806,6 +5829,7 @@ var Vue = (function (exports) {
|
|
|
5806
5829
|
return [hydrate, hydrateNode];
|
|
5807
5830
|
}
|
|
5808
5831
|
|
|
5832
|
+
/* eslint-disable no-restricted-globals */
|
|
5809
5833
|
let supported;
|
|
5810
5834
|
let perf;
|
|
5811
5835
|
function startMeasure(instance, type) {
|
|
@@ -5833,7 +5857,6 @@ var Vue = (function (exports) {
|
|
|
5833
5857
|
if (supported !== undefined) {
|
|
5834
5858
|
return supported;
|
|
5835
5859
|
}
|
|
5836
|
-
/* eslint-disable no-restricted-globals */
|
|
5837
5860
|
if (typeof window !== 'undefined' && window.performance) {
|
|
5838
5861
|
supported = true;
|
|
5839
5862
|
perf = window.performance;
|
|
@@ -5841,7 +5864,6 @@ var Vue = (function (exports) {
|
|
|
5841
5864
|
else {
|
|
5842
5865
|
supported = false;
|
|
5843
5866
|
}
|
|
5844
|
-
/* eslint-enable no-restricted-globals */
|
|
5845
5867
|
return supported;
|
|
5846
5868
|
}
|
|
5847
5869
|
|
|
@@ -7718,7 +7740,7 @@ var Vue = (function (exports) {
|
|
|
7718
7740
|
shapeFlag: vnode.shapeFlag,
|
|
7719
7741
|
// if the vnode is cloned with extra props, we can no longer assume its
|
|
7720
7742
|
// existing patch flag to be reliable and need to add the FULL_PROPS flag.
|
|
7721
|
-
// note:
|
|
7743
|
+
// note: preserve flag for fragments since they use the flag for children
|
|
7722
7744
|
// fast paths only.
|
|
7723
7745
|
patchFlag: extraProps && vnode.type !== Fragment
|
|
7724
7746
|
? patchFlag === -1 // hoisted node
|
|
@@ -7880,7 +7902,8 @@ var Vue = (function (exports) {
|
|
|
7880
7902
|
else if (isOn(key)) {
|
|
7881
7903
|
const existing = ret[key];
|
|
7882
7904
|
const incoming = toMerge[key];
|
|
7883
|
-
if (
|
|
7905
|
+
if (incoming &&
|
|
7906
|
+
existing !== incoming &&
|
|
7884
7907
|
!(isArray(existing) && existing.includes(incoming))) {
|
|
7885
7908
|
ret[key] = existing
|
|
7886
7909
|
? [].concat(existing, incoming)
|
|
@@ -8175,9 +8198,11 @@ var Vue = (function (exports) {
|
|
|
8175
8198
|
const { data, setupState, ctx } = instance;
|
|
8176
8199
|
if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) {
|
|
8177
8200
|
setupState[key] = value;
|
|
8201
|
+
return true;
|
|
8178
8202
|
}
|
|
8179
8203
|
else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
|
|
8180
8204
|
data[key] = value;
|
|
8205
|
+
return true;
|
|
8181
8206
|
}
|
|
8182
8207
|
else if (hasOwn(instance.props, key)) {
|
|
8183
8208
|
warn$1(`Attempting to mutate prop "${key}". Props are readonly.`, instance);
|
|
@@ -8211,6 +8236,15 @@ var Vue = (function (exports) {
|
|
|
8211
8236
|
hasOwn(ctx, key) ||
|
|
8212
8237
|
hasOwn(publicPropertiesMap, key) ||
|
|
8213
8238
|
hasOwn(appContext.config.globalProperties, key));
|
|
8239
|
+
},
|
|
8240
|
+
defineProperty(target, key, descriptor) {
|
|
8241
|
+
if (descriptor.get != null) {
|
|
8242
|
+
this.set(target, key, descriptor.get(), null);
|
|
8243
|
+
}
|
|
8244
|
+
else if (descriptor.value != null) {
|
|
8245
|
+
this.set(target, key, descriptor.value, null);
|
|
8246
|
+
}
|
|
8247
|
+
return Reflect.defineProperty(target, key, descriptor);
|
|
8214
8248
|
}
|
|
8215
8249
|
};
|
|
8216
8250
|
{
|
|
@@ -8700,7 +8734,7 @@ var Vue = (function (exports) {
|
|
|
8700
8734
|
* instance properties when it is accessed by a parent component via template
|
|
8701
8735
|
* refs.
|
|
8702
8736
|
*
|
|
8703
|
-
* `<script setup>` components are closed by default - i.e.
|
|
8737
|
+
* `<script setup>` components are closed by default - i.e. variables inside
|
|
8704
8738
|
* the `<script setup>` scope is not exposed to parent unless explicitly exposed
|
|
8705
8739
|
* via `defineExpose`.
|
|
8706
8740
|
*
|
|
@@ -8898,7 +8932,7 @@ var Vue = (function (exports) {
|
|
|
8898
8932
|
return [
|
|
8899
8933
|
'div',
|
|
8900
8934
|
{},
|
|
8901
|
-
['span', vueStyle, 'Reactive'],
|
|
8935
|
+
['span', vueStyle, isShallow(obj) ? 'ShallowReactive' : 'Reactive'],
|
|
8902
8936
|
'<',
|
|
8903
8937
|
formatValue(obj),
|
|
8904
8938
|
`>${isReadonly(obj) ? ` (readonly)` : ``}`
|
|
@@ -8908,7 +8942,7 @@ var Vue = (function (exports) {
|
|
|
8908
8942
|
return [
|
|
8909
8943
|
'div',
|
|
8910
8944
|
{},
|
|
8911
|
-
['span', vueStyle, 'Readonly'],
|
|
8945
|
+
['span', vueStyle, isShallow(obj) ? 'ShallowReadonly' : 'Readonly'],
|
|
8912
8946
|
'<',
|
|
8913
8947
|
formatValue(obj),
|
|
8914
8948
|
'>'
|
|
@@ -9037,7 +9071,7 @@ var Vue = (function (exports) {
|
|
|
9037
9071
|
}
|
|
9038
9072
|
}
|
|
9039
9073
|
function genRefFlag(v) {
|
|
9040
|
-
if (v
|
|
9074
|
+
if (isShallow(v)) {
|
|
9041
9075
|
return `ShallowRef`;
|
|
9042
9076
|
}
|
|
9043
9077
|
if (v.effect) {
|
|
@@ -9081,7 +9115,7 @@ var Vue = (function (exports) {
|
|
|
9081
9115
|
}
|
|
9082
9116
|
|
|
9083
9117
|
// Core API ------------------------------------------------------------------
|
|
9084
|
-
const version = "3.2.
|
|
9118
|
+
const version = "3.2.31";
|
|
9085
9119
|
/**
|
|
9086
9120
|
* SSR utils for \@vue/server-renderer. Only exposed in cjs builds.
|
|
9087
9121
|
* @internal
|
|
@@ -9155,7 +9189,10 @@ var Vue = (function (exports) {
|
|
|
9155
9189
|
insertStaticContent(content, parent, anchor, isSVG, start, end) {
|
|
9156
9190
|
// <parent> before | first ... last | anchor </parent>
|
|
9157
9191
|
const before = anchor ? anchor.previousSibling : parent.lastChild;
|
|
9158
|
-
|
|
9192
|
+
// #5308 can only take cached path if:
|
|
9193
|
+
// - has a single root node
|
|
9194
|
+
// - nextSibling info is still available
|
|
9195
|
+
if (start && (start === end || start.nextSibling)) {
|
|
9159
9196
|
// cached
|
|
9160
9197
|
while (true) {
|
|
9161
9198
|
parent.insertBefore(start.cloneNode(true), anchor);
|
|
@@ -9468,7 +9505,7 @@ var Vue = (function (exports) {
|
|
|
9468
9505
|
originalStop.call(e);
|
|
9469
9506
|
e._stopped = true;
|
|
9470
9507
|
};
|
|
9471
|
-
return value.map(fn => (e) => !e._stopped && fn(e));
|
|
9508
|
+
return value.map(fn => (e) => !e._stopped && fn && fn(e));
|
|
9472
9509
|
}
|
|
9473
9510
|
else {
|
|
9474
9511
|
return value;
|
|
@@ -11346,13 +11383,13 @@ var Vue = (function (exports) {
|
|
|
11346
11383
|
message: `Platform-native elements with "is" prop will no longer be ` +
|
|
11347
11384
|
`treated as components in Vue 3 unless the "is" value is explicitly ` +
|
|
11348
11385
|
`prefixed with "vue:".`,
|
|
11349
|
-
link: `https://v3.vuejs.org/
|
|
11386
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html`
|
|
11350
11387
|
},
|
|
11351
11388
|
["COMPILER_V_BIND_SYNC" /* COMPILER_V_BIND_SYNC */]: {
|
|
11352
11389
|
message: key => `.sync modifier for v-bind has been removed. Use v-model with ` +
|
|
11353
11390
|
`argument instead. \`v-bind:${key}.sync\` should be changed to ` +
|
|
11354
11391
|
`\`v-model:${key}\`.`,
|
|
11355
|
-
link: `https://v3.vuejs.org/
|
|
11392
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html`
|
|
11356
11393
|
},
|
|
11357
11394
|
["COMPILER_V_BIND_PROP" /* COMPILER_V_BIND_PROP */]: {
|
|
11358
11395
|
message: `.prop modifier for v-bind has been removed and no longer necessary. ` +
|
|
@@ -11364,11 +11401,11 @@ var Vue = (function (exports) {
|
|
|
11364
11401
|
`that appears before v-bind in the case of conflict. ` +
|
|
11365
11402
|
`To retain 2.x behavior, move v-bind to make it the first attribute. ` +
|
|
11366
11403
|
`You can also suppress this warning if the usage is intended.`,
|
|
11367
|
-
link: `https://v3.vuejs.org/
|
|
11404
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/v-bind.html`
|
|
11368
11405
|
},
|
|
11369
11406
|
["COMPILER_V_ON_NATIVE" /* COMPILER_V_ON_NATIVE */]: {
|
|
11370
11407
|
message: `.native modifier for v-on has been removed as is no longer necessary.`,
|
|
11371
|
-
link: `https://v3.vuejs.org/
|
|
11408
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html`
|
|
11372
11409
|
},
|
|
11373
11410
|
["COMPILER_V_IF_V_FOR_PRECEDENCE" /* COMPILER_V_IF_V_FOR_PRECEDENCE */]: {
|
|
11374
11411
|
message: `v-if / v-for precedence when used on the same element has changed ` +
|
|
@@ -11376,7 +11413,7 @@ var Vue = (function (exports) {
|
|
|
11376
11413
|
`access to v-for scope variables. It is best to avoid the ambiguity ` +
|
|
11377
11414
|
`with <template> tags or use a computed property that filters v-for ` +
|
|
11378
11415
|
`data source.`,
|
|
11379
|
-
link: `https://v3.vuejs.org/
|
|
11416
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html`
|
|
11380
11417
|
},
|
|
11381
11418
|
["COMPILER_NATIVE_TEMPLATE" /* COMPILER_NATIVE_TEMPLATE */]: {
|
|
11382
11419
|
message: `<template> with no special directives will render as a native template ` +
|
|
@@ -11384,13 +11421,13 @@ var Vue = (function (exports) {
|
|
|
11384
11421
|
},
|
|
11385
11422
|
["COMPILER_INLINE_TEMPLATE" /* COMPILER_INLINE_TEMPLATE */]: {
|
|
11386
11423
|
message: `"inline-template" has been removed in Vue 3.`,
|
|
11387
|
-
link: `https://v3.vuejs.org/
|
|
11424
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html`
|
|
11388
11425
|
},
|
|
11389
11426
|
["COMPILER_FILTER" /* COMPILER_FILTERS */]: {
|
|
11390
11427
|
message: `filters have been removed in Vue 3. ` +
|
|
11391
11428
|
`The "|" symbol will be treated as native JavaScript bitwise OR operator. ` +
|
|
11392
11429
|
`Use method calls or computed properties instead.`,
|
|
11393
|
-
link: `https://v3.vuejs.org/
|
|
11430
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/filters.html`
|
|
11394
11431
|
}
|
|
11395
11432
|
};
|
|
11396
11433
|
function getCompatValue(key, context) {
|
|
@@ -11875,7 +11912,7 @@ var Vue = (function (exports) {
|
|
|
11875
11912
|
}
|
|
11876
11913
|
const attr = parseAttribute(context, attributeNames);
|
|
11877
11914
|
// Trim whitespace between class
|
|
11878
|
-
// https://github.com/vuejs/
|
|
11915
|
+
// https://github.com/vuejs/core/issues/4251
|
|
11879
11916
|
if (attr.type === 6 /* ATTRIBUTE */ &&
|
|
11880
11917
|
attr.value &&
|
|
11881
11918
|
attr.name === 'class') {
|
|
@@ -12100,7 +12137,7 @@ var Vue = (function (exports) {
|
|
|
12100
12137
|
advanceBy(context, length);
|
|
12101
12138
|
if (mode === 2 /* RAWTEXT */ ||
|
|
12102
12139
|
mode === 3 /* CDATA */ ||
|
|
12103
|
-
rawText.
|
|
12140
|
+
!rawText.includes('&')) {
|
|
12104
12141
|
return rawText;
|
|
12105
12142
|
}
|
|
12106
12143
|
else {
|
|
@@ -13605,6 +13642,7 @@ var Vue = (function (exports) {
|
|
|
13605
13642
|
const renderExp = createCallExpression(helper(RENDER_LIST), [
|
|
13606
13643
|
forNode.source
|
|
13607
13644
|
]);
|
|
13645
|
+
const isTemplate = isTemplateNode(node);
|
|
13608
13646
|
const memo = findDir(node, 'memo');
|
|
13609
13647
|
const keyProp = findProp(node, `key`);
|
|
13610
13648
|
const keyExp = keyProp &&
|
|
@@ -13624,7 +13662,6 @@ var Vue = (function (exports) {
|
|
|
13624
13662
|
return () => {
|
|
13625
13663
|
// finish the codegen now that all children have been traversed
|
|
13626
13664
|
let childBlock;
|
|
13627
|
-
const isTemplate = isTemplateNode(node);
|
|
13628
13665
|
const { children } = forNode;
|
|
13629
13666
|
// check <template v-for> key placement
|
|
13630
13667
|
if (isTemplate) {
|
|
@@ -14394,7 +14431,7 @@ var Vue = (function (exports) {
|
|
|
14394
14431
|
}
|
|
14395
14432
|
}
|
|
14396
14433
|
}
|
|
14397
|
-
else {
|
|
14434
|
+
else if (!isBuiltInDirective(name)) {
|
|
14398
14435
|
// no built-in transform, this is a user custom directive.
|
|
14399
14436
|
runtimeDirectives.push(prop);
|
|
14400
14437
|
// custom dirs may use beforeUpdate so they need to force blocks
|
|
@@ -15625,6 +15662,7 @@ var Vue = (function (exports) {
|
|
|
15625
15662
|
exports.isReadonly = isReadonly;
|
|
15626
15663
|
exports.isRef = isRef;
|
|
15627
15664
|
exports.isRuntimeOnly = isRuntimeOnly;
|
|
15665
|
+
exports.isShallow = isShallow;
|
|
15628
15666
|
exports.isVNode = isVNode;
|
|
15629
15667
|
exports.markRaw = markRaw;
|
|
15630
15668
|
exports.mergeDefaults = mergeDefaults;
|