vue 3.5.12 → 3.5.14
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/README.md +1 -1
- package/dist/vue.cjs.js +1 -1
- package/dist/vue.cjs.prod.js +1 -1
- package/dist/vue.esm-browser.js +190 -79
- package/dist/vue.esm-browser.prod.js +9 -6
- package/dist/vue.esm-bundler.js +1 -1
- package/dist/vue.global.js +190 -79
- package/dist/vue.global.prod.js +9 -6
- package/dist/vue.runtime.esm-browser.js +162 -69
- package/dist/vue.runtime.esm-browser.prod.js +3 -2
- package/dist/vue.runtime.esm-bundler.js +1 -1
- package/dist/vue.runtime.global.js +162 -69
- package/dist/vue.runtime.global.prod.js +3 -2
- package/package.json +6 -6
package/dist/vue.esm-browser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* vue v3.5.
|
|
2
|
+
* vue v3.5.14
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -212,10 +212,9 @@ function parseStringStyle(cssText) {
|
|
|
212
212
|
return ret;
|
|
213
213
|
}
|
|
214
214
|
function stringifyStyle(styles) {
|
|
215
|
+
if (!styles) return "";
|
|
216
|
+
if (isString(styles)) return styles;
|
|
215
217
|
let ret = "";
|
|
216
|
-
if (!styles || isString(styles)) {
|
|
217
|
-
return ret;
|
|
218
|
-
}
|
|
219
218
|
for (const key in styles) {
|
|
220
219
|
const value = styles[key];
|
|
221
220
|
if (isString(value) || typeof value === "number") {
|
|
@@ -397,6 +396,10 @@ class EffectScope {
|
|
|
397
396
|
* @internal
|
|
398
397
|
*/
|
|
399
398
|
this._active = true;
|
|
399
|
+
/**
|
|
400
|
+
* @internal track `on` calls, allow `on` call multiple times
|
|
401
|
+
*/
|
|
402
|
+
this._on = 0;
|
|
400
403
|
/**
|
|
401
404
|
* @internal
|
|
402
405
|
*/
|
|
@@ -467,28 +470,38 @@ class EffectScope {
|
|
|
467
470
|
* @internal
|
|
468
471
|
*/
|
|
469
472
|
on() {
|
|
470
|
-
|
|
473
|
+
if (++this._on === 1) {
|
|
474
|
+
this.prevScope = activeEffectScope;
|
|
475
|
+
activeEffectScope = this;
|
|
476
|
+
}
|
|
471
477
|
}
|
|
472
478
|
/**
|
|
473
479
|
* This should only be called on non-detached scopes
|
|
474
480
|
* @internal
|
|
475
481
|
*/
|
|
476
482
|
off() {
|
|
477
|
-
|
|
483
|
+
if (this._on > 0 && --this._on === 0) {
|
|
484
|
+
activeEffectScope = this.prevScope;
|
|
485
|
+
this.prevScope = void 0;
|
|
486
|
+
}
|
|
478
487
|
}
|
|
479
488
|
stop(fromParent) {
|
|
480
489
|
if (this._active) {
|
|
490
|
+
this._active = false;
|
|
481
491
|
let i, l;
|
|
482
492
|
for (i = 0, l = this.effects.length; i < l; i++) {
|
|
483
493
|
this.effects[i].stop();
|
|
484
494
|
}
|
|
495
|
+
this.effects.length = 0;
|
|
485
496
|
for (i = 0, l = this.cleanups.length; i < l; i++) {
|
|
486
497
|
this.cleanups[i]();
|
|
487
498
|
}
|
|
499
|
+
this.cleanups.length = 0;
|
|
488
500
|
if (this.scopes) {
|
|
489
501
|
for (i = 0, l = this.scopes.length; i < l; i++) {
|
|
490
502
|
this.scopes[i].stop(true);
|
|
491
503
|
}
|
|
504
|
+
this.scopes.length = 0;
|
|
492
505
|
}
|
|
493
506
|
if (!this.detached && this.parent && !fromParent) {
|
|
494
507
|
const last = this.parent.scopes.pop();
|
|
@@ -498,7 +511,6 @@ class EffectScope {
|
|
|
498
511
|
}
|
|
499
512
|
}
|
|
500
513
|
this.parent = void 0;
|
|
501
|
-
this._active = false;
|
|
502
514
|
}
|
|
503
515
|
}
|
|
504
516
|
}
|
|
@@ -553,7 +565,7 @@ class ReactiveEffect {
|
|
|
553
565
|
}
|
|
554
566
|
resume() {
|
|
555
567
|
if (this.flags & 64) {
|
|
556
|
-
this.flags &=
|
|
568
|
+
this.flags &= -65;
|
|
557
569
|
if (pausedQueueEffects.has(this)) {
|
|
558
570
|
pausedQueueEffects.delete(this);
|
|
559
571
|
this.trigger();
|
|
@@ -593,7 +605,7 @@ class ReactiveEffect {
|
|
|
593
605
|
cleanupDeps(this);
|
|
594
606
|
activeSub = prevEffect;
|
|
595
607
|
shouldTrack = prevShouldTrack;
|
|
596
|
-
this.flags &=
|
|
608
|
+
this.flags &= -3;
|
|
597
609
|
}
|
|
598
610
|
}
|
|
599
611
|
stop() {
|
|
@@ -604,7 +616,7 @@ class ReactiveEffect {
|
|
|
604
616
|
this.deps = this.depsTail = void 0;
|
|
605
617
|
cleanupEffect(this);
|
|
606
618
|
this.onStop && this.onStop();
|
|
607
|
-
this.flags &=
|
|
619
|
+
this.flags &= -2;
|
|
608
620
|
}
|
|
609
621
|
}
|
|
610
622
|
trigger() {
|
|
@@ -654,7 +666,7 @@ function endBatch() {
|
|
|
654
666
|
while (e) {
|
|
655
667
|
const next = e.next;
|
|
656
668
|
e.next = void 0;
|
|
657
|
-
e.flags &=
|
|
669
|
+
e.flags &= -9;
|
|
658
670
|
e = next;
|
|
659
671
|
}
|
|
660
672
|
}
|
|
@@ -665,7 +677,7 @@ function endBatch() {
|
|
|
665
677
|
while (e) {
|
|
666
678
|
const next = e.next;
|
|
667
679
|
e.next = void 0;
|
|
668
|
-
e.flags &=
|
|
680
|
+
e.flags &= -9;
|
|
669
681
|
if (e.flags & 1) {
|
|
670
682
|
try {
|
|
671
683
|
;
|
|
@@ -721,17 +733,16 @@ function refreshComputed(computed) {
|
|
|
721
733
|
if (computed.flags & 4 && !(computed.flags & 16)) {
|
|
722
734
|
return;
|
|
723
735
|
}
|
|
724
|
-
computed.flags &=
|
|
736
|
+
computed.flags &= -17;
|
|
725
737
|
if (computed.globalVersion === globalVersion) {
|
|
726
738
|
return;
|
|
727
739
|
}
|
|
728
740
|
computed.globalVersion = globalVersion;
|
|
729
|
-
|
|
730
|
-
computed.flags |= 2;
|
|
731
|
-
if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) {
|
|
732
|
-
computed.flags &= ~2;
|
|
741
|
+
if (!computed.isSSR && computed.flags & 128 && (!computed.deps && !computed._dirty || !isDirty(computed))) {
|
|
733
742
|
return;
|
|
734
743
|
}
|
|
744
|
+
computed.flags |= 2;
|
|
745
|
+
const dep = computed.dep;
|
|
735
746
|
const prevSub = activeSub;
|
|
736
747
|
const prevShouldTrack = shouldTrack;
|
|
737
748
|
activeSub = computed;
|
|
@@ -740,6 +751,7 @@ function refreshComputed(computed) {
|
|
|
740
751
|
prepareDeps(computed);
|
|
741
752
|
const value = computed.fn(computed._value);
|
|
742
753
|
if (dep.version === 0 || hasChanged(value, computed._value)) {
|
|
754
|
+
computed.flags |= 128;
|
|
743
755
|
computed._value = value;
|
|
744
756
|
dep.version++;
|
|
745
757
|
}
|
|
@@ -750,7 +762,7 @@ function refreshComputed(computed) {
|
|
|
750
762
|
activeSub = prevSub;
|
|
751
763
|
shouldTrack = prevShouldTrack;
|
|
752
764
|
cleanupDeps(computed);
|
|
753
|
-
computed.flags &=
|
|
765
|
+
computed.flags &= -3;
|
|
754
766
|
}
|
|
755
767
|
}
|
|
756
768
|
function removeSub(link, soft = false) {
|
|
@@ -769,7 +781,7 @@ function removeSub(link, soft = false) {
|
|
|
769
781
|
if (dep.subs === link) {
|
|
770
782
|
dep.subs = prevSub;
|
|
771
783
|
if (!prevSub && dep.computed) {
|
|
772
|
-
dep.computed.flags &=
|
|
784
|
+
dep.computed.flags &= -5;
|
|
773
785
|
for (let l = dep.computed.deps; l; l = l.nextDep) {
|
|
774
786
|
removeSub(l, true);
|
|
775
787
|
}
|
|
@@ -1264,6 +1276,7 @@ class BaseReactiveHandler {
|
|
|
1264
1276
|
this._isShallow = _isShallow;
|
|
1265
1277
|
}
|
|
1266
1278
|
get(target, key, receiver) {
|
|
1279
|
+
if (key === "__v_skip") return target["__v_skip"];
|
|
1267
1280
|
const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;
|
|
1268
1281
|
if (key === "__v_isReactive") {
|
|
1269
1282
|
return !isReadonly2;
|
|
@@ -1701,14 +1714,14 @@ function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandl
|
|
|
1701
1714
|
if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) {
|
|
1702
1715
|
return target;
|
|
1703
1716
|
}
|
|
1704
|
-
const existingProxy = proxyMap.get(target);
|
|
1705
|
-
if (existingProxy) {
|
|
1706
|
-
return existingProxy;
|
|
1707
|
-
}
|
|
1708
1717
|
const targetType = getTargetType(target);
|
|
1709
1718
|
if (targetType === 0 /* INVALID */) {
|
|
1710
1719
|
return target;
|
|
1711
1720
|
}
|
|
1721
|
+
const existingProxy = proxyMap.get(target);
|
|
1722
|
+
if (existingProxy) {
|
|
1723
|
+
return existingProxy;
|
|
1724
|
+
}
|
|
1712
1725
|
const proxy = new Proxy(
|
|
1713
1726
|
target,
|
|
1714
1727
|
targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers
|
|
@@ -2100,7 +2113,7 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
|
2100
2113
|
const scope = getCurrentScope();
|
|
2101
2114
|
const watchHandle = () => {
|
|
2102
2115
|
effect.stop();
|
|
2103
|
-
if (scope) {
|
|
2116
|
+
if (scope && scope.active) {
|
|
2104
2117
|
remove(scope.effects, effect);
|
|
2105
2118
|
}
|
|
2106
2119
|
};
|
|
@@ -2552,11 +2565,11 @@ function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
|
|
|
2552
2565
|
queue.splice(i, 1);
|
|
2553
2566
|
i--;
|
|
2554
2567
|
if (cb.flags & 4) {
|
|
2555
|
-
cb.flags &=
|
|
2568
|
+
cb.flags &= -2;
|
|
2556
2569
|
}
|
|
2557
2570
|
cb();
|
|
2558
2571
|
if (!(cb.flags & 4)) {
|
|
2559
|
-
cb.flags &=
|
|
2572
|
+
cb.flags &= -2;
|
|
2560
2573
|
}
|
|
2561
2574
|
}
|
|
2562
2575
|
}
|
|
@@ -2581,10 +2594,10 @@ function flushPostFlushCbs(seen) {
|
|
|
2581
2594
|
continue;
|
|
2582
2595
|
}
|
|
2583
2596
|
if (cb.flags & 4) {
|
|
2584
|
-
cb.flags &=
|
|
2597
|
+
cb.flags &= -2;
|
|
2585
2598
|
}
|
|
2586
2599
|
if (!(cb.flags & 8)) cb();
|
|
2587
|
-
cb.flags &=
|
|
2600
|
+
cb.flags &= -2;
|
|
2588
2601
|
}
|
|
2589
2602
|
activePostFlushCbs = null;
|
|
2590
2603
|
postFlushIndex = 0;
|
|
@@ -2620,7 +2633,7 @@ function flushJobs(seen) {
|
|
|
2620
2633
|
for (; flushIndex < queue.length; flushIndex++) {
|
|
2621
2634
|
const job = queue[flushIndex];
|
|
2622
2635
|
if (job) {
|
|
2623
|
-
job.flags &=
|
|
2636
|
+
job.flags &= -2;
|
|
2624
2637
|
}
|
|
2625
2638
|
}
|
|
2626
2639
|
flushIndex = -1;
|
|
@@ -3060,11 +3073,32 @@ const TeleportImpl = {
|
|
|
3060
3073
|
updateCssVars(n2, true);
|
|
3061
3074
|
}
|
|
3062
3075
|
if (isTeleportDeferred(n2.props)) {
|
|
3063
|
-
queuePostRenderEffect(
|
|
3076
|
+
queuePostRenderEffect(() => {
|
|
3077
|
+
mountToTarget();
|
|
3078
|
+
n2.el.__isMounted = true;
|
|
3079
|
+
}, parentSuspense);
|
|
3064
3080
|
} else {
|
|
3065
3081
|
mountToTarget();
|
|
3066
3082
|
}
|
|
3067
3083
|
} else {
|
|
3084
|
+
if (isTeleportDeferred(n2.props) && !n1.el.__isMounted) {
|
|
3085
|
+
queuePostRenderEffect(() => {
|
|
3086
|
+
TeleportImpl.process(
|
|
3087
|
+
n1,
|
|
3088
|
+
n2,
|
|
3089
|
+
container,
|
|
3090
|
+
anchor,
|
|
3091
|
+
parentComponent,
|
|
3092
|
+
parentSuspense,
|
|
3093
|
+
namespace,
|
|
3094
|
+
slotScopeIds,
|
|
3095
|
+
optimized,
|
|
3096
|
+
internals
|
|
3097
|
+
);
|
|
3098
|
+
delete n1.el.__isMounted;
|
|
3099
|
+
}, parentSuspense);
|
|
3100
|
+
return;
|
|
3101
|
+
}
|
|
3068
3102
|
n2.el = n1.el;
|
|
3069
3103
|
n2.targetStart = n1.targetStart;
|
|
3070
3104
|
const mainAnchor = n2.anchor = n1.anchor;
|
|
@@ -3088,7 +3122,7 @@ const TeleportImpl = {
|
|
|
3088
3122
|
namespace,
|
|
3089
3123
|
slotScopeIds
|
|
3090
3124
|
);
|
|
3091
|
-
traverseStaticChildren(n1, n2,
|
|
3125
|
+
traverseStaticChildren(n1, n2, false);
|
|
3092
3126
|
} else if (!optimized) {
|
|
3093
3127
|
patchChildren(
|
|
3094
3128
|
n1,
|
|
@@ -3370,10 +3404,9 @@ const BaseTransitionImpl = {
|
|
|
3370
3404
|
if (innerChild.type !== Comment) {
|
|
3371
3405
|
setTransitionHooks(innerChild, enterHooks);
|
|
3372
3406
|
}
|
|
3373
|
-
|
|
3374
|
-
const oldInnerChild = oldChild && getInnerChild$1(oldChild);
|
|
3407
|
+
let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
|
|
3375
3408
|
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) {
|
|
3376
|
-
|
|
3409
|
+
let leavingHooks = resolveTransitionHooks(
|
|
3377
3410
|
oldInnerChild,
|
|
3378
3411
|
rawProps,
|
|
3379
3412
|
state,
|
|
@@ -3388,6 +3421,7 @@ const BaseTransitionImpl = {
|
|
|
3388
3421
|
instance.update();
|
|
3389
3422
|
}
|
|
3390
3423
|
delete leavingHooks.afterLeave;
|
|
3424
|
+
oldInnerChild = void 0;
|
|
3391
3425
|
};
|
|
3392
3426
|
return emptyPlaceholder(child);
|
|
3393
3427
|
} else if (mode === "in-out" && innerChild.type !== Comment) {
|
|
@@ -3401,10 +3435,19 @@ const BaseTransitionImpl = {
|
|
|
3401
3435
|
earlyRemove();
|
|
3402
3436
|
el[leaveCbKey] = void 0;
|
|
3403
3437
|
delete enterHooks.delayedLeave;
|
|
3438
|
+
oldInnerChild = void 0;
|
|
3439
|
+
};
|
|
3440
|
+
enterHooks.delayedLeave = () => {
|
|
3441
|
+
delayedLeave();
|
|
3442
|
+
delete enterHooks.delayedLeave;
|
|
3443
|
+
oldInnerChild = void 0;
|
|
3404
3444
|
};
|
|
3405
|
-
enterHooks.delayedLeave = delayedLeave;
|
|
3406
3445
|
};
|
|
3446
|
+
} else {
|
|
3447
|
+
oldInnerChild = void 0;
|
|
3407
3448
|
}
|
|
3449
|
+
} else if (oldInnerChild) {
|
|
3450
|
+
oldInnerChild = void 0;
|
|
3408
3451
|
}
|
|
3409
3452
|
return child;
|
|
3410
3453
|
};
|
|
@@ -3709,6 +3752,9 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
3709
3752
|
return;
|
|
3710
3753
|
}
|
|
3711
3754
|
if (isAsyncWrapper(vnode) && !isUnmount) {
|
|
3755
|
+
if (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) {
|
|
3756
|
+
setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree);
|
|
3757
|
+
}
|
|
3712
3758
|
return;
|
|
3713
3759
|
}
|
|
3714
3760
|
const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el;
|
|
@@ -3973,7 +4019,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
3973
4019
|
getContainerType(container),
|
|
3974
4020
|
optimized
|
|
3975
4021
|
);
|
|
3976
|
-
if (isAsyncWrapper(vnode)) {
|
|
4022
|
+
if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) {
|
|
3977
4023
|
let subTree;
|
|
3978
4024
|
if (isFragmentStart) {
|
|
3979
4025
|
subTree = createVNode(Fragment);
|
|
@@ -4242,6 +4288,10 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
4242
4288
|
getContainerType(container),
|
|
4243
4289
|
slotScopeIds
|
|
4244
4290
|
);
|
|
4291
|
+
if (parentComponent) {
|
|
4292
|
+
parentComponent.vnode.el = vnode.el;
|
|
4293
|
+
updateHOCHostEl(parentComponent, vnode.el);
|
|
4294
|
+
}
|
|
4245
4295
|
return next;
|
|
4246
4296
|
};
|
|
4247
4297
|
const locateClosingAnchor = (node, open = "[", close = "]") => {
|
|
@@ -4757,6 +4807,9 @@ const KeepAliveImpl = {
|
|
|
4757
4807
|
{
|
|
4758
4808
|
devtoolsComponentAdded(instance2);
|
|
4759
4809
|
}
|
|
4810
|
+
{
|
|
4811
|
+
instance2.__keepAliveStorageContainer = storageContainer;
|
|
4812
|
+
}
|
|
4760
4813
|
};
|
|
4761
4814
|
function unmount(vnode) {
|
|
4762
4815
|
resetShapeFlag(vnode);
|
|
@@ -4844,7 +4897,7 @@ const KeepAliveImpl = {
|
|
|
4844
4897
|
);
|
|
4845
4898
|
const { include, exclude, max } = props;
|
|
4846
4899
|
if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {
|
|
4847
|
-
vnode.shapeFlag &=
|
|
4900
|
+
vnode.shapeFlag &= -257;
|
|
4848
4901
|
current = vnode;
|
|
4849
4902
|
return rawVNode;
|
|
4850
4903
|
}
|
|
@@ -4931,8 +4984,8 @@ function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
|
|
|
4931
4984
|
}, target);
|
|
4932
4985
|
}
|
|
4933
4986
|
function resetShapeFlag(vnode) {
|
|
4934
|
-
vnode.shapeFlag &=
|
|
4935
|
-
vnode.shapeFlag &=
|
|
4987
|
+
vnode.shapeFlag &= -257;
|
|
4988
|
+
vnode.shapeFlag &= -513;
|
|
4936
4989
|
}
|
|
4937
4990
|
function getInnerChild(vnode) {
|
|
4938
4991
|
return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;
|
|
@@ -5047,14 +5100,16 @@ function renderList(source, renderItem, cache, index) {
|
|
|
5047
5100
|
if (sourceIsArray || isString(source)) {
|
|
5048
5101
|
const sourceIsReactiveArray = sourceIsArray && isReactive(source);
|
|
5049
5102
|
let needsWrap = false;
|
|
5103
|
+
let isReadonlySource = false;
|
|
5050
5104
|
if (sourceIsReactiveArray) {
|
|
5051
5105
|
needsWrap = !isShallow(source);
|
|
5106
|
+
isReadonlySource = isReadonly(source);
|
|
5052
5107
|
source = shallowReadArray(source);
|
|
5053
5108
|
}
|
|
5054
5109
|
ret = new Array(source.length);
|
|
5055
5110
|
for (let i = 0, l = source.length; i < l; i++) {
|
|
5056
5111
|
ret[i] = renderItem(
|
|
5057
|
-
needsWrap ? toReactive(source[i]) : source[i],
|
|
5112
|
+
needsWrap ? isReadonlySource ? toReadonly(toReactive(source[i])) : toReactive(source[i]) : source[i],
|
|
5058
5113
|
i,
|
|
5059
5114
|
void 0,
|
|
5060
5115
|
cached && cached[i]
|
|
@@ -6076,11 +6131,9 @@ function createAppAPI(render, hydrate) {
|
|
|
6076
6131
|
}
|
|
6077
6132
|
{
|
|
6078
6133
|
context.reload = () => {
|
|
6079
|
-
|
|
6080
|
-
|
|
6081
|
-
|
|
6082
|
-
namespace
|
|
6083
|
-
);
|
|
6134
|
+
const cloned = cloneVNode(vnode);
|
|
6135
|
+
cloned.el = null;
|
|
6136
|
+
render(cloned, rootContainer, namespace);
|
|
6084
6137
|
};
|
|
6085
6138
|
}
|
|
6086
6139
|
if (isHydrate && hydrate) {
|
|
@@ -6603,7 +6656,7 @@ const normalizeSlot = (key, rawSlot, ctx) => {
|
|
|
6603
6656
|
return rawSlot;
|
|
6604
6657
|
}
|
|
6605
6658
|
const normalized = withCtx((...args) => {
|
|
6606
|
-
if (currentInstance && (!ctx
|
|
6659
|
+
if (currentInstance && !(ctx === null && currentRenderingInstance) && !(ctx && ctx.root !== currentInstance.root)) {
|
|
6607
6660
|
warn$1(
|
|
6608
6661
|
`Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`
|
|
6609
6662
|
);
|
|
@@ -6642,7 +6695,7 @@ const normalizeVNodeSlots = (instance, children) => {
|
|
|
6642
6695
|
};
|
|
6643
6696
|
const assignSlots = (slots, children, optimized) => {
|
|
6644
6697
|
for (const key in children) {
|
|
6645
|
-
if (optimized || key
|
|
6698
|
+
if (optimized || !isInternalKey(key)) {
|
|
6646
6699
|
slots[key] = children[key];
|
|
6647
6700
|
}
|
|
6648
6701
|
}
|
|
@@ -7328,8 +7381,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7328
7381
|
endMeasure(instance, `init`);
|
|
7329
7382
|
}
|
|
7330
7383
|
}
|
|
7384
|
+
if (isHmrUpdating) initialVNode.el = null;
|
|
7331
7385
|
if (instance.asyncDep) {
|
|
7332
|
-
if (isHmrUpdating) initialVNode.el = null;
|
|
7333
7386
|
parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);
|
|
7334
7387
|
if (!initialVNode.el) {
|
|
7335
7388
|
const placeholder = instance.subTree = createVNode(Comment);
|
|
@@ -7891,7 +7944,13 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7891
7944
|
queuePostRenderEffect(() => transition.enter(el), parentSuspense);
|
|
7892
7945
|
} else {
|
|
7893
7946
|
const { leave, delayLeave, afterLeave } = transition;
|
|
7894
|
-
const remove2 = () =>
|
|
7947
|
+
const remove2 = () => {
|
|
7948
|
+
if (vnode.ctx.isUnmounted) {
|
|
7949
|
+
hostRemove(el);
|
|
7950
|
+
} else {
|
|
7951
|
+
hostInsert(el, container, anchor);
|
|
7952
|
+
}
|
|
7953
|
+
};
|
|
7895
7954
|
const performLeave = () => {
|
|
7896
7955
|
leave(el, () => {
|
|
7897
7956
|
remove2();
|
|
@@ -7924,7 +7983,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7924
7983
|
optimized = false;
|
|
7925
7984
|
}
|
|
7926
7985
|
if (ref != null) {
|
|
7986
|
+
pauseTracking();
|
|
7927
7987
|
setRef(ref, null, parentSuspense, vnode, true);
|
|
7988
|
+
resetTracking();
|
|
7928
7989
|
}
|
|
7929
7990
|
if (cacheIndex != null) {
|
|
7930
7991
|
parentComponent.renderCache[cacheIndex] = void 0;
|
|
@@ -8036,12 +8097,27 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8036
8097
|
if (instance.type.__hmrId) {
|
|
8037
8098
|
unregisterHMR(instance);
|
|
8038
8099
|
}
|
|
8039
|
-
const {
|
|
8100
|
+
const {
|
|
8101
|
+
bum,
|
|
8102
|
+
scope,
|
|
8103
|
+
job,
|
|
8104
|
+
subTree,
|
|
8105
|
+
um,
|
|
8106
|
+
m,
|
|
8107
|
+
a,
|
|
8108
|
+
parent,
|
|
8109
|
+
slots: { __: slotCacheKeys }
|
|
8110
|
+
} = instance;
|
|
8040
8111
|
invalidateMount(m);
|
|
8041
8112
|
invalidateMount(a);
|
|
8042
8113
|
if (bum) {
|
|
8043
8114
|
invokeArrayFns(bum);
|
|
8044
8115
|
}
|
|
8116
|
+
if (parent && isArray(slotCacheKeys)) {
|
|
8117
|
+
slotCacheKeys.forEach((v) => {
|
|
8118
|
+
parent.renderCache[v] = void 0;
|
|
8119
|
+
});
|
|
8120
|
+
}
|
|
8045
8121
|
scope.stop();
|
|
8046
8122
|
if (job) {
|
|
8047
8123
|
job.flags |= 8;
|
|
@@ -8137,8 +8213,8 @@ function toggleRecurse({ effect, job }, allowed) {
|
|
|
8137
8213
|
effect.flags |= 32;
|
|
8138
8214
|
job.flags |= 4;
|
|
8139
8215
|
} else {
|
|
8140
|
-
effect.flags &=
|
|
8141
|
-
job.flags &=
|
|
8216
|
+
effect.flags &= -33;
|
|
8217
|
+
job.flags &= -5;
|
|
8142
8218
|
}
|
|
8143
8219
|
}
|
|
8144
8220
|
function needTransition(parentSuspense, transition) {
|
|
@@ -8165,6 +8241,9 @@ function traverseStaticChildren(n1, n2, shallow = false) {
|
|
|
8165
8241
|
if (c2.type === Comment && !c2.el) {
|
|
8166
8242
|
c2.el = c1.el;
|
|
8167
8243
|
}
|
|
8244
|
+
{
|
|
8245
|
+
c2.el && (c2.el.__vnode = c2);
|
|
8246
|
+
}
|
|
8168
8247
|
}
|
|
8169
8248
|
}
|
|
8170
8249
|
}
|
|
@@ -8681,7 +8760,7 @@ function renderComponentRoot(instance) {
|
|
|
8681
8760
|
}
|
|
8682
8761
|
if (extraAttrs.length) {
|
|
8683
8762
|
warn$1(
|
|
8684
|
-
`Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`
|
|
8763
|
+
`Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.`
|
|
8685
8764
|
);
|
|
8686
8765
|
}
|
|
8687
8766
|
if (eventAttrs.length) {
|
|
@@ -9464,9 +9543,9 @@ function closeBlock() {
|
|
|
9464
9543
|
currentBlock = blockStack[blockStack.length - 1] || null;
|
|
9465
9544
|
}
|
|
9466
9545
|
let isBlockTreeEnabled = 1;
|
|
9467
|
-
function setBlockTracking(value) {
|
|
9546
|
+
function setBlockTracking(value, inVOnce = false) {
|
|
9468
9547
|
isBlockTreeEnabled += value;
|
|
9469
|
-
if (value < 0 && currentBlock) {
|
|
9548
|
+
if (value < 0 && currentBlock && inVOnce) {
|
|
9470
9549
|
currentBlock.hasOnce = true;
|
|
9471
9550
|
}
|
|
9472
9551
|
}
|
|
@@ -9510,8 +9589,8 @@ function isSameVNodeType(n1, n2) {
|
|
|
9510
9589
|
if (n2.shapeFlag & 6 && n1.component) {
|
|
9511
9590
|
const dirtyInstances = hmrDirtyComponents.get(n2.type);
|
|
9512
9591
|
if (dirtyInstances && dirtyInstances.has(n1.component)) {
|
|
9513
|
-
n1.shapeFlag &=
|
|
9514
|
-
n2.shapeFlag &=
|
|
9592
|
+
n1.shapeFlag &= -257;
|
|
9593
|
+
n2.shapeFlag &= -513;
|
|
9515
9594
|
return false;
|
|
9516
9595
|
}
|
|
9517
9596
|
}
|
|
@@ -9972,7 +10051,7 @@ function setupComponent(instance, isSSR = false, optimized = false) {
|
|
|
9972
10051
|
const { props, children } = instance.vnode;
|
|
9973
10052
|
const isStateful = isStatefulComponent(instance);
|
|
9974
10053
|
initProps(instance, props, isStateful, isSSR);
|
|
9975
|
-
initSlots(instance, children, optimized);
|
|
10054
|
+
initSlots(instance, children, optimized || isSSR);
|
|
9976
10055
|
const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;
|
|
9977
10056
|
isSSR && setInSSRSetupState(false);
|
|
9978
10057
|
return setupResult;
|
|
@@ -10303,13 +10382,15 @@ function initCustomFormatter() {
|
|
|
10303
10382
|
if (obj.__isVue) {
|
|
10304
10383
|
return ["div", vueStyle, `VueInstance`];
|
|
10305
10384
|
} else if (isRef(obj)) {
|
|
10385
|
+
pauseTracking();
|
|
10386
|
+
const value = obj.value;
|
|
10387
|
+
resetTracking();
|
|
10306
10388
|
return [
|
|
10307
10389
|
"div",
|
|
10308
10390
|
{},
|
|
10309
10391
|
["span", vueStyle, genRefFlag(obj)],
|
|
10310
10392
|
"<",
|
|
10311
|
-
|
|
10312
|
-
formatValue("_value" in obj ? obj._value : obj),
|
|
10393
|
+
formatValue(value),
|
|
10313
10394
|
`>`
|
|
10314
10395
|
];
|
|
10315
10396
|
} else if (isReactive(obj)) {
|
|
@@ -10490,7 +10571,7 @@ function isMemoSame(cached, memo) {
|
|
|
10490
10571
|
return true;
|
|
10491
10572
|
}
|
|
10492
10573
|
|
|
10493
|
-
const version = "3.5.
|
|
10574
|
+
const version = "3.5.14";
|
|
10494
10575
|
const warn = warn$1 ;
|
|
10495
10576
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
10496
10577
|
const devtools = devtools$1 ;
|
|
@@ -10674,7 +10755,8 @@ function resolveTransitionProps(rawProps) {
|
|
|
10674
10755
|
onAppear = onEnter,
|
|
10675
10756
|
onAppearCancelled = onEnterCancelled
|
|
10676
10757
|
} = baseProps;
|
|
10677
|
-
const finishEnter = (el, isAppear, done) => {
|
|
10758
|
+
const finishEnter = (el, isAppear, done, isCancelled) => {
|
|
10759
|
+
el._enterCancelled = isCancelled;
|
|
10678
10760
|
removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
|
|
10679
10761
|
removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
|
|
10680
10762
|
done && done();
|
|
@@ -10717,8 +10799,13 @@ function resolveTransitionProps(rawProps) {
|
|
|
10717
10799
|
el._isLeaving = true;
|
|
10718
10800
|
const resolve = () => finishLeave(el, done);
|
|
10719
10801
|
addTransitionClass(el, leaveFromClass);
|
|
10720
|
-
|
|
10721
|
-
|
|
10802
|
+
if (!el._enterCancelled) {
|
|
10803
|
+
forceReflow();
|
|
10804
|
+
addTransitionClass(el, leaveActiveClass);
|
|
10805
|
+
} else {
|
|
10806
|
+
addTransitionClass(el, leaveActiveClass);
|
|
10807
|
+
forceReflow();
|
|
10808
|
+
}
|
|
10722
10809
|
nextFrame(() => {
|
|
10723
10810
|
if (!el._isLeaving) {
|
|
10724
10811
|
return;
|
|
@@ -10732,11 +10819,11 @@ function resolveTransitionProps(rawProps) {
|
|
|
10732
10819
|
callHook(onLeave, [el, resolve]);
|
|
10733
10820
|
},
|
|
10734
10821
|
onEnterCancelled(el) {
|
|
10735
|
-
finishEnter(el, false);
|
|
10822
|
+
finishEnter(el, false, void 0, true);
|
|
10736
10823
|
callHook(onEnterCancelled, [el]);
|
|
10737
10824
|
},
|
|
10738
10825
|
onAppearCancelled(el) {
|
|
10739
|
-
finishEnter(el, true);
|
|
10826
|
+
finishEnter(el, true, void 0, true);
|
|
10740
10827
|
callHook(onAppearCancelled, [el]);
|
|
10741
10828
|
},
|
|
10742
10829
|
onLeaveCancelled(el) {
|
|
@@ -10956,10 +11043,11 @@ function useCssVars(getter) {
|
|
|
10956
11043
|
}
|
|
10957
11044
|
updateTeleports(vars);
|
|
10958
11045
|
};
|
|
10959
|
-
|
|
10960
|
-
|
|
11046
|
+
onBeforeUpdate(() => {
|
|
11047
|
+
queuePostFlushCb(setVars);
|
|
10961
11048
|
});
|
|
10962
11049
|
onMounted(() => {
|
|
11050
|
+
watch(setVars, NOOP, { flush: "post" });
|
|
10963
11051
|
const ob = new MutationObserver(setVars);
|
|
10964
11052
|
ob.observe(instance.subTree.el.parentNode, { childList: true });
|
|
10965
11053
|
onUnmounted(() => ob.disconnect());
|
|
@@ -11301,7 +11389,7 @@ function shouldSetAsProp(el, key, value, isSVG) {
|
|
|
11301
11389
|
}
|
|
11302
11390
|
return false;
|
|
11303
11391
|
}
|
|
11304
|
-
if (key === "spellcheck" || key === "draggable" || key === "translate") {
|
|
11392
|
+
if (key === "spellcheck" || key === "draggable" || key === "translate" || key === "autocorrect") {
|
|
11305
11393
|
return false;
|
|
11306
11394
|
}
|
|
11307
11395
|
if (key === "form") {
|
|
@@ -11566,6 +11654,8 @@ class VueElement extends BaseClass {
|
|
|
11566
11654
|
this._update();
|
|
11567
11655
|
}
|
|
11568
11656
|
if (shouldReflect) {
|
|
11657
|
+
const ob = this._ob;
|
|
11658
|
+
ob && ob.disconnect();
|
|
11569
11659
|
if (val === true) {
|
|
11570
11660
|
this.setAttribute(hyphenate(key), "");
|
|
11571
11661
|
} else if (typeof val === "string" || typeof val === "number") {
|
|
@@ -11573,6 +11663,7 @@ class VueElement extends BaseClass {
|
|
|
11573
11663
|
} else if (!val) {
|
|
11574
11664
|
this.removeAttribute(hyphenate(key));
|
|
11575
11665
|
}
|
|
11666
|
+
ob && ob.observe(this, { attributes: true });
|
|
11576
11667
|
}
|
|
11577
11668
|
}
|
|
11578
11669
|
}
|
|
@@ -11787,6 +11878,7 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
11787
11878
|
instance.vnode.el,
|
|
11788
11879
|
moveClass
|
|
11789
11880
|
)) {
|
|
11881
|
+
prevChildren = [];
|
|
11790
11882
|
return;
|
|
11791
11883
|
}
|
|
11792
11884
|
prevChildren.forEach(callPendingCbs);
|
|
@@ -11810,6 +11902,7 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
11810
11902
|
};
|
|
11811
11903
|
el.addEventListener("transitionend", cb);
|
|
11812
11904
|
});
|
|
11905
|
+
prevChildren = [];
|
|
11813
11906
|
});
|
|
11814
11907
|
return () => {
|
|
11815
11908
|
const rawProps = toRaw(props);
|
|
@@ -12771,12 +12864,13 @@ function createConditionalExpression(test, consequent, alternate, newline = true
|
|
|
12771
12864
|
loc: locStub
|
|
12772
12865
|
};
|
|
12773
12866
|
}
|
|
12774
|
-
function createCacheExpression(index, value, needPauseTracking = false) {
|
|
12867
|
+
function createCacheExpression(index, value, needPauseTracking = false, inVOnce = false) {
|
|
12775
12868
|
return {
|
|
12776
12869
|
type: 20,
|
|
12777
12870
|
index,
|
|
12778
12871
|
value,
|
|
12779
12872
|
needPauseTracking,
|
|
12873
|
+
inVOnce,
|
|
12780
12874
|
needArraySpread: false,
|
|
12781
12875
|
loc: locStub
|
|
12782
12876
|
};
|
|
@@ -14658,6 +14752,7 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
|
|
|
14658
14752
|
}
|
|
14659
14753
|
}
|
|
14660
14754
|
let cachedAsArray = false;
|
|
14755
|
+
const slotCacheKeys = [];
|
|
14661
14756
|
if (toCache.length === children.length && node.type === 1) {
|
|
14662
14757
|
if (node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && isArray(node.codegenNode.children)) {
|
|
14663
14758
|
node.codegenNode.children = getCacheExpression(
|
|
@@ -14667,6 +14762,7 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
|
|
|
14667
14762
|
} else if (node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) {
|
|
14668
14763
|
const slot = getSlotNode(node.codegenNode, "default");
|
|
14669
14764
|
if (slot) {
|
|
14765
|
+
slotCacheKeys.push(context.cached.length);
|
|
14670
14766
|
slot.returns = getCacheExpression(
|
|
14671
14767
|
createArrayExpression(slot.returns)
|
|
14672
14768
|
);
|
|
@@ -14676,6 +14772,7 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
|
|
|
14676
14772
|
const slotName = findDir(node, "slot", true);
|
|
14677
14773
|
const slot = slotName && slotName.arg && getSlotNode(parent.codegenNode, slotName.arg);
|
|
14678
14774
|
if (slot) {
|
|
14775
|
+
slotCacheKeys.push(context.cached.length);
|
|
14679
14776
|
slot.returns = getCacheExpression(
|
|
14680
14777
|
createArrayExpression(slot.returns)
|
|
14681
14778
|
);
|
|
@@ -14685,9 +14782,18 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
|
|
|
14685
14782
|
}
|
|
14686
14783
|
if (!cachedAsArray) {
|
|
14687
14784
|
for (const child of toCache) {
|
|
14785
|
+
slotCacheKeys.push(context.cached.length);
|
|
14688
14786
|
child.codegenNode = context.cache(child.codegenNode);
|
|
14689
14787
|
}
|
|
14690
14788
|
}
|
|
14789
|
+
if (slotCacheKeys.length && node.type === 1 && node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) {
|
|
14790
|
+
node.codegenNode.children.properties.push(
|
|
14791
|
+
createObjectProperty(
|
|
14792
|
+
`__`,
|
|
14793
|
+
createSimpleExpression(JSON.stringify(slotCacheKeys), false)
|
|
14794
|
+
)
|
|
14795
|
+
);
|
|
14796
|
+
}
|
|
14691
14797
|
function getCacheExpression(value) {
|
|
14692
14798
|
const exp = context.cache(value);
|
|
14693
14799
|
if (inFor && context.hmr) {
|
|
@@ -15010,11 +15116,12 @@ function createTransformContext(root, {
|
|
|
15010
15116
|
identifier.hoisted = exp;
|
|
15011
15117
|
return identifier;
|
|
15012
15118
|
},
|
|
15013
|
-
cache(exp, isVNode = false) {
|
|
15119
|
+
cache(exp, isVNode = false, inVOnce = false) {
|
|
15014
15120
|
const cacheExp = createCacheExpression(
|
|
15015
15121
|
context.cached.length,
|
|
15016
15122
|
exp,
|
|
15017
|
-
isVNode
|
|
15123
|
+
isVNode,
|
|
15124
|
+
inVOnce
|
|
15018
15125
|
);
|
|
15019
15126
|
context.cached.push(cacheExp);
|
|
15020
15127
|
return cacheExp;
|
|
@@ -15713,7 +15820,9 @@ function genCacheExpression(node, context) {
|
|
|
15713
15820
|
push(`_cache[${node.index}] || (`);
|
|
15714
15821
|
if (needPauseTracking) {
|
|
15715
15822
|
indent();
|
|
15716
|
-
push(`${helper(SET_BLOCK_TRACKING)}(-1)
|
|
15823
|
+
push(`${helper(SET_BLOCK_TRACKING)}(-1`);
|
|
15824
|
+
if (node.inVOnce) push(`, true`);
|
|
15825
|
+
push(`),`);
|
|
15717
15826
|
newline();
|
|
15718
15827
|
push(`(`);
|
|
15719
15828
|
}
|
|
@@ -15770,12 +15879,14 @@ const transformExpression = (node, context) => {
|
|
|
15770
15879
|
context
|
|
15771
15880
|
);
|
|
15772
15881
|
} else if (node.type === 1) {
|
|
15882
|
+
const memo = findDir(node, "memo");
|
|
15773
15883
|
for (let i = 0; i < node.props.length; i++) {
|
|
15774
15884
|
const dir = node.props[i];
|
|
15775
15885
|
if (dir.type === 7 && dir.name !== "for") {
|
|
15776
15886
|
const exp = dir.exp;
|
|
15777
15887
|
const arg = dir.arg;
|
|
15778
|
-
if (exp && exp.type === 4 && !(dir.name === "on" && arg))
|
|
15888
|
+
if (exp && exp.type === 4 && !(dir.name === "on" && arg) && // key has been processed in transformFor(vMemo + vFor)
|
|
15889
|
+
!(memo && arg && arg.type === 4 && arg.content === "key")) {
|
|
15779
15890
|
dir.exp = processExpression(
|
|
15780
15891
|
exp,
|
|
15781
15892
|
context,
|
|
@@ -16103,10 +16214,11 @@ const transformFor = createStructuralDirectiveTransform(
|
|
|
16103
16214
|
const isTemplate = isTemplateNode(node);
|
|
16104
16215
|
const memo = findDir(node, "memo");
|
|
16105
16216
|
const keyProp = findProp(node, `key`, false, true);
|
|
16106
|
-
|
|
16217
|
+
const isDirKey = keyProp && keyProp.type === 7;
|
|
16218
|
+
if (isDirKey && !keyProp.exp) {
|
|
16107
16219
|
transformBindShorthand(keyProp);
|
|
16108
16220
|
}
|
|
16109
|
-
|
|
16221
|
+
let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
|
|
16110
16222
|
const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null;
|
|
16111
16223
|
const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0;
|
|
16112
16224
|
const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256;
|
|
@@ -17303,8 +17415,8 @@ const transformOnce = (node, context) => {
|
|
|
17303
17415
|
if (cur.codegenNode) {
|
|
17304
17416
|
cur.codegenNode = context.cache(
|
|
17305
17417
|
cur.codegenNode,
|
|
17418
|
+
true,
|
|
17306
17419
|
true
|
|
17307
|
-
/* isVNode */
|
|
17308
17420
|
);
|
|
17309
17421
|
}
|
|
17310
17422
|
};
|
|
@@ -17326,8 +17438,7 @@ const transformModel$1 = (dir, node, context) => {
|
|
|
17326
17438
|
context.onError(createCompilerError(44, exp.loc));
|
|
17327
17439
|
return createTransformProps();
|
|
17328
17440
|
}
|
|
17329
|
-
|
|
17330
|
-
if (!expString.trim() || !isMemberExpression(exp) && !maybeRef) {
|
|
17441
|
+
if (!expString.trim() || !isMemberExpression(exp) && true) {
|
|
17331
17442
|
context.onError(
|
|
17332
17443
|
createCompilerError(42, exp.loc)
|
|
17333
17444
|
);
|