@vue/compat 3.3.6 → 3.3.8
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 +149 -91
- package/dist/vue.cjs.prod.js +139 -81
- package/dist/vue.esm-browser.js +147 -89
- package/dist/vue.esm-browser.prod.js +5 -5
- package/dist/vue.esm-bundler.js +147 -89
- package/dist/vue.global.js +147 -89
- package/dist/vue.global.prod.js +5 -5
- package/dist/vue.runtime.esm-browser.js +129 -82
- package/dist/vue.runtime.esm-browser.prod.js +5 -5
- package/dist/vue.runtime.esm-bundler.js +129 -82
- package/dist/vue.runtime.global.js +129 -82
- package/dist/vue.runtime.global.prod.js +5 -5
- package/package.json +2 -2
|
@@ -543,7 +543,7 @@ var Vue = (function () {
|
|
|
543
543
|
} else if (key === "length" && isArray(target)) {
|
|
544
544
|
const newLength = Number(newValue);
|
|
545
545
|
depsMap.forEach((dep, key2) => {
|
|
546
|
-
if (key2 === "length" || key2 >= newLength) {
|
|
546
|
+
if (key2 === "length" || !isSymbol(key2) && key2 >= newLength) {
|
|
547
547
|
deps.push(dep);
|
|
548
548
|
}
|
|
549
549
|
});
|
|
@@ -1639,8 +1639,13 @@ var Vue = (function () {
|
|
|
1639
1639
|
let end = queue.length;
|
|
1640
1640
|
while (start < end) {
|
|
1641
1641
|
const middle = start + end >>> 1;
|
|
1642
|
-
const
|
|
1643
|
-
middleJobId
|
|
1642
|
+
const middleJob = queue[middle];
|
|
1643
|
+
const middleJobId = getId(middleJob);
|
|
1644
|
+
if (middleJobId < id || middleJobId === id && middleJob.pre) {
|
|
1645
|
+
start = middle + 1;
|
|
1646
|
+
} else {
|
|
1647
|
+
end = middle;
|
|
1648
|
+
}
|
|
1644
1649
|
}
|
|
1645
1650
|
return start;
|
|
1646
1651
|
}
|
|
@@ -2915,6 +2920,65 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
2915
2920
|
}
|
|
2916
2921
|
}
|
|
2917
2922
|
|
|
2923
|
+
const COMPONENTS = "components";
|
|
2924
|
+
const DIRECTIVES = "directives";
|
|
2925
|
+
const FILTERS = "filters";
|
|
2926
|
+
function resolveComponent(name, maybeSelfReference) {
|
|
2927
|
+
return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
|
|
2928
|
+
}
|
|
2929
|
+
const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
|
|
2930
|
+
function resolveDynamicComponent(component) {
|
|
2931
|
+
if (isString(component)) {
|
|
2932
|
+
return resolveAsset(COMPONENTS, component, false) || component;
|
|
2933
|
+
} else {
|
|
2934
|
+
return component || NULL_DYNAMIC_COMPONENT;
|
|
2935
|
+
}
|
|
2936
|
+
}
|
|
2937
|
+
function resolveDirective(name) {
|
|
2938
|
+
return resolveAsset(DIRECTIVES, name);
|
|
2939
|
+
}
|
|
2940
|
+
function resolveFilter$1(name) {
|
|
2941
|
+
return resolveAsset(FILTERS, name);
|
|
2942
|
+
}
|
|
2943
|
+
function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
|
|
2944
|
+
const instance = currentRenderingInstance || currentInstance;
|
|
2945
|
+
if (instance) {
|
|
2946
|
+
const Component = instance.type;
|
|
2947
|
+
if (type === COMPONENTS) {
|
|
2948
|
+
const selfName = getComponentName(
|
|
2949
|
+
Component,
|
|
2950
|
+
false
|
|
2951
|
+
/* do not include inferred name to avoid breaking existing code */
|
|
2952
|
+
);
|
|
2953
|
+
if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
|
|
2954
|
+
return Component;
|
|
2955
|
+
}
|
|
2956
|
+
}
|
|
2957
|
+
const res = (
|
|
2958
|
+
// local registration
|
|
2959
|
+
// check instance[type] first which is resolved for options API
|
|
2960
|
+
resolve(instance[type] || Component[type], name) || // global registration
|
|
2961
|
+
resolve(instance.appContext[type], name)
|
|
2962
|
+
);
|
|
2963
|
+
if (!res && maybeSelfReference) {
|
|
2964
|
+
return Component;
|
|
2965
|
+
}
|
|
2966
|
+
if (warnMissing && !res) {
|
|
2967
|
+
const extra = type === COMPONENTS ? `
|
|
2968
|
+
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
|
|
2969
|
+
warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
|
|
2970
|
+
}
|
|
2971
|
+
return res;
|
|
2972
|
+
} else {
|
|
2973
|
+
warn(
|
|
2974
|
+
`resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`
|
|
2975
|
+
);
|
|
2976
|
+
}
|
|
2977
|
+
}
|
|
2978
|
+
function resolve(registry, name) {
|
|
2979
|
+
return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
|
|
2980
|
+
}
|
|
2981
|
+
|
|
2918
2982
|
const isSuspense = (type) => type.__isSuspense;
|
|
2919
2983
|
const SuspenseImpl = {
|
|
2920
2984
|
name: "Suspense",
|
|
@@ -3228,14 +3292,16 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
3228
3292
|
parentComponent: parentComponent2,
|
|
3229
3293
|
container: container2
|
|
3230
3294
|
} = suspense;
|
|
3295
|
+
let delayEnter = false;
|
|
3231
3296
|
if (suspense.isHydrating) {
|
|
3232
3297
|
suspense.isHydrating = false;
|
|
3233
3298
|
} else if (!resume) {
|
|
3234
|
-
|
|
3299
|
+
delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in";
|
|
3235
3300
|
if (delayEnter) {
|
|
3236
3301
|
activeBranch.transition.afterLeave = () => {
|
|
3237
3302
|
if (pendingId === suspense.pendingId) {
|
|
3238
3303
|
move(pendingBranch, container2, anchor2, 0);
|
|
3304
|
+
queuePostFlushCb(effects);
|
|
3239
3305
|
}
|
|
3240
3306
|
};
|
|
3241
3307
|
}
|
|
@@ -3261,7 +3327,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
3261
3327
|
}
|
|
3262
3328
|
parent = parent.parent;
|
|
3263
3329
|
}
|
|
3264
|
-
if (!hasUnresolvedAncestor) {
|
|
3330
|
+
if (!hasUnresolvedAncestor && !delayEnter) {
|
|
3265
3331
|
queuePostFlushCb(effects);
|
|
3266
3332
|
}
|
|
3267
3333
|
suspense.effects = [];
|
|
@@ -3447,7 +3513,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
3447
3513
|
}
|
|
3448
3514
|
if (isArray(s)) {
|
|
3449
3515
|
const singleChild = filterSingleRoot(s);
|
|
3450
|
-
if (!singleChild) {
|
|
3516
|
+
if (!singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) {
|
|
3451
3517
|
warn(`<Suspense> slots expect a single root node.`);
|
|
3452
3518
|
}
|
|
3453
3519
|
s = singleChild;
|
|
@@ -4624,65 +4690,6 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4624
4690
|
return listeners;
|
|
4625
4691
|
}
|
|
4626
4692
|
|
|
4627
|
-
const COMPONENTS = "components";
|
|
4628
|
-
const DIRECTIVES = "directives";
|
|
4629
|
-
const FILTERS = "filters";
|
|
4630
|
-
function resolveComponent(name, maybeSelfReference) {
|
|
4631
|
-
return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
|
|
4632
|
-
}
|
|
4633
|
-
const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
|
|
4634
|
-
function resolveDynamicComponent(component) {
|
|
4635
|
-
if (isString(component)) {
|
|
4636
|
-
return resolveAsset(COMPONENTS, component, false) || component;
|
|
4637
|
-
} else {
|
|
4638
|
-
return component || NULL_DYNAMIC_COMPONENT;
|
|
4639
|
-
}
|
|
4640
|
-
}
|
|
4641
|
-
function resolveDirective(name) {
|
|
4642
|
-
return resolveAsset(DIRECTIVES, name);
|
|
4643
|
-
}
|
|
4644
|
-
function resolveFilter$1(name) {
|
|
4645
|
-
return resolveAsset(FILTERS, name);
|
|
4646
|
-
}
|
|
4647
|
-
function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
|
|
4648
|
-
const instance = currentRenderingInstance || currentInstance;
|
|
4649
|
-
if (instance) {
|
|
4650
|
-
const Component = instance.type;
|
|
4651
|
-
if (type === COMPONENTS) {
|
|
4652
|
-
const selfName = getComponentName(
|
|
4653
|
-
Component,
|
|
4654
|
-
false
|
|
4655
|
-
/* do not include inferred name to avoid breaking existing code */
|
|
4656
|
-
);
|
|
4657
|
-
if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
|
|
4658
|
-
return Component;
|
|
4659
|
-
}
|
|
4660
|
-
}
|
|
4661
|
-
const res = (
|
|
4662
|
-
// local registration
|
|
4663
|
-
// check instance[type] first which is resolved for options API
|
|
4664
|
-
resolve(instance[type] || Component[type], name) || // global registration
|
|
4665
|
-
resolve(instance.appContext[type], name)
|
|
4666
|
-
);
|
|
4667
|
-
if (!res && maybeSelfReference) {
|
|
4668
|
-
return Component;
|
|
4669
|
-
}
|
|
4670
|
-
if (warnMissing && !res) {
|
|
4671
|
-
const extra = type === COMPONENTS ? `
|
|
4672
|
-
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
|
|
4673
|
-
warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
|
|
4674
|
-
}
|
|
4675
|
-
return res;
|
|
4676
|
-
} else {
|
|
4677
|
-
warn(
|
|
4678
|
-
`resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`
|
|
4679
|
-
);
|
|
4680
|
-
}
|
|
4681
|
-
}
|
|
4682
|
-
function resolve(registry, name) {
|
|
4683
|
-
return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
|
|
4684
|
-
}
|
|
4685
|
-
|
|
4686
4693
|
function convertLegacyRenderFn(instance) {
|
|
4687
4694
|
const Component2 = instance.type;
|
|
4688
4695
|
const render = Component2.render;
|
|
@@ -6185,7 +6192,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
6185
6192
|
return vm;
|
|
6186
6193
|
}
|
|
6187
6194
|
}
|
|
6188
|
-
Vue.version = `2.6.14-compat:${"3.3.
|
|
6195
|
+
Vue.version = `2.6.14-compat:${"3.3.8"}`;
|
|
6189
6196
|
Vue.config = singletonApp.config;
|
|
6190
6197
|
Vue.use = (p, ...options) => {
|
|
6191
6198
|
if (p && isFunction(p.install)) {
|
|
@@ -7514,7 +7521,14 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7514
7521
|
}
|
|
7515
7522
|
break;
|
|
7516
7523
|
case Comment:
|
|
7517
|
-
if (
|
|
7524
|
+
if (isTemplateNode(node)) {
|
|
7525
|
+
nextNode = nextSibling(node);
|
|
7526
|
+
replaceNode(
|
|
7527
|
+
vnode.el = node.content.firstChild,
|
|
7528
|
+
node,
|
|
7529
|
+
parentComponent
|
|
7530
|
+
);
|
|
7531
|
+
} else if (domType !== 8 /* COMMENT */ || isFragmentStart) {
|
|
7518
7532
|
nextNode = onMismatch();
|
|
7519
7533
|
} else {
|
|
7520
7534
|
nextNode = nextSibling(node);
|
|
@@ -7557,7 +7571,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7557
7571
|
break;
|
|
7558
7572
|
default:
|
|
7559
7573
|
if (shapeFlag & 1) {
|
|
7560
|
-
if (domType !== 1 /* ELEMENT */ || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) {
|
|
7574
|
+
if ((domType !== 1 /* ELEMENT */ || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) {
|
|
7561
7575
|
nextNode = onMismatch();
|
|
7562
7576
|
} else {
|
|
7563
7577
|
nextNode = hydrateElement(
|
|
@@ -7572,6 +7586,13 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7572
7586
|
} else if (shapeFlag & 6) {
|
|
7573
7587
|
vnode.slotScopeIds = slotScopeIds;
|
|
7574
7588
|
const container = parentNode(node);
|
|
7589
|
+
if (isFragmentStart) {
|
|
7590
|
+
nextNode = locateClosingAnchor(node);
|
|
7591
|
+
} else if (isComment(node) && node.data === "teleport start") {
|
|
7592
|
+
nextNode = locateClosingAnchor(node, node.data, "teleport end");
|
|
7593
|
+
} else {
|
|
7594
|
+
nextNode = nextSibling(node);
|
|
7595
|
+
}
|
|
7575
7596
|
mountComponent(
|
|
7576
7597
|
vnode,
|
|
7577
7598
|
container,
|
|
@@ -7581,10 +7602,6 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7581
7602
|
isSVGContainer(container),
|
|
7582
7603
|
optimized
|
|
7583
7604
|
);
|
|
7584
|
-
nextNode = isFragmentStart ? locateClosingAsyncAnchor(node) : nextSibling(node);
|
|
7585
|
-
if (nextNode && isComment(nextNode) && nextNode.data === "teleport end") {
|
|
7586
|
-
nextNode = nextSibling(nextNode);
|
|
7587
|
-
}
|
|
7588
7605
|
if (isAsyncWrapper(vnode)) {
|
|
7589
7606
|
let subTree;
|
|
7590
7607
|
if (isFragmentStart) {
|
|
@@ -7634,7 +7651,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7634
7651
|
};
|
|
7635
7652
|
const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
|
|
7636
7653
|
optimized = optimized || !!vnode.dynamicChildren;
|
|
7637
|
-
const { type, props, patchFlag, shapeFlag, dirs } = vnode;
|
|
7654
|
+
const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode;
|
|
7638
7655
|
const forcePatchValue = type === "input" && dirs || type === "option";
|
|
7639
7656
|
{
|
|
7640
7657
|
if (dirs) {
|
|
@@ -7671,12 +7688,23 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7671
7688
|
if (vnodeHooks = props && props.onVnodeBeforeMount) {
|
|
7672
7689
|
invokeVNodeHook(vnodeHooks, parentComponent, vnode);
|
|
7673
7690
|
}
|
|
7691
|
+
let needCallTransitionHooks = false;
|
|
7692
|
+
if (isTemplateNode(el)) {
|
|
7693
|
+
needCallTransitionHooks = needTransition(parentSuspense, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
|
|
7694
|
+
const content = el.content.firstChild;
|
|
7695
|
+
if (needCallTransitionHooks) {
|
|
7696
|
+
transition.beforeEnter(content);
|
|
7697
|
+
}
|
|
7698
|
+
replaceNode(content, el, parentComponent);
|
|
7699
|
+
vnode.el = el = content;
|
|
7700
|
+
}
|
|
7674
7701
|
if (dirs) {
|
|
7675
7702
|
invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
|
|
7676
7703
|
}
|
|
7677
|
-
if ((vnodeHooks = props && props.onVnodeMounted) || dirs) {
|
|
7704
|
+
if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) {
|
|
7678
7705
|
queueEffectWithSuspense(() => {
|
|
7679
7706
|
vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode);
|
|
7707
|
+
needCallTransitionHooks && transition.enter(el);
|
|
7680
7708
|
dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
|
|
7681
7709
|
}, parentSuspense);
|
|
7682
7710
|
}
|
|
@@ -7794,7 +7822,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7794
7822
|
);
|
|
7795
7823
|
vnode.el = null;
|
|
7796
7824
|
if (isFragment) {
|
|
7797
|
-
const end =
|
|
7825
|
+
const end = locateClosingAnchor(node);
|
|
7798
7826
|
while (true) {
|
|
7799
7827
|
const next2 = nextSibling(node);
|
|
7800
7828
|
if (next2 && next2 !== end) {
|
|
@@ -7819,14 +7847,14 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7819
7847
|
);
|
|
7820
7848
|
return next;
|
|
7821
7849
|
};
|
|
7822
|
-
const
|
|
7850
|
+
const locateClosingAnchor = (node, open = "[", close = "]") => {
|
|
7823
7851
|
let match = 0;
|
|
7824
7852
|
while (node) {
|
|
7825
7853
|
node = nextSibling(node);
|
|
7826
7854
|
if (node && isComment(node)) {
|
|
7827
|
-
if (node.data ===
|
|
7855
|
+
if (node.data === open)
|
|
7828
7856
|
match++;
|
|
7829
|
-
if (node.data ===
|
|
7857
|
+
if (node.data === close) {
|
|
7830
7858
|
if (match === 0) {
|
|
7831
7859
|
return nextSibling(node);
|
|
7832
7860
|
} else {
|
|
@@ -7837,6 +7865,22 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7837
7865
|
}
|
|
7838
7866
|
return node;
|
|
7839
7867
|
};
|
|
7868
|
+
const replaceNode = (newNode, oldNode, parentComponent) => {
|
|
7869
|
+
const parentNode2 = oldNode.parentNode;
|
|
7870
|
+
if (parentNode2) {
|
|
7871
|
+
parentNode2.replaceChild(newNode, oldNode);
|
|
7872
|
+
}
|
|
7873
|
+
let parent = parentComponent;
|
|
7874
|
+
while (parent) {
|
|
7875
|
+
if (parent.vnode.el === oldNode) {
|
|
7876
|
+
parent.vnode.el = parent.subTree.el = newNode;
|
|
7877
|
+
}
|
|
7878
|
+
parent = parent.parent;
|
|
7879
|
+
}
|
|
7880
|
+
};
|
|
7881
|
+
const isTemplateNode = (node) => {
|
|
7882
|
+
return node.nodeType === 1 /* ELEMENT */ && node.tagName.toLowerCase() === "template";
|
|
7883
|
+
};
|
|
7840
7884
|
return [hydrate, hydrateNode];
|
|
7841
7885
|
}
|
|
7842
7886
|
|
|
@@ -8164,7 +8208,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8164
8208
|
if (dirs) {
|
|
8165
8209
|
invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
|
|
8166
8210
|
}
|
|
8167
|
-
const needCallTransitionHooks = (
|
|
8211
|
+
const needCallTransitionHooks = needTransition(parentSuspense, transition);
|
|
8168
8212
|
if (needCallTransitionHooks) {
|
|
8169
8213
|
transition.beforeEnter(el);
|
|
8170
8214
|
}
|
|
@@ -9081,8 +9125,8 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9081
9125
|
moveStaticNode(vnode, container, anchor);
|
|
9082
9126
|
return;
|
|
9083
9127
|
}
|
|
9084
|
-
const
|
|
9085
|
-
if (
|
|
9128
|
+
const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition;
|
|
9129
|
+
if (needTransition2) {
|
|
9086
9130
|
if (moveType === 0) {
|
|
9087
9131
|
transition.beforeEnter(el);
|
|
9088
9132
|
hostInsert(el, container, anchor);
|
|
@@ -9311,6 +9355,9 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9311
9355
|
function toggleRecurse({ effect, update }, allowed) {
|
|
9312
9356
|
effect.allowRecurse = update.allowRecurse = allowed;
|
|
9313
9357
|
}
|
|
9358
|
+
function needTransition(parentSuspense, transition) {
|
|
9359
|
+
return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted;
|
|
9360
|
+
}
|
|
9314
9361
|
function traverseStaticChildren(n1, n2, shallow = false) {
|
|
9315
9362
|
const ch1 = n1.children;
|
|
9316
9363
|
const ch2 = n2.children;
|
|
@@ -10713,7 +10760,7 @@ Component that was made reactive: `,
|
|
|
10713
10760
|
return true;
|
|
10714
10761
|
}
|
|
10715
10762
|
|
|
10716
|
-
const version = "3.3.
|
|
10763
|
+
const version = "3.3.8";
|
|
10717
10764
|
const ssrUtils = null;
|
|
10718
10765
|
const resolveFilter = resolveFilter$1 ;
|
|
10719
10766
|
const _compatUtils = {
|