@vue/compat 3.3.6 → 3.3.7
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 +88 -29
- package/dist/vue.cjs.prod.js +88 -29
- package/dist/vue.esm-browser.js +88 -29
- package/dist/vue.esm-browser.prod.js +4 -4
- package/dist/vue.esm-bundler.js +88 -29
- package/dist/vue.global.js +88 -29
- package/dist/vue.global.prod.js +4 -4
- package/dist/vue.runtime.esm-browser.js +70 -22
- package/dist/vue.runtime.esm-browser.prod.js +4 -4
- package/dist/vue.runtime.esm-bundler.js +70 -22
- package/dist/vue.runtime.global.js +70 -22
- package/dist/vue.runtime.global.prod.js +4 -4
- package/package.json +2 -2
package/dist/vue.esm-bundler.js
CHANGED
|
@@ -605,7 +605,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
605
605
|
} else if (key === "length" && isArray(target)) {
|
|
606
606
|
const newLength = Number(newValue);
|
|
607
607
|
depsMap.forEach((dep, key2) => {
|
|
608
|
-
if (key2 === "length" || key2 >= newLength) {
|
|
608
|
+
if (key2 === "length" || !isSymbol(key2) && key2 >= newLength) {
|
|
609
609
|
deps.push(dep);
|
|
610
610
|
}
|
|
611
611
|
});
|
|
@@ -1715,8 +1715,13 @@ function findInsertionIndex(id) {
|
|
|
1715
1715
|
let end = queue.length;
|
|
1716
1716
|
while (start < end) {
|
|
1717
1717
|
const middle = start + end >>> 1;
|
|
1718
|
-
const
|
|
1719
|
-
middleJobId
|
|
1718
|
+
const middleJob = queue[middle];
|
|
1719
|
+
const middleJobId = getId(middleJob);
|
|
1720
|
+
if (middleJobId < id || middleJobId === id && middleJob.pre) {
|
|
1721
|
+
start = middle + 1;
|
|
1722
|
+
} else {
|
|
1723
|
+
end = middle;
|
|
1724
|
+
}
|
|
1720
1725
|
}
|
|
1721
1726
|
return start;
|
|
1722
1727
|
}
|
|
@@ -3307,14 +3312,16 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
3307
3312
|
parentComponent: parentComponent2,
|
|
3308
3313
|
container: container2
|
|
3309
3314
|
} = suspense;
|
|
3315
|
+
let delayEnter = false;
|
|
3310
3316
|
if (suspense.isHydrating) {
|
|
3311
3317
|
suspense.isHydrating = false;
|
|
3312
3318
|
} else if (!resume) {
|
|
3313
|
-
|
|
3319
|
+
delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in";
|
|
3314
3320
|
if (delayEnter) {
|
|
3315
3321
|
activeBranch.transition.afterLeave = () => {
|
|
3316
3322
|
if (pendingId === suspense.pendingId) {
|
|
3317
3323
|
move(pendingBranch, container2, anchor2, 0);
|
|
3324
|
+
queuePostFlushCb(effects);
|
|
3318
3325
|
}
|
|
3319
3326
|
};
|
|
3320
3327
|
}
|
|
@@ -3340,7 +3347,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
3340
3347
|
}
|
|
3341
3348
|
parent = parent.parent;
|
|
3342
3349
|
}
|
|
3343
|
-
if (!hasUnresolvedAncestor) {
|
|
3350
|
+
if (!hasUnresolvedAncestor && !delayEnter) {
|
|
3344
3351
|
queuePostFlushCb(effects);
|
|
3345
3352
|
}
|
|
3346
3353
|
suspense.effects = [];
|
|
@@ -6295,7 +6302,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6295
6302
|
return vm;
|
|
6296
6303
|
}
|
|
6297
6304
|
}
|
|
6298
|
-
Vue.version = `2.6.14-compat:${"3.3.
|
|
6305
|
+
Vue.version = `2.6.14-compat:${"3.3.7"}`;
|
|
6299
6306
|
Vue.config = singletonApp.config;
|
|
6300
6307
|
Vue.use = (p, ...options) => {
|
|
6301
6308
|
if (p && isFunction(p.install)) {
|
|
@@ -7628,7 +7635,14 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7628
7635
|
break;
|
|
7629
7636
|
case Comment:
|
|
7630
7637
|
if (domType !== 8 /* COMMENT */ || isFragmentStart) {
|
|
7631
|
-
|
|
7638
|
+
if (node.tagName.toLowerCase() === "template") {
|
|
7639
|
+
const content = vnode.el.content.firstChild;
|
|
7640
|
+
replaceNode(content, node, parentComponent);
|
|
7641
|
+
vnode.el = node = content;
|
|
7642
|
+
nextNode = nextSibling(node);
|
|
7643
|
+
} else {
|
|
7644
|
+
nextNode = onMismatch();
|
|
7645
|
+
}
|
|
7632
7646
|
} else {
|
|
7633
7647
|
nextNode = nextSibling(node);
|
|
7634
7648
|
}
|
|
@@ -7670,7 +7684,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7670
7684
|
break;
|
|
7671
7685
|
default:
|
|
7672
7686
|
if (shapeFlag & 1) {
|
|
7673
|
-
if (domType !== 1 /* ELEMENT */ || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) {
|
|
7687
|
+
if ((domType !== 1 /* ELEMENT */ || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) {
|
|
7674
7688
|
nextNode = onMismatch();
|
|
7675
7689
|
} else {
|
|
7676
7690
|
nextNode = hydrateElement(
|
|
@@ -7685,6 +7699,13 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7685
7699
|
} else if (shapeFlag & 6) {
|
|
7686
7700
|
vnode.slotScopeIds = slotScopeIds;
|
|
7687
7701
|
const container = parentNode(node);
|
|
7702
|
+
if (isFragmentStart) {
|
|
7703
|
+
nextNode = locateClosingAnchor(node);
|
|
7704
|
+
} else if (isComment(node) && node.data === "teleport start") {
|
|
7705
|
+
nextNode = locateClosingAnchor(node, node.data, "teleport end");
|
|
7706
|
+
} else {
|
|
7707
|
+
nextNode = nextSibling(node);
|
|
7708
|
+
}
|
|
7688
7709
|
mountComponent(
|
|
7689
7710
|
vnode,
|
|
7690
7711
|
container,
|
|
@@ -7694,10 +7715,6 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7694
7715
|
isSVGContainer(container),
|
|
7695
7716
|
optimized
|
|
7696
7717
|
);
|
|
7697
|
-
nextNode = isFragmentStart ? locateClosingAsyncAnchor(node) : nextSibling(node);
|
|
7698
|
-
if (nextNode && isComment(nextNode) && nextNode.data === "teleport end") {
|
|
7699
|
-
nextNode = nextSibling(nextNode);
|
|
7700
|
-
}
|
|
7701
7718
|
if (isAsyncWrapper(vnode)) {
|
|
7702
7719
|
let subTree;
|
|
7703
7720
|
if (isFragmentStart) {
|
|
@@ -7747,7 +7764,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7747
7764
|
};
|
|
7748
7765
|
const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
|
|
7749
7766
|
optimized = optimized || !!vnode.dynamicChildren;
|
|
7750
|
-
const { type, props, patchFlag, shapeFlag, dirs } = vnode;
|
|
7767
|
+
const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode;
|
|
7751
7768
|
const forcePatchValue = type === "input" && dirs || type === "option";
|
|
7752
7769
|
if (!!(process.env.NODE_ENV !== "production") || forcePatchValue || patchFlag !== -1) {
|
|
7753
7770
|
if (dirs) {
|
|
@@ -7784,12 +7801,23 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7784
7801
|
if (vnodeHooks = props && props.onVnodeBeforeMount) {
|
|
7785
7802
|
invokeVNodeHook(vnodeHooks, parentComponent, vnode);
|
|
7786
7803
|
}
|
|
7804
|
+
let needCallTransitionHooks = false;
|
|
7805
|
+
if (isTemplateNode(el)) {
|
|
7806
|
+
needCallTransitionHooks = needTransition(parentSuspense, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
|
|
7807
|
+
const content = el.content.firstChild;
|
|
7808
|
+
if (needCallTransitionHooks) {
|
|
7809
|
+
transition.beforeEnter(content);
|
|
7810
|
+
}
|
|
7811
|
+
replaceNode(content, el, parentComponent);
|
|
7812
|
+
vnode.el = el = content;
|
|
7813
|
+
}
|
|
7787
7814
|
if (dirs) {
|
|
7788
7815
|
invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
|
|
7789
7816
|
}
|
|
7790
|
-
if ((vnodeHooks = props && props.onVnodeMounted) || dirs) {
|
|
7817
|
+
if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) {
|
|
7791
7818
|
queueEffectWithSuspense(() => {
|
|
7792
7819
|
vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode);
|
|
7820
|
+
needCallTransitionHooks && transition.enter(el);
|
|
7793
7821
|
dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
|
|
7794
7822
|
}, parentSuspense);
|
|
7795
7823
|
}
|
|
@@ -7907,7 +7935,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7907
7935
|
);
|
|
7908
7936
|
vnode.el = null;
|
|
7909
7937
|
if (isFragment) {
|
|
7910
|
-
const end =
|
|
7938
|
+
const end = locateClosingAnchor(node);
|
|
7911
7939
|
while (true) {
|
|
7912
7940
|
const next2 = nextSibling(node);
|
|
7913
7941
|
if (next2 && next2 !== end) {
|
|
@@ -7932,14 +7960,14 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7932
7960
|
);
|
|
7933
7961
|
return next;
|
|
7934
7962
|
};
|
|
7935
|
-
const
|
|
7963
|
+
const locateClosingAnchor = (node, open = "[", close = "]") => {
|
|
7936
7964
|
let match = 0;
|
|
7937
7965
|
while (node) {
|
|
7938
7966
|
node = nextSibling(node);
|
|
7939
7967
|
if (node && isComment(node)) {
|
|
7940
|
-
if (node.data ===
|
|
7968
|
+
if (node.data === open)
|
|
7941
7969
|
match++;
|
|
7942
|
-
if (node.data ===
|
|
7970
|
+
if (node.data === close) {
|
|
7943
7971
|
if (match === 0) {
|
|
7944
7972
|
return nextSibling(node);
|
|
7945
7973
|
} else {
|
|
@@ -7950,6 +7978,23 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7950
7978
|
}
|
|
7951
7979
|
return node;
|
|
7952
7980
|
};
|
|
7981
|
+
const replaceNode = (newNode, oldNode, parentComponent) => {
|
|
7982
|
+
const parentNode2 = oldNode.parentNode;
|
|
7983
|
+
if (parentNode2) {
|
|
7984
|
+
parentNode2.replaceChild(newNode, oldNode);
|
|
7985
|
+
}
|
|
7986
|
+
let parent = parentComponent;
|
|
7987
|
+
while (parent) {
|
|
7988
|
+
if (parent.vnode.el === oldNode) {
|
|
7989
|
+
parent.vnode.el = newNode;
|
|
7990
|
+
parent.subTree.el = newNode;
|
|
7991
|
+
}
|
|
7992
|
+
parent = parent.parent;
|
|
7993
|
+
}
|
|
7994
|
+
};
|
|
7995
|
+
const isTemplateNode = (node) => {
|
|
7996
|
+
return node.nodeType === 1 /* ELEMENT */ && node.tagName.toLowerCase() === "template";
|
|
7997
|
+
};
|
|
7953
7998
|
return [hydrate, hydrateNode];
|
|
7954
7999
|
}
|
|
7955
8000
|
|
|
@@ -8300,7 +8345,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8300
8345
|
if (dirs) {
|
|
8301
8346
|
invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
|
|
8302
8347
|
}
|
|
8303
|
-
const needCallTransitionHooks = (
|
|
8348
|
+
const needCallTransitionHooks = needTransition(parentSuspense, transition);
|
|
8304
8349
|
if (needCallTransitionHooks) {
|
|
8305
8350
|
transition.beforeEnter(el);
|
|
8306
8351
|
}
|
|
@@ -9228,8 +9273,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9228
9273
|
moveStaticNode(vnode, container, anchor);
|
|
9229
9274
|
return;
|
|
9230
9275
|
}
|
|
9231
|
-
const
|
|
9232
|
-
if (
|
|
9276
|
+
const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition;
|
|
9277
|
+
if (needTransition2) {
|
|
9233
9278
|
if (moveType === 0) {
|
|
9234
9279
|
transition.beforeEnter(el);
|
|
9235
9280
|
hostInsert(el, container, anchor);
|
|
@@ -9458,6 +9503,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9458
9503
|
function toggleRecurse({ effect, update }, allowed) {
|
|
9459
9504
|
effect.allowRecurse = update.allowRecurse = allowed;
|
|
9460
9505
|
}
|
|
9506
|
+
function needTransition(parentSuspense, transition) {
|
|
9507
|
+
return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted;
|
|
9508
|
+
}
|
|
9461
9509
|
function traverseStaticChildren(n1, n2, shallow = false) {
|
|
9462
9510
|
const ch1 = n1.children;
|
|
9463
9511
|
const ch2 = n2.children;
|
|
@@ -10894,7 +10942,7 @@ function isMemoSame(cached, memo) {
|
|
|
10894
10942
|
return true;
|
|
10895
10943
|
}
|
|
10896
10944
|
|
|
10897
|
-
const version = "3.3.
|
|
10945
|
+
const version = "3.3.7";
|
|
10898
10946
|
const _ssrUtils = {
|
|
10899
10947
|
createComponentInstance,
|
|
10900
10948
|
setupComponent,
|
|
@@ -14246,9 +14294,13 @@ function walk(node, context, doNotHoistNode = false) {
|
|
|
14246
14294
|
context.transformHoist(children, context, node);
|
|
14247
14295
|
}
|
|
14248
14296
|
if (hoistedCount && hoistedCount === originalCount && node.type === 1 && node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && isArray(node.codegenNode.children)) {
|
|
14249
|
-
|
|
14297
|
+
const hoisted = context.hoist(
|
|
14250
14298
|
createArrayExpression(node.codegenNode.children)
|
|
14251
14299
|
);
|
|
14300
|
+
if (context.hmr) {
|
|
14301
|
+
hoisted.content = `[...${hoisted.content}]`;
|
|
14302
|
+
}
|
|
14303
|
+
node.codegenNode.children = hoisted;
|
|
14252
14304
|
}
|
|
14253
14305
|
}
|
|
14254
14306
|
function getConstantType(node, context) {
|
|
@@ -14422,6 +14474,7 @@ function createTransformContext(root, {
|
|
|
14422
14474
|
filename = "",
|
|
14423
14475
|
prefixIdentifiers = false,
|
|
14424
14476
|
hoistStatic: hoistStatic2 = false,
|
|
14477
|
+
hmr = false,
|
|
14425
14478
|
cacheHandlers = false,
|
|
14426
14479
|
nodeTransforms = [],
|
|
14427
14480
|
directiveTransforms = {},
|
|
@@ -14447,6 +14500,7 @@ function createTransformContext(root, {
|
|
|
14447
14500
|
selfName: nameMatch && capitalize(camelize(nameMatch[1])),
|
|
14448
14501
|
prefixIdentifiers,
|
|
14449
14502
|
hoistStatic: hoistStatic2,
|
|
14503
|
+
hmr,
|
|
14450
14504
|
cacheHandlers,
|
|
14451
14505
|
nodeTransforms,
|
|
14452
14506
|
directiveTransforms,
|
|
@@ -15830,7 +15884,7 @@ const trackSlotScopes = (node, context) => {
|
|
|
15830
15884
|
}
|
|
15831
15885
|
}
|
|
15832
15886
|
};
|
|
15833
|
-
const buildClientSlotFn = (props, children, loc) => createFunctionExpression(
|
|
15887
|
+
const buildClientSlotFn = (props, _vForExp, children, loc) => createFunctionExpression(
|
|
15834
15888
|
props,
|
|
15835
15889
|
children,
|
|
15836
15890
|
false,
|
|
@@ -15852,7 +15906,7 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
|
|
|
15852
15906
|
slotsProperties.push(
|
|
15853
15907
|
createObjectProperty(
|
|
15854
15908
|
arg || createSimpleExpression("default", true),
|
|
15855
|
-
buildSlotFn(exp, children, loc)
|
|
15909
|
+
buildSlotFn(exp, void 0, children, loc)
|
|
15856
15910
|
)
|
|
15857
15911
|
);
|
|
15858
15912
|
}
|
|
@@ -15889,10 +15943,15 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
|
|
|
15889
15943
|
} else {
|
|
15890
15944
|
hasDynamicSlots = true;
|
|
15891
15945
|
}
|
|
15892
|
-
const
|
|
15946
|
+
const vFor = findDir(slotElement, "for");
|
|
15947
|
+
const slotFunction = buildSlotFn(
|
|
15948
|
+
slotProps,
|
|
15949
|
+
vFor == null ? void 0 : vFor.exp,
|
|
15950
|
+
slotChildren,
|
|
15951
|
+
slotLoc
|
|
15952
|
+
);
|
|
15893
15953
|
let vIf;
|
|
15894
15954
|
let vElse;
|
|
15895
|
-
let vFor;
|
|
15896
15955
|
if (vIf = findDir(slotElement, "if")) {
|
|
15897
15956
|
hasDynamicSlots = true;
|
|
15898
15957
|
dynamicSlots.push(
|
|
@@ -15937,7 +15996,7 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
|
|
|
15937
15996
|
createCompilerError(30, vElse.loc)
|
|
15938
15997
|
);
|
|
15939
15998
|
}
|
|
15940
|
-
} else if (vFor
|
|
15999
|
+
} else if (vFor) {
|
|
15941
16000
|
hasDynamicSlots = true;
|
|
15942
16001
|
const parseResult = vFor.parseResult || parseForExpression(vFor.exp, context);
|
|
15943
16002
|
if (parseResult) {
|
|
@@ -15978,7 +16037,7 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
|
|
|
15978
16037
|
}
|
|
15979
16038
|
if (!onComponentSlot) {
|
|
15980
16039
|
const buildDefaultSlotProperty = (props, children2) => {
|
|
15981
|
-
const fn = buildSlotFn(props, children2, loc);
|
|
16040
|
+
const fn = buildSlotFn(props, void 0, children2, loc);
|
|
15982
16041
|
if (context.compatConfig) {
|
|
15983
16042
|
fn.isNonScopedSlot = true;
|
|
15984
16043
|
}
|
package/dist/vue.global.js
CHANGED
|
@@ -608,7 +608,7 @@ var Vue = (function () {
|
|
|
608
608
|
} else if (key === "length" && isArray(target)) {
|
|
609
609
|
const newLength = Number(newValue);
|
|
610
610
|
depsMap.forEach((dep, key2) => {
|
|
611
|
-
if (key2 === "length" || key2 >= newLength) {
|
|
611
|
+
if (key2 === "length" || !isSymbol(key2) && key2 >= newLength) {
|
|
612
612
|
deps.push(dep);
|
|
613
613
|
}
|
|
614
614
|
});
|
|
@@ -1704,8 +1704,13 @@ var Vue = (function () {
|
|
|
1704
1704
|
let end = queue.length;
|
|
1705
1705
|
while (start < end) {
|
|
1706
1706
|
const middle = start + end >>> 1;
|
|
1707
|
-
const
|
|
1708
|
-
middleJobId
|
|
1707
|
+
const middleJob = queue[middle];
|
|
1708
|
+
const middleJobId = getId(middleJob);
|
|
1709
|
+
if (middleJobId < id || middleJobId === id && middleJob.pre) {
|
|
1710
|
+
start = middle + 1;
|
|
1711
|
+
} else {
|
|
1712
|
+
end = middle;
|
|
1713
|
+
}
|
|
1709
1714
|
}
|
|
1710
1715
|
return start;
|
|
1711
1716
|
}
|
|
@@ -3293,14 +3298,16 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
3293
3298
|
parentComponent: parentComponent2,
|
|
3294
3299
|
container: container2
|
|
3295
3300
|
} = suspense;
|
|
3301
|
+
let delayEnter = false;
|
|
3296
3302
|
if (suspense.isHydrating) {
|
|
3297
3303
|
suspense.isHydrating = false;
|
|
3298
3304
|
} else if (!resume) {
|
|
3299
|
-
|
|
3305
|
+
delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in";
|
|
3300
3306
|
if (delayEnter) {
|
|
3301
3307
|
activeBranch.transition.afterLeave = () => {
|
|
3302
3308
|
if (pendingId === suspense.pendingId) {
|
|
3303
3309
|
move(pendingBranch, container2, anchor2, 0);
|
|
3310
|
+
queuePostFlushCb(effects);
|
|
3304
3311
|
}
|
|
3305
3312
|
};
|
|
3306
3313
|
}
|
|
@@ -3326,7 +3333,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
3326
3333
|
}
|
|
3327
3334
|
parent = parent.parent;
|
|
3328
3335
|
}
|
|
3329
|
-
if (!hasUnresolvedAncestor) {
|
|
3336
|
+
if (!hasUnresolvedAncestor && !delayEnter) {
|
|
3330
3337
|
queuePostFlushCb(effects);
|
|
3331
3338
|
}
|
|
3332
3339
|
suspense.effects = [];
|
|
@@ -6250,7 +6257,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
6250
6257
|
return vm;
|
|
6251
6258
|
}
|
|
6252
6259
|
}
|
|
6253
|
-
Vue.version = `2.6.14-compat:${"3.3.
|
|
6260
|
+
Vue.version = `2.6.14-compat:${"3.3.7"}`;
|
|
6254
6261
|
Vue.config = singletonApp.config;
|
|
6255
6262
|
Vue.use = (p, ...options) => {
|
|
6256
6263
|
if (p && isFunction(p.install)) {
|
|
@@ -7580,7 +7587,14 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7580
7587
|
break;
|
|
7581
7588
|
case Comment:
|
|
7582
7589
|
if (domType !== 8 /* COMMENT */ || isFragmentStart) {
|
|
7583
|
-
|
|
7590
|
+
if (node.tagName.toLowerCase() === "template") {
|
|
7591
|
+
const content = vnode.el.content.firstChild;
|
|
7592
|
+
replaceNode(content, node, parentComponent);
|
|
7593
|
+
vnode.el = node = content;
|
|
7594
|
+
nextNode = nextSibling(node);
|
|
7595
|
+
} else {
|
|
7596
|
+
nextNode = onMismatch();
|
|
7597
|
+
}
|
|
7584
7598
|
} else {
|
|
7585
7599
|
nextNode = nextSibling(node);
|
|
7586
7600
|
}
|
|
@@ -7622,7 +7636,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7622
7636
|
break;
|
|
7623
7637
|
default:
|
|
7624
7638
|
if (shapeFlag & 1) {
|
|
7625
|
-
if (domType !== 1 /* ELEMENT */ || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) {
|
|
7639
|
+
if ((domType !== 1 /* ELEMENT */ || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) {
|
|
7626
7640
|
nextNode = onMismatch();
|
|
7627
7641
|
} else {
|
|
7628
7642
|
nextNode = hydrateElement(
|
|
@@ -7637,6 +7651,13 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7637
7651
|
} else if (shapeFlag & 6) {
|
|
7638
7652
|
vnode.slotScopeIds = slotScopeIds;
|
|
7639
7653
|
const container = parentNode(node);
|
|
7654
|
+
if (isFragmentStart) {
|
|
7655
|
+
nextNode = locateClosingAnchor(node);
|
|
7656
|
+
} else if (isComment(node) && node.data === "teleport start") {
|
|
7657
|
+
nextNode = locateClosingAnchor(node, node.data, "teleport end");
|
|
7658
|
+
} else {
|
|
7659
|
+
nextNode = nextSibling(node);
|
|
7660
|
+
}
|
|
7640
7661
|
mountComponent(
|
|
7641
7662
|
vnode,
|
|
7642
7663
|
container,
|
|
@@ -7646,10 +7667,6 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7646
7667
|
isSVGContainer(container),
|
|
7647
7668
|
optimized
|
|
7648
7669
|
);
|
|
7649
|
-
nextNode = isFragmentStart ? locateClosingAsyncAnchor(node) : nextSibling(node);
|
|
7650
|
-
if (nextNode && isComment(nextNode) && nextNode.data === "teleport end") {
|
|
7651
|
-
nextNode = nextSibling(nextNode);
|
|
7652
|
-
}
|
|
7653
7670
|
if (isAsyncWrapper(vnode)) {
|
|
7654
7671
|
let subTree;
|
|
7655
7672
|
if (isFragmentStart) {
|
|
@@ -7699,7 +7716,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7699
7716
|
};
|
|
7700
7717
|
const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
|
|
7701
7718
|
optimized = optimized || !!vnode.dynamicChildren;
|
|
7702
|
-
const { type, props, patchFlag, shapeFlag, dirs } = vnode;
|
|
7719
|
+
const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode;
|
|
7703
7720
|
const forcePatchValue = type === "input" && dirs || type === "option";
|
|
7704
7721
|
{
|
|
7705
7722
|
if (dirs) {
|
|
@@ -7736,12 +7753,23 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7736
7753
|
if (vnodeHooks = props && props.onVnodeBeforeMount) {
|
|
7737
7754
|
invokeVNodeHook(vnodeHooks, parentComponent, vnode);
|
|
7738
7755
|
}
|
|
7756
|
+
let needCallTransitionHooks = false;
|
|
7757
|
+
if (isTemplateNode(el)) {
|
|
7758
|
+
needCallTransitionHooks = needTransition(parentSuspense, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
|
|
7759
|
+
const content = el.content.firstChild;
|
|
7760
|
+
if (needCallTransitionHooks) {
|
|
7761
|
+
transition.beforeEnter(content);
|
|
7762
|
+
}
|
|
7763
|
+
replaceNode(content, el, parentComponent);
|
|
7764
|
+
vnode.el = el = content;
|
|
7765
|
+
}
|
|
7739
7766
|
if (dirs) {
|
|
7740
7767
|
invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
|
|
7741
7768
|
}
|
|
7742
|
-
if ((vnodeHooks = props && props.onVnodeMounted) || dirs) {
|
|
7769
|
+
if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) {
|
|
7743
7770
|
queueEffectWithSuspense(() => {
|
|
7744
7771
|
vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode);
|
|
7772
|
+
needCallTransitionHooks && transition.enter(el);
|
|
7745
7773
|
dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
|
|
7746
7774
|
}, parentSuspense);
|
|
7747
7775
|
}
|
|
@@ -7859,7 +7887,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7859
7887
|
);
|
|
7860
7888
|
vnode.el = null;
|
|
7861
7889
|
if (isFragment) {
|
|
7862
|
-
const end =
|
|
7890
|
+
const end = locateClosingAnchor(node);
|
|
7863
7891
|
while (true) {
|
|
7864
7892
|
const next2 = nextSibling(node);
|
|
7865
7893
|
if (next2 && next2 !== end) {
|
|
@@ -7884,14 +7912,14 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7884
7912
|
);
|
|
7885
7913
|
return next;
|
|
7886
7914
|
};
|
|
7887
|
-
const
|
|
7915
|
+
const locateClosingAnchor = (node, open = "[", close = "]") => {
|
|
7888
7916
|
let match = 0;
|
|
7889
7917
|
while (node) {
|
|
7890
7918
|
node = nextSibling(node);
|
|
7891
7919
|
if (node && isComment(node)) {
|
|
7892
|
-
if (node.data ===
|
|
7920
|
+
if (node.data === open)
|
|
7893
7921
|
match++;
|
|
7894
|
-
if (node.data ===
|
|
7922
|
+
if (node.data === close) {
|
|
7895
7923
|
if (match === 0) {
|
|
7896
7924
|
return nextSibling(node);
|
|
7897
7925
|
} else {
|
|
@@ -7902,6 +7930,23 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7902
7930
|
}
|
|
7903
7931
|
return node;
|
|
7904
7932
|
};
|
|
7933
|
+
const replaceNode = (newNode, oldNode, parentComponent) => {
|
|
7934
|
+
const parentNode2 = oldNode.parentNode;
|
|
7935
|
+
if (parentNode2) {
|
|
7936
|
+
parentNode2.replaceChild(newNode, oldNode);
|
|
7937
|
+
}
|
|
7938
|
+
let parent = parentComponent;
|
|
7939
|
+
while (parent) {
|
|
7940
|
+
if (parent.vnode.el === oldNode) {
|
|
7941
|
+
parent.vnode.el = newNode;
|
|
7942
|
+
parent.subTree.el = newNode;
|
|
7943
|
+
}
|
|
7944
|
+
parent = parent.parent;
|
|
7945
|
+
}
|
|
7946
|
+
};
|
|
7947
|
+
const isTemplateNode = (node) => {
|
|
7948
|
+
return node.nodeType === 1 /* ELEMENT */ && node.tagName.toLowerCase() === "template";
|
|
7949
|
+
};
|
|
7905
7950
|
return [hydrate, hydrateNode];
|
|
7906
7951
|
}
|
|
7907
7952
|
|
|
@@ -8229,7 +8274,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8229
8274
|
if (dirs) {
|
|
8230
8275
|
invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
|
|
8231
8276
|
}
|
|
8232
|
-
const needCallTransitionHooks = (
|
|
8277
|
+
const needCallTransitionHooks = needTransition(parentSuspense, transition);
|
|
8233
8278
|
if (needCallTransitionHooks) {
|
|
8234
8279
|
transition.beforeEnter(el);
|
|
8235
8280
|
}
|
|
@@ -9146,8 +9191,8 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9146
9191
|
moveStaticNode(vnode, container, anchor);
|
|
9147
9192
|
return;
|
|
9148
9193
|
}
|
|
9149
|
-
const
|
|
9150
|
-
if (
|
|
9194
|
+
const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition;
|
|
9195
|
+
if (needTransition2) {
|
|
9151
9196
|
if (moveType === 0) {
|
|
9152
9197
|
transition.beforeEnter(el);
|
|
9153
9198
|
hostInsert(el, container, anchor);
|
|
@@ -9376,6 +9421,9 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9376
9421
|
function toggleRecurse({ effect, update }, allowed) {
|
|
9377
9422
|
effect.allowRecurse = update.allowRecurse = allowed;
|
|
9378
9423
|
}
|
|
9424
|
+
function needTransition(parentSuspense, transition) {
|
|
9425
|
+
return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted;
|
|
9426
|
+
}
|
|
9379
9427
|
function traverseStaticChildren(n1, n2, shallow = false) {
|
|
9380
9428
|
const ch1 = n1.children;
|
|
9381
9429
|
const ch2 = n2.children;
|
|
@@ -10778,7 +10826,7 @@ Component that was made reactive: `,
|
|
|
10778
10826
|
return true;
|
|
10779
10827
|
}
|
|
10780
10828
|
|
|
10781
|
-
const version = "3.3.
|
|
10829
|
+
const version = "3.3.7";
|
|
10782
10830
|
const ssrUtils = null;
|
|
10783
10831
|
const resolveFilter = resolveFilter$1 ;
|
|
10784
10832
|
const _compatUtils = {
|
|
@@ -14068,9 +14116,13 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14068
14116
|
context.transformHoist(children, context, node);
|
|
14069
14117
|
}
|
|
14070
14118
|
if (hoistedCount && hoistedCount === originalCount && node.type === 1 && node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && isArray(node.codegenNode.children)) {
|
|
14071
|
-
|
|
14119
|
+
const hoisted = context.hoist(
|
|
14072
14120
|
createArrayExpression(node.codegenNode.children)
|
|
14073
14121
|
);
|
|
14122
|
+
if (context.hmr) {
|
|
14123
|
+
hoisted.content = `[...${hoisted.content}]`;
|
|
14124
|
+
}
|
|
14125
|
+
node.codegenNode.children = hoisted;
|
|
14074
14126
|
}
|
|
14075
14127
|
}
|
|
14076
14128
|
function getConstantType(node, context) {
|
|
@@ -14243,6 +14295,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14243
14295
|
filename = "",
|
|
14244
14296
|
prefixIdentifiers = false,
|
|
14245
14297
|
hoistStatic: hoistStatic2 = false,
|
|
14298
|
+
hmr = false,
|
|
14246
14299
|
cacheHandlers = false,
|
|
14247
14300
|
nodeTransforms = [],
|
|
14248
14301
|
directiveTransforms = {},
|
|
@@ -14268,6 +14321,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14268
14321
|
selfName: nameMatch && capitalize(camelize(nameMatch[1])),
|
|
14269
14322
|
prefixIdentifiers,
|
|
14270
14323
|
hoistStatic: hoistStatic2,
|
|
14324
|
+
hmr,
|
|
14271
14325
|
cacheHandlers,
|
|
14272
14326
|
nodeTransforms,
|
|
14273
14327
|
directiveTransforms,
|
|
@@ -15651,7 +15705,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15651
15705
|
}
|
|
15652
15706
|
}
|
|
15653
15707
|
};
|
|
15654
|
-
const buildClientSlotFn = (props, children, loc) => createFunctionExpression(
|
|
15708
|
+
const buildClientSlotFn = (props, _vForExp, children, loc) => createFunctionExpression(
|
|
15655
15709
|
props,
|
|
15656
15710
|
children,
|
|
15657
15711
|
false,
|
|
@@ -15673,7 +15727,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15673
15727
|
slotsProperties.push(
|
|
15674
15728
|
createObjectProperty(
|
|
15675
15729
|
arg || createSimpleExpression("default", true),
|
|
15676
|
-
buildSlotFn(exp, children, loc)
|
|
15730
|
+
buildSlotFn(exp, void 0, children, loc)
|
|
15677
15731
|
)
|
|
15678
15732
|
);
|
|
15679
15733
|
}
|
|
@@ -15710,10 +15764,15 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15710
15764
|
} else {
|
|
15711
15765
|
hasDynamicSlots = true;
|
|
15712
15766
|
}
|
|
15713
|
-
const
|
|
15767
|
+
const vFor = findDir(slotElement, "for");
|
|
15768
|
+
const slotFunction = buildSlotFn(
|
|
15769
|
+
slotProps,
|
|
15770
|
+
vFor == null ? void 0 : vFor.exp,
|
|
15771
|
+
slotChildren,
|
|
15772
|
+
slotLoc
|
|
15773
|
+
);
|
|
15714
15774
|
let vIf;
|
|
15715
15775
|
let vElse;
|
|
15716
|
-
let vFor;
|
|
15717
15776
|
if (vIf = findDir(slotElement, "if")) {
|
|
15718
15777
|
hasDynamicSlots = true;
|
|
15719
15778
|
dynamicSlots.push(
|
|
@@ -15758,7 +15817,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15758
15817
|
createCompilerError(30, vElse.loc)
|
|
15759
15818
|
);
|
|
15760
15819
|
}
|
|
15761
|
-
} else if (vFor
|
|
15820
|
+
} else if (vFor) {
|
|
15762
15821
|
hasDynamicSlots = true;
|
|
15763
15822
|
const parseResult = vFor.parseResult || parseForExpression(vFor.exp, context);
|
|
15764
15823
|
if (parseResult) {
|
|
@@ -15799,7 +15858,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15799
15858
|
}
|
|
15800
15859
|
if (!onComponentSlot) {
|
|
15801
15860
|
const buildDefaultSlotProperty = (props, children2) => {
|
|
15802
|
-
const fn = buildSlotFn(props, children2, loc);
|
|
15861
|
+
const fn = buildSlotFn(props, void 0, children2, loc);
|
|
15803
15862
|
if (context.compatConfig) {
|
|
15804
15863
|
fn.isNonScopedSlot = true;
|
|
15805
15864
|
}
|