vue 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.esm-browser.js +87 -28
- package/dist/vue.esm-browser.prod.js +5 -5
- package/dist/vue.global.js +87 -28
- package/dist/vue.global.prod.js +4 -4
- package/dist/vue.runtime.esm-browser.js +69 -21
- package/dist/vue.runtime.esm-browser.prod.js +4 -4
- package/dist/vue.runtime.global.js +69 -21
- package/dist/vue.runtime.global.prod.js +4 -4
- package/package.json +6 -6
package/dist/vue.global.js
CHANGED
|
@@ -608,7 +608,7 @@ var Vue = (function (exports) {
|
|
|
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 (exports) {
|
|
|
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
|
}
|
|
@@ -2820,14 +2825,16 @@ var Vue = (function (exports) {
|
|
|
2820
2825
|
parentComponent: parentComponent2,
|
|
2821
2826
|
container: container2
|
|
2822
2827
|
} = suspense;
|
|
2828
|
+
let delayEnter = false;
|
|
2823
2829
|
if (suspense.isHydrating) {
|
|
2824
2830
|
suspense.isHydrating = false;
|
|
2825
2831
|
} else if (!resume) {
|
|
2826
|
-
|
|
2832
|
+
delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in";
|
|
2827
2833
|
if (delayEnter) {
|
|
2828
2834
|
activeBranch.transition.afterLeave = () => {
|
|
2829
2835
|
if (pendingId === suspense.pendingId) {
|
|
2830
2836
|
move(pendingBranch, container2, anchor2, 0);
|
|
2837
|
+
queuePostFlushCb(effects);
|
|
2831
2838
|
}
|
|
2832
2839
|
};
|
|
2833
2840
|
}
|
|
@@ -2853,7 +2860,7 @@ var Vue = (function (exports) {
|
|
|
2853
2860
|
}
|
|
2854
2861
|
parent = parent.parent;
|
|
2855
2862
|
}
|
|
2856
|
-
if (!hasUnresolvedAncestor) {
|
|
2863
|
+
if (!hasUnresolvedAncestor && !delayEnter) {
|
|
2857
2864
|
queuePostFlushCb(effects);
|
|
2858
2865
|
}
|
|
2859
2866
|
suspense.effects = [];
|
|
@@ -5995,7 +6002,14 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
5995
6002
|
break;
|
|
5996
6003
|
case Comment:
|
|
5997
6004
|
if (domType !== 8 /* COMMENT */ || isFragmentStart) {
|
|
5998
|
-
|
|
6005
|
+
if (node.tagName.toLowerCase() === "template") {
|
|
6006
|
+
const content = vnode.el.content.firstChild;
|
|
6007
|
+
replaceNode(content, node, parentComponent);
|
|
6008
|
+
vnode.el = node = content;
|
|
6009
|
+
nextNode = nextSibling(node);
|
|
6010
|
+
} else {
|
|
6011
|
+
nextNode = onMismatch();
|
|
6012
|
+
}
|
|
5999
6013
|
} else {
|
|
6000
6014
|
nextNode = nextSibling(node);
|
|
6001
6015
|
}
|
|
@@ -6037,7 +6051,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
6037
6051
|
break;
|
|
6038
6052
|
default:
|
|
6039
6053
|
if (shapeFlag & 1) {
|
|
6040
|
-
if (domType !== 1 /* ELEMENT */ || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) {
|
|
6054
|
+
if ((domType !== 1 /* ELEMENT */ || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) {
|
|
6041
6055
|
nextNode = onMismatch();
|
|
6042
6056
|
} else {
|
|
6043
6057
|
nextNode = hydrateElement(
|
|
@@ -6052,6 +6066,13 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
6052
6066
|
} else if (shapeFlag & 6) {
|
|
6053
6067
|
vnode.slotScopeIds = slotScopeIds;
|
|
6054
6068
|
const container = parentNode(node);
|
|
6069
|
+
if (isFragmentStart) {
|
|
6070
|
+
nextNode = locateClosingAnchor(node);
|
|
6071
|
+
} else if (isComment(node) && node.data === "teleport start") {
|
|
6072
|
+
nextNode = locateClosingAnchor(node, node.data, "teleport end");
|
|
6073
|
+
} else {
|
|
6074
|
+
nextNode = nextSibling(node);
|
|
6075
|
+
}
|
|
6055
6076
|
mountComponent(
|
|
6056
6077
|
vnode,
|
|
6057
6078
|
container,
|
|
@@ -6061,10 +6082,6 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
6061
6082
|
isSVGContainer(container),
|
|
6062
6083
|
optimized
|
|
6063
6084
|
);
|
|
6064
|
-
nextNode = isFragmentStart ? locateClosingAsyncAnchor(node) : nextSibling(node);
|
|
6065
|
-
if (nextNode && isComment(nextNode) && nextNode.data === "teleport end") {
|
|
6066
|
-
nextNode = nextSibling(nextNode);
|
|
6067
|
-
}
|
|
6068
6085
|
if (isAsyncWrapper(vnode)) {
|
|
6069
6086
|
let subTree;
|
|
6070
6087
|
if (isFragmentStart) {
|
|
@@ -6114,7 +6131,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
6114
6131
|
};
|
|
6115
6132
|
const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
|
|
6116
6133
|
optimized = optimized || !!vnode.dynamicChildren;
|
|
6117
|
-
const { type, props, patchFlag, shapeFlag, dirs } = vnode;
|
|
6134
|
+
const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode;
|
|
6118
6135
|
const forcePatchValue = type === "input" && dirs || type === "option";
|
|
6119
6136
|
{
|
|
6120
6137
|
if (dirs) {
|
|
@@ -6151,12 +6168,23 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
6151
6168
|
if (vnodeHooks = props && props.onVnodeBeforeMount) {
|
|
6152
6169
|
invokeVNodeHook(vnodeHooks, parentComponent, vnode);
|
|
6153
6170
|
}
|
|
6171
|
+
let needCallTransitionHooks = false;
|
|
6172
|
+
if (isTemplateNode(el)) {
|
|
6173
|
+
needCallTransitionHooks = needTransition(parentSuspense, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
|
|
6174
|
+
const content = el.content.firstChild;
|
|
6175
|
+
if (needCallTransitionHooks) {
|
|
6176
|
+
transition.beforeEnter(content);
|
|
6177
|
+
}
|
|
6178
|
+
replaceNode(content, el, parentComponent);
|
|
6179
|
+
vnode.el = el = content;
|
|
6180
|
+
}
|
|
6154
6181
|
if (dirs) {
|
|
6155
6182
|
invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
|
|
6156
6183
|
}
|
|
6157
|
-
if ((vnodeHooks = props && props.onVnodeMounted) || dirs) {
|
|
6184
|
+
if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) {
|
|
6158
6185
|
queueEffectWithSuspense(() => {
|
|
6159
6186
|
vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode);
|
|
6187
|
+
needCallTransitionHooks && transition.enter(el);
|
|
6160
6188
|
dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
|
|
6161
6189
|
}, parentSuspense);
|
|
6162
6190
|
}
|
|
@@ -6274,7 +6302,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
6274
6302
|
);
|
|
6275
6303
|
vnode.el = null;
|
|
6276
6304
|
if (isFragment) {
|
|
6277
|
-
const end =
|
|
6305
|
+
const end = locateClosingAnchor(node);
|
|
6278
6306
|
while (true) {
|
|
6279
6307
|
const next2 = nextSibling(node);
|
|
6280
6308
|
if (next2 && next2 !== end) {
|
|
@@ -6299,14 +6327,14 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
6299
6327
|
);
|
|
6300
6328
|
return next;
|
|
6301
6329
|
};
|
|
6302
|
-
const
|
|
6330
|
+
const locateClosingAnchor = (node, open = "[", close = "]") => {
|
|
6303
6331
|
let match = 0;
|
|
6304
6332
|
while (node) {
|
|
6305
6333
|
node = nextSibling(node);
|
|
6306
6334
|
if (node && isComment(node)) {
|
|
6307
|
-
if (node.data ===
|
|
6335
|
+
if (node.data === open)
|
|
6308
6336
|
match++;
|
|
6309
|
-
if (node.data ===
|
|
6337
|
+
if (node.data === close) {
|
|
6310
6338
|
if (match === 0) {
|
|
6311
6339
|
return nextSibling(node);
|
|
6312
6340
|
} else {
|
|
@@ -6317,6 +6345,23 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
6317
6345
|
}
|
|
6318
6346
|
return node;
|
|
6319
6347
|
};
|
|
6348
|
+
const replaceNode = (newNode, oldNode, parentComponent) => {
|
|
6349
|
+
const parentNode2 = oldNode.parentNode;
|
|
6350
|
+
if (parentNode2) {
|
|
6351
|
+
parentNode2.replaceChild(newNode, oldNode);
|
|
6352
|
+
}
|
|
6353
|
+
let parent = parentComponent;
|
|
6354
|
+
while (parent) {
|
|
6355
|
+
if (parent.vnode.el === oldNode) {
|
|
6356
|
+
parent.vnode.el = newNode;
|
|
6357
|
+
parent.subTree.el = newNode;
|
|
6358
|
+
}
|
|
6359
|
+
parent = parent.parent;
|
|
6360
|
+
}
|
|
6361
|
+
};
|
|
6362
|
+
const isTemplateNode = (node) => {
|
|
6363
|
+
return node.nodeType === 1 /* ELEMENT */ && node.tagName.toLowerCase() === "template";
|
|
6364
|
+
};
|
|
6320
6365
|
return [hydrate, hydrateNode];
|
|
6321
6366
|
}
|
|
6322
6367
|
|
|
@@ -6644,7 +6689,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
6644
6689
|
if (dirs) {
|
|
6645
6690
|
invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
|
|
6646
6691
|
}
|
|
6647
|
-
const needCallTransitionHooks = (
|
|
6692
|
+
const needCallTransitionHooks = needTransition(parentSuspense, transition);
|
|
6648
6693
|
if (needCallTransitionHooks) {
|
|
6649
6694
|
transition.beforeEnter(el);
|
|
6650
6695
|
}
|
|
@@ -7536,8 +7581,8 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7536
7581
|
moveStaticNode(vnode, container, anchor);
|
|
7537
7582
|
return;
|
|
7538
7583
|
}
|
|
7539
|
-
const
|
|
7540
|
-
if (
|
|
7584
|
+
const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition;
|
|
7585
|
+
if (needTransition2) {
|
|
7541
7586
|
if (moveType === 0) {
|
|
7542
7587
|
transition.beforeEnter(el);
|
|
7543
7588
|
hostInsert(el, container, anchor);
|
|
@@ -7757,6 +7802,9 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7757
7802
|
function toggleRecurse({ effect, update }, allowed) {
|
|
7758
7803
|
effect.allowRecurse = update.allowRecurse = allowed;
|
|
7759
7804
|
}
|
|
7805
|
+
function needTransition(parentSuspense, transition) {
|
|
7806
|
+
return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted;
|
|
7807
|
+
}
|
|
7760
7808
|
function traverseStaticChildren(n1, n2, shallow = false) {
|
|
7761
7809
|
const ch1 = n1.children;
|
|
7762
7810
|
const ch2 = n2.children;
|
|
@@ -9086,7 +9134,7 @@ Component that was made reactive: `,
|
|
|
9086
9134
|
return true;
|
|
9087
9135
|
}
|
|
9088
9136
|
|
|
9089
|
-
const version = "3.3.
|
|
9137
|
+
const version = "3.3.7";
|
|
9090
9138
|
const ssrUtils = null;
|
|
9091
9139
|
const resolveFilter = null;
|
|
9092
9140
|
const compatUtils = null;
|
|
@@ -11900,9 +11948,13 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
11900
11948
|
context.transformHoist(children, context, node);
|
|
11901
11949
|
}
|
|
11902
11950
|
if (hoistedCount && hoistedCount === originalCount && node.type === 1 && node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && isArray(node.codegenNode.children)) {
|
|
11903
|
-
|
|
11951
|
+
const hoisted = context.hoist(
|
|
11904
11952
|
createArrayExpression(node.codegenNode.children)
|
|
11905
11953
|
);
|
|
11954
|
+
if (context.hmr) {
|
|
11955
|
+
hoisted.content = `[...${hoisted.content}]`;
|
|
11956
|
+
}
|
|
11957
|
+
node.codegenNode.children = hoisted;
|
|
11906
11958
|
}
|
|
11907
11959
|
}
|
|
11908
11960
|
function getConstantType(node, context) {
|
|
@@ -12075,6 +12127,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
12075
12127
|
filename = "",
|
|
12076
12128
|
prefixIdentifiers = false,
|
|
12077
12129
|
hoistStatic: hoistStatic2 = false,
|
|
12130
|
+
hmr = false,
|
|
12078
12131
|
cacheHandlers = false,
|
|
12079
12132
|
nodeTransforms = [],
|
|
12080
12133
|
directiveTransforms = {},
|
|
@@ -12100,6 +12153,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
12100
12153
|
selfName: nameMatch && capitalize(camelize(nameMatch[1])),
|
|
12101
12154
|
prefixIdentifiers,
|
|
12102
12155
|
hoistStatic: hoistStatic2,
|
|
12156
|
+
hmr,
|
|
12103
12157
|
cacheHandlers,
|
|
12104
12158
|
nodeTransforms,
|
|
12105
12159
|
directiveTransforms,
|
|
@@ -13469,7 +13523,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13469
13523
|
}
|
|
13470
13524
|
}
|
|
13471
13525
|
};
|
|
13472
|
-
const buildClientSlotFn = (props, children, loc) => createFunctionExpression(
|
|
13526
|
+
const buildClientSlotFn = (props, _vForExp, children, loc) => createFunctionExpression(
|
|
13473
13527
|
props,
|
|
13474
13528
|
children,
|
|
13475
13529
|
false,
|
|
@@ -13491,7 +13545,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13491
13545
|
slotsProperties.push(
|
|
13492
13546
|
createObjectProperty(
|
|
13493
13547
|
arg || createSimpleExpression("default", true),
|
|
13494
|
-
buildSlotFn(exp, children, loc)
|
|
13548
|
+
buildSlotFn(exp, void 0, children, loc)
|
|
13495
13549
|
)
|
|
13496
13550
|
);
|
|
13497
13551
|
}
|
|
@@ -13528,10 +13582,15 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13528
13582
|
} else {
|
|
13529
13583
|
hasDynamicSlots = true;
|
|
13530
13584
|
}
|
|
13531
|
-
const
|
|
13585
|
+
const vFor = findDir(slotElement, "for");
|
|
13586
|
+
const slotFunction = buildSlotFn(
|
|
13587
|
+
slotProps,
|
|
13588
|
+
vFor == null ? void 0 : vFor.exp,
|
|
13589
|
+
slotChildren,
|
|
13590
|
+
slotLoc
|
|
13591
|
+
);
|
|
13532
13592
|
let vIf;
|
|
13533
13593
|
let vElse;
|
|
13534
|
-
let vFor;
|
|
13535
13594
|
if (vIf = findDir(slotElement, "if")) {
|
|
13536
13595
|
hasDynamicSlots = true;
|
|
13537
13596
|
dynamicSlots.push(
|
|
@@ -13576,7 +13635,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13576
13635
|
createCompilerError(30, vElse.loc)
|
|
13577
13636
|
);
|
|
13578
13637
|
}
|
|
13579
|
-
} else if (vFor
|
|
13638
|
+
} else if (vFor) {
|
|
13580
13639
|
hasDynamicSlots = true;
|
|
13581
13640
|
const parseResult = vFor.parseResult || parseForExpression(vFor.exp, context);
|
|
13582
13641
|
if (parseResult) {
|
|
@@ -13617,7 +13676,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13617
13676
|
}
|
|
13618
13677
|
if (!onComponentSlot) {
|
|
13619
13678
|
const buildDefaultSlotProperty = (props, children2) => {
|
|
13620
|
-
const fn = buildSlotFn(props, children2, loc);
|
|
13679
|
+
const fn = buildSlotFn(props, void 0, children2, loc);
|
|
13621
13680
|
return createObjectProperty(`default`, fn);
|
|
13622
13681
|
};
|
|
13623
13682
|
if (!hasTemplateSlots) {
|