@vue/runtime-core 3.2.2 → 3.2.6
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/runtime-core.cjs.js +36 -51
- package/dist/runtime-core.cjs.prod.js +33 -48
- package/dist/runtime-core.d.ts +6 -32
- package/dist/runtime-core.esm-bundler.js +37 -47
- package/package.json +3 -3
package/dist/runtime-core.cjs.js
CHANGED
|
@@ -797,8 +797,7 @@ function renderComponentRoot(instance) {
|
|
|
797
797
|
const keys = Object.keys(fallthroughAttrs);
|
|
798
798
|
const { shapeFlag } = root;
|
|
799
799
|
if (keys.length) {
|
|
800
|
-
if (shapeFlag & 1 /* ELEMENT */
|
|
801
|
-
shapeFlag & 6 /* COMPONENT */) {
|
|
800
|
+
if (shapeFlag & (1 /* ELEMENT */ | 6 /* COMPONENT */)) {
|
|
802
801
|
if (propsOptions && keys.some(shared.isModelListener)) {
|
|
803
802
|
// If a v-model listener (onUpdate:xxx) has a corresponding declared
|
|
804
803
|
// prop, it indicates this component expects to handle v-model and
|
|
@@ -846,8 +845,7 @@ function renderComponentRoot(instance) {
|
|
|
846
845
|
if (false &&
|
|
847
846
|
isCompatEnabled("INSTANCE_ATTRS_CLASS_STYLE" /* INSTANCE_ATTRS_CLASS_STYLE */, instance) &&
|
|
848
847
|
vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */ &&
|
|
849
|
-
|
|
850
|
-
root.shapeFlag & 6 /* COMPONENT */)) ;
|
|
848
|
+
root.shapeFlag & (1 /* ELEMENT */ | 6 /* COMPONENT */)) ;
|
|
851
849
|
// inherit directives
|
|
852
850
|
if (vnode.dirs) {
|
|
853
851
|
if (true && !isElementRoot(root)) {
|
|
@@ -948,8 +946,7 @@ const filterModelListeners = (attrs, props) => {
|
|
|
948
946
|
return res;
|
|
949
947
|
};
|
|
950
948
|
const isElementRoot = (vnode) => {
|
|
951
|
-
return (vnode.shapeFlag & 6 /* COMPONENT */ ||
|
|
952
|
-
vnode.shapeFlag & 1 /* ELEMENT */ ||
|
|
949
|
+
return (vnode.shapeFlag & (6 /* COMPONENT */ | 1 /* ELEMENT */) ||
|
|
953
950
|
vnode.type === Comment$1 // potential v-if branch switch
|
|
954
951
|
);
|
|
955
952
|
};
|
|
@@ -3157,13 +3154,13 @@ const normalizeSlotValue = (value) => shared.isArray(value)
|
|
|
3157
3154
|
? value.map(normalizeVNode)
|
|
3158
3155
|
: [normalizeVNode(value)];
|
|
3159
3156
|
const normalizeSlot = (key, rawSlot, ctx) => {
|
|
3160
|
-
const normalized = withCtx((
|
|
3157
|
+
const normalized = withCtx((...args) => {
|
|
3161
3158
|
if (currentInstance) {
|
|
3162
3159
|
warn(`Slot "${key}" invoked outside of the render function: ` +
|
|
3163
3160
|
`this will not track dependencies used in the slot. ` +
|
|
3164
3161
|
`Invoke the slot function inside the render function instead.`);
|
|
3165
3162
|
}
|
|
3166
|
-
return normalizeSlotValue(rawSlot(
|
|
3163
|
+
return normalizeSlotValue(rawSlot(...args));
|
|
3167
3164
|
}, ctx);
|
|
3168
3165
|
normalized._c = false;
|
|
3169
3166
|
return normalized;
|
|
@@ -3675,8 +3672,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
3675
3672
|
if (props) {
|
|
3676
3673
|
if (forcePatchValue ||
|
|
3677
3674
|
!optimized ||
|
|
3678
|
-
patchFlag & 16 /* FULL_PROPS */
|
|
3679
|
-
patchFlag & 32 /* HYDRATE_EVENTS */) {
|
|
3675
|
+
patchFlag & (16 /* FULL_PROPS */ | 32 /* HYDRATE_EVENTS */)) {
|
|
3680
3676
|
for (const key in props) {
|
|
3681
3677
|
if ((forcePatchValue && key.endsWith('value')) ||
|
|
3682
3678
|
(shared.isOn(key) && !shared.isReservedProp(key))) {
|
|
@@ -4155,6 +4151,17 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4155
4151
|
optimized = false;
|
|
4156
4152
|
dynamicChildren = null;
|
|
4157
4153
|
}
|
|
4154
|
+
const areChildrenSVG = isSVG && n2.type !== 'foreignObject';
|
|
4155
|
+
if (dynamicChildren) {
|
|
4156
|
+
patchBlockChildren(n1.dynamicChildren, dynamicChildren, el, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds);
|
|
4157
|
+
if (parentComponent && parentComponent.type.__hmrId) {
|
|
4158
|
+
traverseStaticChildren(n1, n2);
|
|
4159
|
+
}
|
|
4160
|
+
}
|
|
4161
|
+
else if (!optimized) {
|
|
4162
|
+
// full diff
|
|
4163
|
+
patchChildren(n1, n2, el, null, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds, false);
|
|
4164
|
+
}
|
|
4158
4165
|
if (patchFlag > 0) {
|
|
4159
4166
|
// the presence of a patchFlag means this element's render code was
|
|
4160
4167
|
// generated by the compiler and can take the fast path.
|
|
@@ -4209,17 +4216,6 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4209
4216
|
// unoptimized, full diff
|
|
4210
4217
|
patchProps(el, n2, oldProps, newProps, parentComponent, parentSuspense, isSVG);
|
|
4211
4218
|
}
|
|
4212
|
-
const areChildrenSVG = isSVG && n2.type !== 'foreignObject';
|
|
4213
|
-
if (dynamicChildren) {
|
|
4214
|
-
patchBlockChildren(n1.dynamicChildren, dynamicChildren, el, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds);
|
|
4215
|
-
if (parentComponent && parentComponent.type.__hmrId) {
|
|
4216
|
-
traverseStaticChildren(n1, n2);
|
|
4217
|
-
}
|
|
4218
|
-
}
|
|
4219
|
-
else if (!optimized) {
|
|
4220
|
-
// full diff
|
|
4221
|
-
patchChildren(n1, n2, el, null, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds, false);
|
|
4222
|
-
}
|
|
4223
4219
|
if ((vnodeHook = newProps.onVnodeUpdated) || dirs) {
|
|
4224
4220
|
queuePostRenderEffect(() => {
|
|
4225
4221
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
@@ -4244,8 +4240,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4244
4240
|
// which also requires the correct parent container
|
|
4245
4241
|
!isSameVNodeType(oldVNode, newVNode) ||
|
|
4246
4242
|
// - In the case of a component, it could contain anything.
|
|
4247
|
-
oldVNode.shapeFlag & 6 /* COMPONENT */
|
|
4248
|
-
oldVNode.shapeFlag & 64 /* TELEPORT */)
|
|
4243
|
+
oldVNode.shapeFlag & (6 /* COMPONENT */ | 64 /* TELEPORT */))
|
|
4249
4244
|
? hostParentNode(oldVNode.el)
|
|
4250
4245
|
: // In other cases, the parent container is not actually used so we
|
|
4251
4246
|
// just pass the block element here to avoid a DOM parentNode call.
|
|
@@ -4428,13 +4423,15 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4428
4423
|
let vnodeHook;
|
|
4429
4424
|
const { el, props } = initialVNode;
|
|
4430
4425
|
const { bm, m, parent } = instance;
|
|
4426
|
+
const isAsyncWrapperVNode = isAsyncWrapper(initialVNode);
|
|
4431
4427
|
effect.allowRecurse = false;
|
|
4432
4428
|
// beforeMount hook
|
|
4433
4429
|
if (bm) {
|
|
4434
4430
|
shared.invokeArrayFns(bm);
|
|
4435
4431
|
}
|
|
4436
4432
|
// onVnodeBeforeMount
|
|
4437
|
-
if (
|
|
4433
|
+
if (!isAsyncWrapperVNode &&
|
|
4434
|
+
(vnodeHook = props && props.onVnodeBeforeMount)) {
|
|
4438
4435
|
invokeVNodeHook(vnodeHook, parent, initialVNode);
|
|
4439
4436
|
}
|
|
4440
4437
|
effect.allowRecurse = true;
|
|
@@ -4456,7 +4453,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4456
4453
|
endMeasure(instance, `hydrate`);
|
|
4457
4454
|
}
|
|
4458
4455
|
};
|
|
4459
|
-
if (
|
|
4456
|
+
if (isAsyncWrapperVNode) {
|
|
4460
4457
|
initialVNode.type.__asyncLoader().then(
|
|
4461
4458
|
// note: we are moving the render call into an async callback,
|
|
4462
4459
|
// which means it won't track dependencies - but it's ok because
|
|
@@ -4490,7 +4487,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4490
4487
|
queuePostRenderEffect(m, parentSuspense);
|
|
4491
4488
|
}
|
|
4492
4489
|
// onVnodeMounted
|
|
4493
|
-
if (
|
|
4490
|
+
if (!isAsyncWrapperVNode &&
|
|
4491
|
+
(vnodeHook = props && props.onVnodeMounted)) {
|
|
4494
4492
|
const scopedInitialVNode = initialVNode;
|
|
4495
4493
|
queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), parentSuspense);
|
|
4496
4494
|
}
|
|
@@ -4517,6 +4515,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4517
4515
|
{
|
|
4518
4516
|
pushWarningContext(next || instance.vnode);
|
|
4519
4517
|
}
|
|
4518
|
+
// Disallow component effect recursion during pre-lifecycle hooks.
|
|
4519
|
+
effect.allowRecurse = false;
|
|
4520
4520
|
if (next) {
|
|
4521
4521
|
next.el = vnode.el;
|
|
4522
4522
|
updateComponentPreRender(instance, next, optimized);
|
|
@@ -4524,8 +4524,6 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4524
4524
|
else {
|
|
4525
4525
|
next = vnode;
|
|
4526
4526
|
}
|
|
4527
|
-
// Disallow component effect recursion during pre-lifecycle hooks.
|
|
4528
|
-
effect.allowRecurse = false;
|
|
4529
4527
|
// beforeUpdate hook
|
|
4530
4528
|
if (bu) {
|
|
4531
4529
|
shared.invokeArrayFns(bu);
|
|
@@ -4928,8 +4926,10 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4928
4926
|
return;
|
|
4929
4927
|
}
|
|
4930
4928
|
const shouldInvokeDirs = shapeFlag & 1 /* ELEMENT */ && dirs;
|
|
4929
|
+
const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);
|
|
4931
4930
|
let vnodeHook;
|
|
4932
|
-
if (
|
|
4931
|
+
if (shouldInvokeVnodeHook &&
|
|
4932
|
+
(vnodeHook = props && props.onVnodeBeforeUnmount)) {
|
|
4933
4933
|
invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
4934
4934
|
}
|
|
4935
4935
|
if (shapeFlag & 6 /* COMPONENT */) {
|
|
@@ -4954,8 +4954,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4954
4954
|
unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);
|
|
4955
4955
|
}
|
|
4956
4956
|
else if ((type === Fragment &&
|
|
4957
|
-
|
|
4958
|
-
|
|
4957
|
+
patchFlag &
|
|
4958
|
+
(128 /* KEYED_FRAGMENT */ | 256 /* UNKEYED_FRAGMENT */)) ||
|
|
4959
4959
|
(!optimized && shapeFlag & 16 /* ARRAY_CHILDREN */)) {
|
|
4960
4960
|
unmountChildren(children, parentComponent, parentSuspense);
|
|
4961
4961
|
}
|
|
@@ -4963,7 +4963,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4963
4963
|
remove(vnode);
|
|
4964
4964
|
}
|
|
4965
4965
|
}
|
|
4966
|
-
if ((
|
|
4966
|
+
if ((shouldInvokeVnodeHook &&
|
|
4967
|
+
(vnodeHook = props && props.onVnodeUnmounted)) ||
|
|
4968
|
+
shouldInvokeDirs) {
|
|
4967
4969
|
queuePostRenderEffect(() => {
|
|
4968
4970
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
4969
4971
|
shouldInvokeDirs &&
|
|
@@ -5907,7 +5909,7 @@ function normalizeChildren(vnode, children) {
|
|
|
5907
5909
|
type = 16 /* ARRAY_CHILDREN */;
|
|
5908
5910
|
}
|
|
5909
5911
|
else if (typeof children === 'object') {
|
|
5910
|
-
if (shapeFlag & 1 /* ELEMENT */
|
|
5912
|
+
if (shapeFlag & (1 /* ELEMENT */ | 64 /* TELEPORT */)) {
|
|
5911
5913
|
// Normalize slot to plain children for plain element and Teleport
|
|
5912
5914
|
const slot = children.default;
|
|
5913
5915
|
if (slot) {
|
|
@@ -7840,20 +7842,8 @@ function isMemoSame(cached, memo) {
|
|
|
7840
7842
|
return true;
|
|
7841
7843
|
}
|
|
7842
7844
|
|
|
7843
|
-
function $ref() { }
|
|
7844
|
-
function $shallowRef(arg) {
|
|
7845
|
-
return arg;
|
|
7846
|
-
}
|
|
7847
|
-
function $computed() { }
|
|
7848
|
-
function $fromRefs() {
|
|
7849
|
-
return null;
|
|
7850
|
-
}
|
|
7851
|
-
function $raw() {
|
|
7852
|
-
return null;
|
|
7853
|
-
}
|
|
7854
|
-
|
|
7855
7845
|
// Core API ------------------------------------------------------------------
|
|
7856
|
-
const version = "3.2.
|
|
7846
|
+
const version = "3.2.6";
|
|
7857
7847
|
const _ssrUtils = {
|
|
7858
7848
|
createComponentInstance,
|
|
7859
7849
|
setupComponent,
|
|
@@ -7909,11 +7899,6 @@ exports.normalizeProps = shared.normalizeProps;
|
|
|
7909
7899
|
exports.normalizeStyle = shared.normalizeStyle;
|
|
7910
7900
|
exports.toDisplayString = shared.toDisplayString;
|
|
7911
7901
|
exports.toHandlerKey = shared.toHandlerKey;
|
|
7912
|
-
exports.$computed = $computed;
|
|
7913
|
-
exports.$fromRefs = $fromRefs;
|
|
7914
|
-
exports.$raw = $raw;
|
|
7915
|
-
exports.$ref = $ref;
|
|
7916
|
-
exports.$shallowRef = $shallowRef;
|
|
7917
7902
|
exports.BaseTransition = BaseTransition;
|
|
7918
7903
|
exports.Comment = Comment$1;
|
|
7919
7904
|
exports.Fragment = Fragment;
|
|
@@ -273,8 +273,7 @@ function renderComponentRoot(instance) {
|
|
|
273
273
|
const keys = Object.keys(fallthroughAttrs);
|
|
274
274
|
const { shapeFlag } = root;
|
|
275
275
|
if (keys.length) {
|
|
276
|
-
if (shapeFlag & 1 /* ELEMENT */
|
|
277
|
-
shapeFlag & 6 /* COMPONENT */) {
|
|
276
|
+
if (shapeFlag & (1 /* ELEMENT */ | 6 /* COMPONENT */)) {
|
|
278
277
|
if (propsOptions && keys.some(shared.isModelListener)) {
|
|
279
278
|
// If a v-model listener (onUpdate:xxx) has a corresponding declared
|
|
280
279
|
// prop, it indicates this component expects to handle v-model and
|
|
@@ -290,8 +289,7 @@ function renderComponentRoot(instance) {
|
|
|
290
289
|
if (false &&
|
|
291
290
|
isCompatEnabled("INSTANCE_ATTRS_CLASS_STYLE" /* INSTANCE_ATTRS_CLASS_STYLE */, instance) &&
|
|
292
291
|
vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */ &&
|
|
293
|
-
|
|
294
|
-
root.shapeFlag & 6 /* COMPONENT */)) ;
|
|
292
|
+
root.shapeFlag & (1 /* ELEMENT */ | 6 /* COMPONENT */)) ;
|
|
295
293
|
// inherit directives
|
|
296
294
|
if (vnode.dirs) {
|
|
297
295
|
if (false && !isElementRoot(root)) ;
|
|
@@ -384,8 +382,7 @@ const filterModelListeners = (attrs, props) => {
|
|
|
384
382
|
return res;
|
|
385
383
|
};
|
|
386
384
|
const isElementRoot = (vnode) => {
|
|
387
|
-
return (vnode.shapeFlag & 6 /* COMPONENT */ ||
|
|
388
|
-
vnode.shapeFlag & 1 /* ELEMENT */ ||
|
|
385
|
+
return (vnode.shapeFlag & (6 /* COMPONENT */ | 1 /* ELEMENT */) ||
|
|
389
386
|
vnode.type === Comment$1 // potential v-if branch switch
|
|
390
387
|
);
|
|
391
388
|
};
|
|
@@ -2281,8 +2278,8 @@ const normalizeSlotValue = (value) => shared.isArray(value)
|
|
|
2281
2278
|
? value.map(normalizeVNode)
|
|
2282
2279
|
: [normalizeVNode(value)];
|
|
2283
2280
|
const normalizeSlot = (key, rawSlot, ctx) => {
|
|
2284
|
-
const normalized = withCtx((
|
|
2285
|
-
return normalizeSlotValue(rawSlot(
|
|
2281
|
+
const normalized = withCtx((...args) => {
|
|
2282
|
+
return normalizeSlotValue(rawSlot(...args));
|
|
2286
2283
|
}, ctx);
|
|
2287
2284
|
normalized._c = false;
|
|
2288
2285
|
return normalized;
|
|
@@ -2714,8 +2711,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
2714
2711
|
if (props) {
|
|
2715
2712
|
if (forcePatchValue ||
|
|
2716
2713
|
!optimized ||
|
|
2717
|
-
patchFlag & 16 /* FULL_PROPS */
|
|
2718
|
-
patchFlag & 32 /* HYDRATE_EVENTS */) {
|
|
2714
|
+
patchFlag & (16 /* FULL_PROPS */ | 32 /* HYDRATE_EVENTS */)) {
|
|
2719
2715
|
for (const key in props) {
|
|
2720
2716
|
if ((forcePatchValue && key.endsWith('value')) ||
|
|
2721
2717
|
(shared.isOn(key) && !shared.isReservedProp(key))) {
|
|
@@ -3097,6 +3093,14 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3097
3093
|
if (dirs) {
|
|
3098
3094
|
invokeDirectiveHook(n2, n1, parentComponent, 'beforeUpdate');
|
|
3099
3095
|
}
|
|
3096
|
+
const areChildrenSVG = isSVG && n2.type !== 'foreignObject';
|
|
3097
|
+
if (dynamicChildren) {
|
|
3098
|
+
patchBlockChildren(n1.dynamicChildren, dynamicChildren, el, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds);
|
|
3099
|
+
}
|
|
3100
|
+
else if (!optimized) {
|
|
3101
|
+
// full diff
|
|
3102
|
+
patchChildren(n1, n2, el, null, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds, false);
|
|
3103
|
+
}
|
|
3100
3104
|
if (patchFlag > 0) {
|
|
3101
3105
|
// the presence of a patchFlag means this element's render code was
|
|
3102
3106
|
// generated by the compiler and can take the fast path.
|
|
@@ -3151,14 +3155,6 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3151
3155
|
// unoptimized, full diff
|
|
3152
3156
|
patchProps(el, n2, oldProps, newProps, parentComponent, parentSuspense, isSVG);
|
|
3153
3157
|
}
|
|
3154
|
-
const areChildrenSVG = isSVG && n2.type !== 'foreignObject';
|
|
3155
|
-
if (dynamicChildren) {
|
|
3156
|
-
patchBlockChildren(n1.dynamicChildren, dynamicChildren, el, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds);
|
|
3157
|
-
}
|
|
3158
|
-
else if (!optimized) {
|
|
3159
|
-
// full diff
|
|
3160
|
-
patchChildren(n1, n2, el, null, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds, false);
|
|
3161
|
-
}
|
|
3162
3158
|
if ((vnodeHook = newProps.onVnodeUpdated) || dirs) {
|
|
3163
3159
|
queuePostRenderEffect(() => {
|
|
3164
3160
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
@@ -3183,8 +3179,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3183
3179
|
// which also requires the correct parent container
|
|
3184
3180
|
!isSameVNodeType(oldVNode, newVNode) ||
|
|
3185
3181
|
// - In the case of a component, it could contain anything.
|
|
3186
|
-
oldVNode.shapeFlag & 6 /* COMPONENT */
|
|
3187
|
-
oldVNode.shapeFlag & 64 /* TELEPORT */)
|
|
3182
|
+
oldVNode.shapeFlag & (6 /* COMPONENT */ | 64 /* TELEPORT */))
|
|
3188
3183
|
? hostParentNode(oldVNode.el)
|
|
3189
3184
|
: // In other cases, the parent container is not actually used so we
|
|
3190
3185
|
// just pass the block element here to avoid a DOM parentNode call.
|
|
@@ -3333,13 +3328,15 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3333
3328
|
let vnodeHook;
|
|
3334
3329
|
const { el, props } = initialVNode;
|
|
3335
3330
|
const { bm, m, parent } = instance;
|
|
3331
|
+
const isAsyncWrapperVNode = isAsyncWrapper(initialVNode);
|
|
3336
3332
|
effect.allowRecurse = false;
|
|
3337
3333
|
// beforeMount hook
|
|
3338
3334
|
if (bm) {
|
|
3339
3335
|
shared.invokeArrayFns(bm);
|
|
3340
3336
|
}
|
|
3341
3337
|
// onVnodeBeforeMount
|
|
3342
|
-
if (
|
|
3338
|
+
if (!isAsyncWrapperVNode &&
|
|
3339
|
+
(vnodeHook = props && props.onVnodeBeforeMount)) {
|
|
3343
3340
|
invokeVNodeHook(vnodeHook, parent, initialVNode);
|
|
3344
3341
|
}
|
|
3345
3342
|
effect.allowRecurse = true;
|
|
@@ -3349,7 +3346,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3349
3346
|
instance.subTree = renderComponentRoot(instance);
|
|
3350
3347
|
hydrateNode(el, instance.subTree, instance, parentSuspense, null);
|
|
3351
3348
|
};
|
|
3352
|
-
if (
|
|
3349
|
+
if (isAsyncWrapperVNode) {
|
|
3353
3350
|
initialVNode.type.__asyncLoader().then(
|
|
3354
3351
|
// note: we are moving the render call into an async callback,
|
|
3355
3352
|
// which means it won't track dependencies - but it's ok because
|
|
@@ -3371,7 +3368,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3371
3368
|
queuePostRenderEffect(m, parentSuspense);
|
|
3372
3369
|
}
|
|
3373
3370
|
// onVnodeMounted
|
|
3374
|
-
if (
|
|
3371
|
+
if (!isAsyncWrapperVNode &&
|
|
3372
|
+
(vnodeHook = props && props.onVnodeMounted)) {
|
|
3375
3373
|
const scopedInitialVNode = initialVNode;
|
|
3376
3374
|
queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), parentSuspense);
|
|
3377
3375
|
}
|
|
@@ -3392,6 +3390,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3392
3390
|
let { next, bu, u, parent, vnode } = instance;
|
|
3393
3391
|
let originNext = next;
|
|
3394
3392
|
let vnodeHook;
|
|
3393
|
+
// Disallow component effect recursion during pre-lifecycle hooks.
|
|
3394
|
+
effect.allowRecurse = false;
|
|
3395
3395
|
if (next) {
|
|
3396
3396
|
next.el = vnode.el;
|
|
3397
3397
|
updateComponentPreRender(instance, next, optimized);
|
|
@@ -3399,8 +3399,6 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3399
3399
|
else {
|
|
3400
3400
|
next = vnode;
|
|
3401
3401
|
}
|
|
3402
|
-
// Disallow component effect recursion during pre-lifecycle hooks.
|
|
3403
|
-
effect.allowRecurse = false;
|
|
3404
3402
|
// beforeUpdate hook
|
|
3405
3403
|
if (bu) {
|
|
3406
3404
|
shared.invokeArrayFns(bu);
|
|
@@ -3771,8 +3769,10 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3771
3769
|
return;
|
|
3772
3770
|
}
|
|
3773
3771
|
const shouldInvokeDirs = shapeFlag & 1 /* ELEMENT */ && dirs;
|
|
3772
|
+
const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);
|
|
3774
3773
|
let vnodeHook;
|
|
3775
|
-
if (
|
|
3774
|
+
if (shouldInvokeVnodeHook &&
|
|
3775
|
+
(vnodeHook = props && props.onVnodeBeforeUnmount)) {
|
|
3776
3776
|
invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
3777
3777
|
}
|
|
3778
3778
|
if (shapeFlag & 6 /* COMPONENT */) {
|
|
@@ -3797,8 +3797,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3797
3797
|
unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);
|
|
3798
3798
|
}
|
|
3799
3799
|
else if ((type === Fragment &&
|
|
3800
|
-
|
|
3801
|
-
|
|
3800
|
+
patchFlag &
|
|
3801
|
+
(128 /* KEYED_FRAGMENT */ | 256 /* UNKEYED_FRAGMENT */)) ||
|
|
3802
3802
|
(!optimized && shapeFlag & 16 /* ARRAY_CHILDREN */)) {
|
|
3803
3803
|
unmountChildren(children, parentComponent, parentSuspense);
|
|
3804
3804
|
}
|
|
@@ -3806,7 +3806,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3806
3806
|
remove(vnode);
|
|
3807
3807
|
}
|
|
3808
3808
|
}
|
|
3809
|
-
if ((
|
|
3809
|
+
if ((shouldInvokeVnodeHook &&
|
|
3810
|
+
(vnodeHook = props && props.onVnodeUnmounted)) ||
|
|
3811
|
+
shouldInvokeDirs) {
|
|
3810
3812
|
queuePostRenderEffect(() => {
|
|
3811
3813
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
3812
3814
|
shouldInvokeDirs &&
|
|
@@ -4661,7 +4663,7 @@ function normalizeChildren(vnode, children) {
|
|
|
4661
4663
|
type = 16 /* ARRAY_CHILDREN */;
|
|
4662
4664
|
}
|
|
4663
4665
|
else if (typeof children === 'object') {
|
|
4664
|
-
if (shapeFlag & 1 /* ELEMENT */
|
|
4666
|
+
if (shapeFlag & (1 /* ELEMENT */ | 64 /* TELEPORT */)) {
|
|
4665
4667
|
// Normalize slot to plain children for plain element and Teleport
|
|
4666
4668
|
const slot = children.default;
|
|
4667
4669
|
if (slot) {
|
|
@@ -6085,20 +6087,8 @@ function isMemoSame(cached, memo) {
|
|
|
6085
6087
|
return true;
|
|
6086
6088
|
}
|
|
6087
6089
|
|
|
6088
|
-
function $ref() { }
|
|
6089
|
-
function $shallowRef(arg) {
|
|
6090
|
-
return arg;
|
|
6091
|
-
}
|
|
6092
|
-
function $computed() { }
|
|
6093
|
-
function $fromRefs() {
|
|
6094
|
-
return null;
|
|
6095
|
-
}
|
|
6096
|
-
function $raw() {
|
|
6097
|
-
return null;
|
|
6098
|
-
}
|
|
6099
|
-
|
|
6100
6090
|
// Core API ------------------------------------------------------------------
|
|
6101
|
-
const version = "3.2.
|
|
6091
|
+
const version = "3.2.6";
|
|
6102
6092
|
const _ssrUtils = {
|
|
6103
6093
|
createComponentInstance,
|
|
6104
6094
|
setupComponent,
|
|
@@ -6154,11 +6144,6 @@ exports.normalizeProps = shared.normalizeProps;
|
|
|
6154
6144
|
exports.normalizeStyle = shared.normalizeStyle;
|
|
6155
6145
|
exports.toDisplayString = shared.toDisplayString;
|
|
6156
6146
|
exports.toHandlerKey = shared.toHandlerKey;
|
|
6157
|
-
exports.$computed = $computed;
|
|
6158
|
-
exports.$fromRefs = $fromRefs;
|
|
6159
|
-
exports.$raw = $raw;
|
|
6160
|
-
exports.$ref = $ref;
|
|
6161
|
-
exports.$shallowRef = $shallowRef;
|
|
6162
6147
|
exports.BaseTransition = BaseTransition;
|
|
6163
6148
|
exports.Comment = Comment$1;
|
|
6164
6149
|
exports.Fragment = Fragment;
|
package/dist/runtime-core.d.ts
CHANGED
|
@@ -50,18 +50,6 @@ import { UnwrapRef } from '@vue/reactivity';
|
|
|
50
50
|
import { WritableComputedOptions } from '@vue/reactivity';
|
|
51
51
|
import { WritableComputedRef } from '@vue/reactivity';
|
|
52
52
|
|
|
53
|
-
export declare function $computed<T>(getter: () => T): ComputedRefValue<T>;
|
|
54
|
-
|
|
55
|
-
export declare function $fromRefs<T>(source: T): ShallowUnwrapRef<T>;
|
|
56
|
-
|
|
57
|
-
export declare function $raw<T>(value: ComputedRefValue<T>): ComputedRef<T>;
|
|
58
|
-
|
|
59
|
-
export declare function $raw<T>(value: T): Ref<T>;
|
|
60
|
-
|
|
61
|
-
export declare function $ref<T>(arg: T | Ref<T>): UnwrapRef<T>;
|
|
62
|
-
|
|
63
|
-
export declare function $shallowRef<T>(arg: T): T;
|
|
64
|
-
|
|
65
53
|
/**
|
|
66
54
|
* Default allowed non-declared props on component in TSX
|
|
67
55
|
*/
|
|
@@ -504,12 +492,6 @@ export declare type ComputedOptions = Record<string, ComputedGetter<any> | Writa
|
|
|
504
492
|
|
|
505
493
|
export { ComputedRef }
|
|
506
494
|
|
|
507
|
-
declare const ComputedRefMarker: unique symbol;
|
|
508
|
-
|
|
509
|
-
declare type ComputedRefValue<T> = T & {
|
|
510
|
-
[ComputedRefMarker]?: any;
|
|
511
|
-
};
|
|
512
|
-
|
|
513
495
|
/**
|
|
514
496
|
* Concrete component type matches its actual value: it's either an options
|
|
515
497
|
* object, or a function. Use this where the code expects to work with actual
|
|
@@ -554,7 +536,7 @@ export declare type CreateComponentPublicInstance<P = {}, B = {}, D = {}, C exte
|
|
|
554
536
|
/**
|
|
555
537
|
* @private
|
|
556
538
|
*/
|
|
557
|
-
export declare function createElementBlock(type: string, props?: Record<string, any> | null, children?: any, patchFlag?: number, dynamicProps?: string[], shapeFlag?: number): VNode<RendererNode, RendererElement, {
|
|
539
|
+
export declare function createElementBlock(type: string | typeof Fragment, props?: Record<string, any> | null, children?: any, patchFlag?: number, dynamicProps?: string[], shapeFlag?: number): VNode<RendererNode, RendererElement, {
|
|
558
540
|
[key: string]: any;
|
|
559
541
|
}>;
|
|
560
542
|
|
|
@@ -613,6 +595,8 @@ export { DebuggerEvent }
|
|
|
613
595
|
|
|
614
596
|
declare type DebuggerHook = (e: DebuggerEvent) => void;
|
|
615
597
|
|
|
598
|
+
export { DebuggerOptions }
|
|
599
|
+
|
|
616
600
|
export { DeepReadonly }
|
|
617
601
|
|
|
618
602
|
declare type DefaultFactory<T> = (props: Data) => T | null | undefined;
|
|
@@ -1327,7 +1311,9 @@ declare type PropConstructor<T = any> = {
|
|
|
1327
1311
|
(): T;
|
|
1328
1312
|
} | PropMethod<T>;
|
|
1329
1313
|
|
|
1330
|
-
declare type PropMethod<T, TConstructor = any> = [T] extends [
|
|
1314
|
+
declare type PropMethod<T, TConstructor = any> = [T] extends [
|
|
1315
|
+
((...args: any) => any) | undefined
|
|
1316
|
+
] ? {
|
|
1331
1317
|
new (): TConstructor;
|
|
1332
1318
|
(): T;
|
|
1333
1319
|
readonly prototype: TConstructor;
|
|
@@ -1962,21 +1948,9 @@ type _defineEmits = typeof defineEmits
|
|
|
1962
1948
|
type _defineExpose = typeof defineExpose
|
|
1963
1949
|
type _withDefaults = typeof withDefaults
|
|
1964
1950
|
|
|
1965
|
-
type _ref = typeof $ref
|
|
1966
|
-
type _shallowRef = typeof $shallowRef
|
|
1967
|
-
type _computed = typeof $computed
|
|
1968
|
-
type _fromRefs = typeof $fromRefs
|
|
1969
|
-
type _raw = typeof $raw
|
|
1970
|
-
|
|
1971
1951
|
declare global {
|
|
1972
1952
|
const defineProps: _defineProps
|
|
1973
1953
|
const defineEmits: _defineEmits
|
|
1974
1954
|
const defineExpose: _defineExpose
|
|
1975
1955
|
const withDefaults: _withDefaults
|
|
1976
|
-
|
|
1977
|
-
const $ref: _ref
|
|
1978
|
-
const $shallowRef: _shallowRef
|
|
1979
|
-
const $computed: _computed
|
|
1980
|
-
const $fromRefs: _fromRefs
|
|
1981
|
-
const $raw: _raw
|
|
1982
1956
|
}
|
|
@@ -799,8 +799,7 @@ function renderComponentRoot(instance) {
|
|
|
799
799
|
const keys = Object.keys(fallthroughAttrs);
|
|
800
800
|
const { shapeFlag } = root;
|
|
801
801
|
if (keys.length) {
|
|
802
|
-
if (shapeFlag & 1 /* ELEMENT */
|
|
803
|
-
shapeFlag & 6 /* COMPONENT */) {
|
|
802
|
+
if (shapeFlag & (1 /* ELEMENT */ | 6 /* COMPONENT */)) {
|
|
804
803
|
if (propsOptions && keys.some(isModelListener)) {
|
|
805
804
|
// If a v-model listener (onUpdate:xxx) has a corresponding declared
|
|
806
805
|
// prop, it indicates this component expects to handle v-model and
|
|
@@ -848,8 +847,7 @@ function renderComponentRoot(instance) {
|
|
|
848
847
|
if (false &&
|
|
849
848
|
isCompatEnabled("INSTANCE_ATTRS_CLASS_STYLE" /* INSTANCE_ATTRS_CLASS_STYLE */, instance) &&
|
|
850
849
|
vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */ &&
|
|
851
|
-
|
|
852
|
-
root.shapeFlag & 6 /* COMPONENT */)) ;
|
|
850
|
+
root.shapeFlag & (1 /* ELEMENT */ | 6 /* COMPONENT */)) ;
|
|
853
851
|
// inherit directives
|
|
854
852
|
if (vnode.dirs) {
|
|
855
853
|
if ((process.env.NODE_ENV !== 'production') && !isElementRoot(root)) {
|
|
@@ -950,8 +948,7 @@ const filterModelListeners = (attrs, props) => {
|
|
|
950
948
|
return res;
|
|
951
949
|
};
|
|
952
950
|
const isElementRoot = (vnode) => {
|
|
953
|
-
return (vnode.shapeFlag & 6 /* COMPONENT */ ||
|
|
954
|
-
vnode.shapeFlag & 1 /* ELEMENT */ ||
|
|
951
|
+
return (vnode.shapeFlag & (6 /* COMPONENT */ | 1 /* ELEMENT */) ||
|
|
955
952
|
vnode.type === Comment$1 // potential v-if branch switch
|
|
956
953
|
);
|
|
957
954
|
};
|
|
@@ -3165,13 +3162,13 @@ const normalizeSlotValue = (value) => isArray(value)
|
|
|
3165
3162
|
? value.map(normalizeVNode)
|
|
3166
3163
|
: [normalizeVNode(value)];
|
|
3167
3164
|
const normalizeSlot = (key, rawSlot, ctx) => {
|
|
3168
|
-
const normalized = withCtx((
|
|
3165
|
+
const normalized = withCtx((...args) => {
|
|
3169
3166
|
if ((process.env.NODE_ENV !== 'production') && currentInstance) {
|
|
3170
3167
|
warn(`Slot "${key}" invoked outside of the render function: ` +
|
|
3171
3168
|
`this will not track dependencies used in the slot. ` +
|
|
3172
3169
|
`Invoke the slot function inside the render function instead.`);
|
|
3173
3170
|
}
|
|
3174
|
-
return normalizeSlotValue(rawSlot(
|
|
3171
|
+
return normalizeSlotValue(rawSlot(...args));
|
|
3175
3172
|
}, ctx);
|
|
3176
3173
|
normalized._c = false;
|
|
3177
3174
|
return normalized;
|
|
@@ -3690,8 +3687,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
3690
3687
|
if (props) {
|
|
3691
3688
|
if (forcePatchValue ||
|
|
3692
3689
|
!optimized ||
|
|
3693
|
-
patchFlag & 16 /* FULL_PROPS */
|
|
3694
|
-
patchFlag & 32 /* HYDRATE_EVENTS */) {
|
|
3690
|
+
patchFlag & (16 /* FULL_PROPS */ | 32 /* HYDRATE_EVENTS */)) {
|
|
3695
3691
|
for (const key in props) {
|
|
3696
3692
|
if ((forcePatchValue && key.endsWith('value')) ||
|
|
3697
3693
|
(isOn(key) && !isReservedProp(key))) {
|
|
@@ -4212,6 +4208,17 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4212
4208
|
optimized = false;
|
|
4213
4209
|
dynamicChildren = null;
|
|
4214
4210
|
}
|
|
4211
|
+
const areChildrenSVG = isSVG && n2.type !== 'foreignObject';
|
|
4212
|
+
if (dynamicChildren) {
|
|
4213
|
+
patchBlockChildren(n1.dynamicChildren, dynamicChildren, el, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds);
|
|
4214
|
+
if ((process.env.NODE_ENV !== 'production') && parentComponent && parentComponent.type.__hmrId) {
|
|
4215
|
+
traverseStaticChildren(n1, n2);
|
|
4216
|
+
}
|
|
4217
|
+
}
|
|
4218
|
+
else if (!optimized) {
|
|
4219
|
+
// full diff
|
|
4220
|
+
patchChildren(n1, n2, el, null, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds, false);
|
|
4221
|
+
}
|
|
4215
4222
|
if (patchFlag > 0) {
|
|
4216
4223
|
// the presence of a patchFlag means this element's render code was
|
|
4217
4224
|
// generated by the compiler and can take the fast path.
|
|
@@ -4266,17 +4273,6 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4266
4273
|
// unoptimized, full diff
|
|
4267
4274
|
patchProps(el, n2, oldProps, newProps, parentComponent, parentSuspense, isSVG);
|
|
4268
4275
|
}
|
|
4269
|
-
const areChildrenSVG = isSVG && n2.type !== 'foreignObject';
|
|
4270
|
-
if (dynamicChildren) {
|
|
4271
|
-
patchBlockChildren(n1.dynamicChildren, dynamicChildren, el, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds);
|
|
4272
|
-
if ((process.env.NODE_ENV !== 'production') && parentComponent && parentComponent.type.__hmrId) {
|
|
4273
|
-
traverseStaticChildren(n1, n2);
|
|
4274
|
-
}
|
|
4275
|
-
}
|
|
4276
|
-
else if (!optimized) {
|
|
4277
|
-
// full diff
|
|
4278
|
-
patchChildren(n1, n2, el, null, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds, false);
|
|
4279
|
-
}
|
|
4280
4276
|
if ((vnodeHook = newProps.onVnodeUpdated) || dirs) {
|
|
4281
4277
|
queuePostRenderEffect(() => {
|
|
4282
4278
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
@@ -4301,8 +4297,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4301
4297
|
// which also requires the correct parent container
|
|
4302
4298
|
!isSameVNodeType(oldVNode, newVNode) ||
|
|
4303
4299
|
// - In the case of a component, it could contain anything.
|
|
4304
|
-
oldVNode.shapeFlag & 6 /* COMPONENT */
|
|
4305
|
-
oldVNode.shapeFlag & 64 /* TELEPORT */)
|
|
4300
|
+
oldVNode.shapeFlag & (6 /* COMPONENT */ | 64 /* TELEPORT */))
|
|
4306
4301
|
? hostParentNode(oldVNode.el)
|
|
4307
4302
|
: // In other cases, the parent container is not actually used so we
|
|
4308
4303
|
// just pass the block element here to avoid a DOM parentNode call.
|
|
@@ -4485,13 +4480,15 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4485
4480
|
let vnodeHook;
|
|
4486
4481
|
const { el, props } = initialVNode;
|
|
4487
4482
|
const { bm, m, parent } = instance;
|
|
4483
|
+
const isAsyncWrapperVNode = isAsyncWrapper(initialVNode);
|
|
4488
4484
|
effect.allowRecurse = false;
|
|
4489
4485
|
// beforeMount hook
|
|
4490
4486
|
if (bm) {
|
|
4491
4487
|
invokeArrayFns(bm);
|
|
4492
4488
|
}
|
|
4493
4489
|
// onVnodeBeforeMount
|
|
4494
|
-
if (
|
|
4490
|
+
if (!isAsyncWrapperVNode &&
|
|
4491
|
+
(vnodeHook = props && props.onVnodeBeforeMount)) {
|
|
4495
4492
|
invokeVNodeHook(vnodeHook, parent, initialVNode);
|
|
4496
4493
|
}
|
|
4497
4494
|
effect.allowRecurse = true;
|
|
@@ -4513,7 +4510,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4513
4510
|
endMeasure(instance, `hydrate`);
|
|
4514
4511
|
}
|
|
4515
4512
|
};
|
|
4516
|
-
if (
|
|
4513
|
+
if (isAsyncWrapperVNode) {
|
|
4517
4514
|
initialVNode.type.__asyncLoader().then(
|
|
4518
4515
|
// note: we are moving the render call into an async callback,
|
|
4519
4516
|
// which means it won't track dependencies - but it's ok because
|
|
@@ -4547,7 +4544,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4547
4544
|
queuePostRenderEffect(m, parentSuspense);
|
|
4548
4545
|
}
|
|
4549
4546
|
// onVnodeMounted
|
|
4550
|
-
if (
|
|
4547
|
+
if (!isAsyncWrapperVNode &&
|
|
4548
|
+
(vnodeHook = props && props.onVnodeMounted)) {
|
|
4551
4549
|
const scopedInitialVNode = initialVNode;
|
|
4552
4550
|
queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), parentSuspense);
|
|
4553
4551
|
}
|
|
@@ -4574,6 +4572,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4574
4572
|
if ((process.env.NODE_ENV !== 'production')) {
|
|
4575
4573
|
pushWarningContext(next || instance.vnode);
|
|
4576
4574
|
}
|
|
4575
|
+
// Disallow component effect recursion during pre-lifecycle hooks.
|
|
4576
|
+
effect.allowRecurse = false;
|
|
4577
4577
|
if (next) {
|
|
4578
4578
|
next.el = vnode.el;
|
|
4579
4579
|
updateComponentPreRender(instance, next, optimized);
|
|
@@ -4581,8 +4581,6 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4581
4581
|
else {
|
|
4582
4582
|
next = vnode;
|
|
4583
4583
|
}
|
|
4584
|
-
// Disallow component effect recursion during pre-lifecycle hooks.
|
|
4585
|
-
effect.allowRecurse = false;
|
|
4586
4584
|
// beforeUpdate hook
|
|
4587
4585
|
if (bu) {
|
|
4588
4586
|
invokeArrayFns(bu);
|
|
@@ -4985,8 +4983,10 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4985
4983
|
return;
|
|
4986
4984
|
}
|
|
4987
4985
|
const shouldInvokeDirs = shapeFlag & 1 /* ELEMENT */ && dirs;
|
|
4986
|
+
const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);
|
|
4988
4987
|
let vnodeHook;
|
|
4989
|
-
if (
|
|
4988
|
+
if (shouldInvokeVnodeHook &&
|
|
4989
|
+
(vnodeHook = props && props.onVnodeBeforeUnmount)) {
|
|
4990
4990
|
invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
4991
4991
|
}
|
|
4992
4992
|
if (shapeFlag & 6 /* COMPONENT */) {
|
|
@@ -5011,8 +5011,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5011
5011
|
unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);
|
|
5012
5012
|
}
|
|
5013
5013
|
else if ((type === Fragment &&
|
|
5014
|
-
|
|
5015
|
-
|
|
5014
|
+
patchFlag &
|
|
5015
|
+
(128 /* KEYED_FRAGMENT */ | 256 /* UNKEYED_FRAGMENT */)) ||
|
|
5016
5016
|
(!optimized && shapeFlag & 16 /* ARRAY_CHILDREN */)) {
|
|
5017
5017
|
unmountChildren(children, parentComponent, parentSuspense);
|
|
5018
5018
|
}
|
|
@@ -5020,7 +5020,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5020
5020
|
remove(vnode);
|
|
5021
5021
|
}
|
|
5022
5022
|
}
|
|
5023
|
-
if ((
|
|
5023
|
+
if ((shouldInvokeVnodeHook &&
|
|
5024
|
+
(vnodeHook = props && props.onVnodeUnmounted)) ||
|
|
5025
|
+
shouldInvokeDirs) {
|
|
5024
5026
|
queuePostRenderEffect(() => {
|
|
5025
5027
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
5026
5028
|
shouldInvokeDirs &&
|
|
@@ -5969,7 +5971,7 @@ function normalizeChildren(vnode, children) {
|
|
|
5969
5971
|
type = 16 /* ARRAY_CHILDREN */;
|
|
5970
5972
|
}
|
|
5971
5973
|
else if (typeof children === 'object') {
|
|
5972
|
-
if (shapeFlag & 1 /* ELEMENT */
|
|
5974
|
+
if (shapeFlag & (1 /* ELEMENT */ | 64 /* TELEPORT */)) {
|
|
5973
5975
|
// Normalize slot to plain children for plain element and Teleport
|
|
5974
5976
|
const slot = children.default;
|
|
5975
5977
|
if (slot) {
|
|
@@ -7903,20 +7905,8 @@ function isMemoSame(cached, memo) {
|
|
|
7903
7905
|
return true;
|
|
7904
7906
|
}
|
|
7905
7907
|
|
|
7906
|
-
function $ref() { }
|
|
7907
|
-
function $shallowRef(arg) {
|
|
7908
|
-
return arg;
|
|
7909
|
-
}
|
|
7910
|
-
function $computed() { }
|
|
7911
|
-
function $fromRefs() {
|
|
7912
|
-
return null;
|
|
7913
|
-
}
|
|
7914
|
-
function $raw() {
|
|
7915
|
-
return null;
|
|
7916
|
-
}
|
|
7917
|
-
|
|
7918
7908
|
// Core API ------------------------------------------------------------------
|
|
7919
|
-
const version = "3.2.
|
|
7909
|
+
const version = "3.2.6";
|
|
7920
7910
|
const _ssrUtils = {
|
|
7921
7911
|
createComponentInstance,
|
|
7922
7912
|
setupComponent,
|
|
@@ -7939,4 +7929,4 @@ const resolveFilter = null;
|
|
|
7939
7929
|
*/
|
|
7940
7930
|
const compatUtils = (null);
|
|
7941
7931
|
|
|
7942
|
-
export {
|
|
7932
|
+
export { BaseTransition, Comment$1 as Comment, Fragment, KeepAlive, Static, Suspense, Teleport, Text, callWithAsyncErrorHandling, callWithErrorHandling, cloneVNode, compatUtils, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createRenderer, createSlots, createStaticVNode, createTextVNode, createVNode, defineAsyncComponent, defineComponent, defineEmits, defineExpose, defineProps, devtools, getCurrentInstance, getTransitionRawChildren, guardReactiveProps, h, handleError, initCustomFormatter, inject, isMemoSame, isRuntimeOnly, isVNode, mergeDefaults, mergeProps, nextTick, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, pushScopeId, queuePostFlushCb, registerRuntimeCompiler, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, ssrContextKey, ssrUtils, toHandlers, transformVNodeArgs, useAttrs, useSSRContext, useSlots, useTransitionState, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withMemo, withScopeId };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/runtime-core",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.6",
|
|
4
4
|
"description": "@vue/runtime-core",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/runtime-core.esm-bundler.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"homepage": "https://github.com/vuejs/vue-next/tree/master/packages/runtime-core#readme",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@vue/shared": "3.2.
|
|
36
|
-
"@vue/reactivity": "3.2.
|
|
35
|
+
"@vue/shared": "3.2.6",
|
|
36
|
+
"@vue/reactivity": "3.2.6"
|
|
37
37
|
}
|
|
38
38
|
}
|