@vue/runtime-core 3.2.29 → 3.2.32
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
CHANGED
|
@@ -1637,12 +1637,10 @@ function watchEffect(effect, options) {
|
|
|
1637
1637
|
return doWatch(effect, null, options);
|
|
1638
1638
|
}
|
|
1639
1639
|
function watchPostEffect(effect, options) {
|
|
1640
|
-
return doWatch(effect, null, (Object.assign(
|
|
1641
|
-
));
|
|
1640
|
+
return doWatch(effect, null, (Object.assign(Object.assign({}, options), { flush: 'post' }) ));
|
|
1642
1641
|
}
|
|
1643
1642
|
function watchSyncEffect(effect, options) {
|
|
1644
|
-
return doWatch(effect, null, (Object.assign(
|
|
1645
|
-
));
|
|
1643
|
+
return doWatch(effect, null, (Object.assign(Object.assign({}, options), { flush: 'sync' }) ));
|
|
1646
1644
|
}
|
|
1647
1645
|
// initial value for watchers to trigger on undefined initial values
|
|
1648
1646
|
const INITIAL_WATCHER_VALUE = {};
|
|
@@ -1956,7 +1954,9 @@ const BaseTransitionImpl = {
|
|
|
1956
1954
|
const { mode } = rawProps;
|
|
1957
1955
|
// check mode
|
|
1958
1956
|
if (mode &&
|
|
1959
|
-
mode !== 'in-out' &&
|
|
1957
|
+
mode !== 'in-out' &&
|
|
1958
|
+
mode !== 'out-in' &&
|
|
1959
|
+
mode !== 'default') {
|
|
1960
1960
|
warn(`invalid <transition> mode: ${mode}`);
|
|
1961
1961
|
}
|
|
1962
1962
|
// at this point children has a guaranteed length of 1.
|
|
@@ -2183,20 +2183,24 @@ function setTransitionHooks(vnode, hooks) {
|
|
|
2183
2183
|
vnode.transition = hooks;
|
|
2184
2184
|
}
|
|
2185
2185
|
}
|
|
2186
|
-
function getTransitionRawChildren(children, keepComment = false) {
|
|
2186
|
+
function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
2187
2187
|
let ret = [];
|
|
2188
2188
|
let keyedFragmentCount = 0;
|
|
2189
2189
|
for (let i = 0; i < children.length; i++) {
|
|
2190
|
-
|
|
2190
|
+
let child = children[i];
|
|
2191
|
+
// #5360 inherit parent key in case of <template v-for>
|
|
2192
|
+
const key = parentKey == null
|
|
2193
|
+
? child.key
|
|
2194
|
+
: String(parentKey) + String(child.key != null ? child.key : i);
|
|
2191
2195
|
// handle fragment children case, e.g. v-for
|
|
2192
2196
|
if (child.type === Fragment) {
|
|
2193
2197
|
if (child.patchFlag & 128 /* KEYED_FRAGMENT */)
|
|
2194
2198
|
keyedFragmentCount++;
|
|
2195
|
-
ret = ret.concat(getTransitionRawChildren(child.children, keepComment));
|
|
2199
|
+
ret = ret.concat(getTransitionRawChildren(child.children, keepComment, key));
|
|
2196
2200
|
}
|
|
2197
2201
|
// comment placeholders should be skipped, e.g. v-if
|
|
2198
2202
|
else if (keepComment || child.type !== Comment) {
|
|
2199
|
-
ret.push(child);
|
|
2203
|
+
ret.push(key != null ? cloneVNode(child, { key }) : child);
|
|
2200
2204
|
}
|
|
2201
2205
|
}
|
|
2202
2206
|
// #1126 if a transition children list contains multiple sub fragments, these
|
|
@@ -3162,6 +3166,10 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
|
|
|
3162
3166
|
const propsToUpdate = instance.vnode.dynamicProps;
|
|
3163
3167
|
for (let i = 0; i < propsToUpdate.length; i++) {
|
|
3164
3168
|
let key = propsToUpdate[i];
|
|
3169
|
+
// skip if the prop key is a declared emit event listener
|
|
3170
|
+
if (isEmitListener(instance.emitsOptions, key)) {
|
|
3171
|
+
continue;
|
|
3172
|
+
}
|
|
3165
3173
|
// PROPS flag guarantees rawProps to be non-null
|
|
3166
3174
|
const value = rawProps[key];
|
|
3167
3175
|
if (options) {
|
|
@@ -3672,9 +3680,8 @@ return withDirectives(h(comp), [
|
|
|
3672
3680
|
[bar, this.y]
|
|
3673
3681
|
])
|
|
3674
3682
|
*/
|
|
3675
|
-
const isBuiltInDirective = /*#__PURE__*/ shared.makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo');
|
|
3676
3683
|
function validateDirectiveName(name) {
|
|
3677
|
-
if (isBuiltInDirective(name)) {
|
|
3684
|
+
if (shared.isBuiltInDirective(name)) {
|
|
3678
3685
|
warn('Do not use built-in directive ids as custom directive id: ' + name);
|
|
3679
3686
|
}
|
|
3680
3687
|
}
|
|
@@ -3687,7 +3694,8 @@ function withDirectives(vnode, directives) {
|
|
|
3687
3694
|
warn(`withDirectives can only be used inside render functions.`);
|
|
3688
3695
|
return vnode;
|
|
3689
3696
|
}
|
|
3690
|
-
const instance = internalInstance
|
|
3697
|
+
const instance = getExposeProxy(internalInstance) ||
|
|
3698
|
+
internalInstance.proxy;
|
|
3691
3699
|
const bindings = vnode.dirs || (vnode.dirs = []);
|
|
3692
3700
|
for (let i = 0; i < directives.length; i++) {
|
|
3693
3701
|
let [dir, value, arg, modifiers = shared.EMPTY_OBJ] = directives[i];
|
|
@@ -3759,6 +3767,9 @@ function createAppContext() {
|
|
|
3759
3767
|
let uid = 0;
|
|
3760
3768
|
function createAppAPI(render, hydrate) {
|
|
3761
3769
|
return function createApp(rootComponent, rootProps = null) {
|
|
3770
|
+
if (!shared.isFunction(rootComponent)) {
|
|
3771
|
+
rootComponent = Object.assign({}, rootComponent);
|
|
3772
|
+
}
|
|
3762
3773
|
if (rootProps != null && !shared.isObject(rootProps)) {
|
|
3763
3774
|
warn(`root props passed to app.mount() must be an object.`);
|
|
3764
3775
|
rootProps = null;
|
|
@@ -3955,6 +3966,9 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
3955
3966
|
if (!shared.isArray(existing)) {
|
|
3956
3967
|
if (_isString) {
|
|
3957
3968
|
refs[ref] = [refValue];
|
|
3969
|
+
if (shared.hasOwn(setupState, ref)) {
|
|
3970
|
+
setupState[ref] = refs[ref];
|
|
3971
|
+
}
|
|
3958
3972
|
}
|
|
3959
3973
|
else {
|
|
3960
3974
|
ref.value = [refValue];
|
|
@@ -4153,7 +4167,8 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4153
4167
|
// e.g. <option :value="obj">, <input type="checkbox" :true-value="1">
|
|
4154
4168
|
const forcePatchValue = (type === 'input' && dirs) || type === 'option';
|
|
4155
4169
|
// skip props & children if this is hoisted static nodes
|
|
4156
|
-
|
|
4170
|
+
// #5405 in dev, always hydrate children for HMR
|
|
4171
|
+
{
|
|
4157
4172
|
if (dirs) {
|
|
4158
4173
|
invokeDirectiveHook(vnode, null, parentComponent, 'created');
|
|
4159
4174
|
}
|
|
@@ -4326,7 +4341,7 @@ function startMeasure(instance, type) {
|
|
|
4326
4341
|
perf.mark(`vue-${type}-${instance.uid}`);
|
|
4327
4342
|
}
|
|
4328
4343
|
{
|
|
4329
|
-
devtoolsPerfStart(instance, type,
|
|
4344
|
+
devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now());
|
|
4330
4345
|
}
|
|
4331
4346
|
}
|
|
4332
4347
|
function endMeasure(instance, type) {
|
|
@@ -4339,7 +4354,7 @@ function endMeasure(instance, type) {
|
|
|
4339
4354
|
perf.clearMarks(endTag);
|
|
4340
4355
|
}
|
|
4341
4356
|
{
|
|
4342
|
-
devtoolsPerfEnd(instance, type,
|
|
4357
|
+
devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now());
|
|
4343
4358
|
}
|
|
4344
4359
|
}
|
|
4345
4360
|
function isSupported() {
|
|
@@ -6687,9 +6702,11 @@ const PublicInstanceProxyHandlers = {
|
|
|
6687
6702
|
const { data, setupState, ctx } = instance;
|
|
6688
6703
|
if (setupState !== shared.EMPTY_OBJ && shared.hasOwn(setupState, key)) {
|
|
6689
6704
|
setupState[key] = value;
|
|
6705
|
+
return true;
|
|
6690
6706
|
}
|
|
6691
6707
|
else if (data !== shared.EMPTY_OBJ && shared.hasOwn(data, key)) {
|
|
6692
6708
|
data[key] = value;
|
|
6709
|
+
return true;
|
|
6693
6710
|
}
|
|
6694
6711
|
else if (shared.hasOwn(instance.props, key)) {
|
|
6695
6712
|
warn(`Attempting to mutate prop "${key}". Props are readonly.`, instance);
|
|
@@ -6723,6 +6740,16 @@ const PublicInstanceProxyHandlers = {
|
|
|
6723
6740
|
shared.hasOwn(ctx, key) ||
|
|
6724
6741
|
shared.hasOwn(publicPropertiesMap, key) ||
|
|
6725
6742
|
shared.hasOwn(appContext.config.globalProperties, key));
|
|
6743
|
+
},
|
|
6744
|
+
defineProperty(target, key, descriptor) {
|
|
6745
|
+
if (descriptor.get != null) {
|
|
6746
|
+
// invalidate key cache of a getter based property #5417
|
|
6747
|
+
target.$.accessCache[key] = 0;
|
|
6748
|
+
}
|
|
6749
|
+
else if (shared.hasOwn(descriptor, 'value')) {
|
|
6750
|
+
this.set(target, key, descriptor.value, null);
|
|
6751
|
+
}
|
|
6752
|
+
return Reflect.defineProperty(target, key, descriptor);
|
|
6726
6753
|
}
|
|
6727
6754
|
};
|
|
6728
6755
|
{
|
|
@@ -7606,7 +7633,7 @@ function isMemoSame(cached, memo) {
|
|
|
7606
7633
|
}
|
|
7607
7634
|
|
|
7608
7635
|
// Core API ------------------------------------------------------------------
|
|
7609
|
-
const version = "3.2.
|
|
7636
|
+
const version = "3.2.32";
|
|
7610
7637
|
const _ssrUtils = {
|
|
7611
7638
|
createComponentInstance,
|
|
7612
7639
|
setupComponent,
|
|
@@ -1700,20 +1700,24 @@ function setTransitionHooks(vnode, hooks) {
|
|
|
1700
1700
|
vnode.transition = hooks;
|
|
1701
1701
|
}
|
|
1702
1702
|
}
|
|
1703
|
-
function getTransitionRawChildren(children, keepComment = false) {
|
|
1703
|
+
function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
1704
1704
|
let ret = [];
|
|
1705
1705
|
let keyedFragmentCount = 0;
|
|
1706
1706
|
for (let i = 0; i < children.length; i++) {
|
|
1707
|
-
|
|
1707
|
+
let child = children[i];
|
|
1708
|
+
// #5360 inherit parent key in case of <template v-for>
|
|
1709
|
+
const key = parentKey == null
|
|
1710
|
+
? child.key
|
|
1711
|
+
: String(parentKey) + String(child.key != null ? child.key : i);
|
|
1708
1712
|
// handle fragment children case, e.g. v-for
|
|
1709
1713
|
if (child.type === Fragment) {
|
|
1710
1714
|
if (child.patchFlag & 128 /* KEYED_FRAGMENT */)
|
|
1711
1715
|
keyedFragmentCount++;
|
|
1712
|
-
ret = ret.concat(getTransitionRawChildren(child.children, keepComment));
|
|
1716
|
+
ret = ret.concat(getTransitionRawChildren(child.children, keepComment, key));
|
|
1713
1717
|
}
|
|
1714
1718
|
// comment placeholders should be skipped, e.g. v-if
|
|
1715
1719
|
else if (keepComment || child.type !== Comment) {
|
|
1716
|
-
ret.push(child);
|
|
1720
|
+
ret.push(key != null ? cloneVNode(child, { key }) : child);
|
|
1717
1721
|
}
|
|
1718
1722
|
}
|
|
1719
1723
|
// #1126 if a transition children list contains multiple sub fragments, these
|
|
@@ -2557,6 +2561,10 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
|
|
|
2557
2561
|
const propsToUpdate = instance.vnode.dynamicProps;
|
|
2558
2562
|
for (let i = 0; i < propsToUpdate.length; i++) {
|
|
2559
2563
|
let key = propsToUpdate[i];
|
|
2564
|
+
// skip if the prop key is a declared emit event listener
|
|
2565
|
+
if (isEmitListener(instance.emitsOptions, key)) {
|
|
2566
|
+
continue;
|
|
2567
|
+
}
|
|
2560
2568
|
// PROPS flag guarantees rawProps to be non-null
|
|
2561
2569
|
const value = rawProps[key];
|
|
2562
2570
|
if (options) {
|
|
@@ -2914,7 +2922,8 @@ function withDirectives(vnode, directives) {
|
|
|
2914
2922
|
if (internalInstance === null) {
|
|
2915
2923
|
return vnode;
|
|
2916
2924
|
}
|
|
2917
|
-
const instance = internalInstance
|
|
2925
|
+
const instance = getExposeProxy(internalInstance) ||
|
|
2926
|
+
internalInstance.proxy;
|
|
2918
2927
|
const bindings = vnode.dirs || (vnode.dirs = []);
|
|
2919
2928
|
for (let i = 0; i < directives.length; i++) {
|
|
2920
2929
|
let [dir, value, arg, modifiers = shared.EMPTY_OBJ] = directives[i];
|
|
@@ -2986,6 +2995,9 @@ function createAppContext() {
|
|
|
2986
2995
|
let uid = 0;
|
|
2987
2996
|
function createAppAPI(render, hydrate) {
|
|
2988
2997
|
return function createApp(rootComponent, rootProps = null) {
|
|
2998
|
+
if (!shared.isFunction(rootComponent)) {
|
|
2999
|
+
rootComponent = Object.assign({}, rootComponent);
|
|
3000
|
+
}
|
|
2989
3001
|
if (rootProps != null && !shared.isObject(rootProps)) {
|
|
2990
3002
|
rootProps = null;
|
|
2991
3003
|
}
|
|
@@ -3125,6 +3137,9 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
3125
3137
|
if (!shared.isArray(existing)) {
|
|
3126
3138
|
if (_isString) {
|
|
3127
3139
|
refs[ref] = [refValue];
|
|
3140
|
+
if (shared.hasOwn(setupState, ref)) {
|
|
3141
|
+
setupState[ref] = refs[ref];
|
|
3142
|
+
}
|
|
3128
3143
|
}
|
|
3129
3144
|
else {
|
|
3130
3145
|
ref.value = [refValue];
|
|
@@ -3311,6 +3326,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
3311
3326
|
// e.g. <option :value="obj">, <input type="checkbox" :true-value="1">
|
|
3312
3327
|
const forcePatchValue = (type === 'input' && dirs) || type === 'option';
|
|
3313
3328
|
// skip props & children if this is hoisted static nodes
|
|
3329
|
+
// #5405 in dev, always hydrate children for HMR
|
|
3314
3330
|
if (forcePatchValue || patchFlag !== -1 /* HOISTED */) {
|
|
3315
3331
|
if (dirs) {
|
|
3316
3332
|
invokeDirectiveHook(vnode, null, parentComponent, 'created');
|
|
@@ -5523,9 +5539,11 @@ const PublicInstanceProxyHandlers = {
|
|
|
5523
5539
|
const { data, setupState, ctx } = instance;
|
|
5524
5540
|
if (setupState !== shared.EMPTY_OBJ && shared.hasOwn(setupState, key)) {
|
|
5525
5541
|
setupState[key] = value;
|
|
5542
|
+
return true;
|
|
5526
5543
|
}
|
|
5527
5544
|
else if (data !== shared.EMPTY_OBJ && shared.hasOwn(data, key)) {
|
|
5528
5545
|
data[key] = value;
|
|
5546
|
+
return true;
|
|
5529
5547
|
}
|
|
5530
5548
|
else if (shared.hasOwn(instance.props, key)) {
|
|
5531
5549
|
return false;
|
|
@@ -5549,6 +5567,16 @@ const PublicInstanceProxyHandlers = {
|
|
|
5549
5567
|
shared.hasOwn(ctx, key) ||
|
|
5550
5568
|
shared.hasOwn(publicPropertiesMap, key) ||
|
|
5551
5569
|
shared.hasOwn(appContext.config.globalProperties, key));
|
|
5570
|
+
},
|
|
5571
|
+
defineProperty(target, key, descriptor) {
|
|
5572
|
+
if (descriptor.get != null) {
|
|
5573
|
+
// invalidate key cache of a getter based property #5417
|
|
5574
|
+
target.$.accessCache[key] = 0;
|
|
5575
|
+
}
|
|
5576
|
+
else if (shared.hasOwn(descriptor, 'value')) {
|
|
5577
|
+
this.set(target, key, descriptor.value, null);
|
|
5578
|
+
}
|
|
5579
|
+
return Reflect.defineProperty(target, key, descriptor);
|
|
5552
5580
|
}
|
|
5553
5581
|
};
|
|
5554
5582
|
const RuntimeCompiledPublicInstanceProxyHandlers = /*#__PURE__*/ shared.extend({}, PublicInstanceProxyHandlers, {
|
|
@@ -6069,7 +6097,7 @@ function isMemoSame(cached, memo) {
|
|
|
6069
6097
|
}
|
|
6070
6098
|
|
|
6071
6099
|
// Core API ------------------------------------------------------------------
|
|
6072
|
-
const version = "3.2.
|
|
6100
|
+
const version = "3.2.32";
|
|
6073
6101
|
const _ssrUtils = {
|
|
6074
6102
|
createComponentInstance,
|
|
6075
6103
|
setupComponent,
|
package/dist/runtime-core.d.ts
CHANGED
|
@@ -904,7 +904,7 @@ export declare const getCurrentInstance: () => ComponentInternalInstance | null;
|
|
|
904
904
|
|
|
905
905
|
export { getCurrentScope }
|
|
906
906
|
|
|
907
|
-
export declare function getTransitionRawChildren(children: VNode[], keepComment?: boolean): VNode[];
|
|
907
|
+
export declare function getTransitionRawChildren(children: VNode[], keepComment?: boolean, parentKey?: VNode['key']): VNode[];
|
|
908
908
|
|
|
909
909
|
export declare function guardReactiveProps(props: (Data & VNodeProps) | null): (Data & VNodeProps) | null;
|
|
910
910
|
|
|
@@ -1046,17 +1046,17 @@ export declare type LegacyConfig = {
|
|
|
1046
1046
|
devtools?: boolean;
|
|
1047
1047
|
/**
|
|
1048
1048
|
* @deprecated use `config.isCustomElement` instead
|
|
1049
|
-
* https://v3.vuejs.org/
|
|
1049
|
+
* https://v3-migration.vuejs.org/breaking-changes/global-api.html#config-ignoredelements-is-now-config-iscustomelement
|
|
1050
1050
|
*/
|
|
1051
1051
|
ignoredElements?: (string | RegExp)[];
|
|
1052
1052
|
/**
|
|
1053
1053
|
* @deprecated
|
|
1054
|
-
* https://v3.vuejs.org/
|
|
1054
|
+
* https://v3-migration.vuejs.org/breaking-changes/keycode-modifiers.html
|
|
1055
1055
|
*/
|
|
1056
1056
|
keyCodes?: Record<string, number | number[]>;
|
|
1057
1057
|
/**
|
|
1058
1058
|
* @deprecated
|
|
1059
|
-
* https://v3.vuejs.org/
|
|
1059
|
+
* https://v3-migration.vuejs.org/breaking-changes/global-api.html#config-productiontip-removed
|
|
1060
1060
|
*/
|
|
1061
1061
|
productionTip?: boolean;
|
|
1062
1062
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { pauseTracking, resetTracking, isRef, toRaw, isShallow as isShallow$1, isReactive, ReactiveEffect, ref, reactive, shallowReactive, trigger, isProxy, shallowReadonly, track, EffectScope, markRaw, proxyRefs, computed as computed$1, isReadonly } from '@vue/reactivity';
|
|
2
2
|
export { EffectScope, ReactiveEffect, customRef, effect, effectScope, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, triggerRef, unref } from '@vue/reactivity';
|
|
3
|
-
import { isString, isFunction, isPromise, isArray, NOOP, getGlobalThis, extend, EMPTY_OBJ, toHandlerKey, toNumber, hyphenate, camelize, isOn, hasOwn, isModelListener, hasChanged, remove, isObject, isSet, isMap, isPlainObject, invokeArrayFns, def, isReservedProp, EMPTY_ARR, capitalize, toRawType, makeMap, NO, normalizeClass, normalizeStyle, isGloballyWhitelisted } from '@vue/shared';
|
|
3
|
+
import { isString, isFunction, isPromise, isArray, NOOP, getGlobalThis, extend, EMPTY_OBJ, toHandlerKey, toNumber, hyphenate, camelize, isOn, hasOwn, isModelListener, hasChanged, remove, isObject, isSet, isMap, isPlainObject, invokeArrayFns, def, isReservedProp, EMPTY_ARR, capitalize, toRawType, makeMap, isBuiltInDirective, NO, normalizeClass, normalizeStyle, isGloballyWhitelisted } from '@vue/shared';
|
|
4
4
|
export { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';
|
|
5
5
|
|
|
6
6
|
const stack = [];
|
|
@@ -1645,13 +1645,11 @@ function watchEffect(effect, options) {
|
|
|
1645
1645
|
}
|
|
1646
1646
|
function watchPostEffect(effect, options) {
|
|
1647
1647
|
return doWatch(effect, null, ((process.env.NODE_ENV !== 'production')
|
|
1648
|
-
? Object.assign(options
|
|
1649
|
-
: { flush: 'post' }));
|
|
1648
|
+
? Object.assign(Object.assign({}, options), { flush: 'post' }) : { flush: 'post' }));
|
|
1650
1649
|
}
|
|
1651
1650
|
function watchSyncEffect(effect, options) {
|
|
1652
1651
|
return doWatch(effect, null, ((process.env.NODE_ENV !== 'production')
|
|
1653
|
-
? Object.assign(options
|
|
1654
|
-
: { flush: 'sync' }));
|
|
1652
|
+
? Object.assign(Object.assign({}, options), { flush: 'sync' }) : { flush: 'sync' }));
|
|
1655
1653
|
}
|
|
1656
1654
|
// initial value for watchers to trigger on undefined initial values
|
|
1657
1655
|
const INITIAL_WATCHER_VALUE = {};
|
|
@@ -1966,7 +1964,9 @@ const BaseTransitionImpl = {
|
|
|
1966
1964
|
// check mode
|
|
1967
1965
|
if ((process.env.NODE_ENV !== 'production') &&
|
|
1968
1966
|
mode &&
|
|
1969
|
-
mode !== 'in-out' &&
|
|
1967
|
+
mode !== 'in-out' &&
|
|
1968
|
+
mode !== 'out-in' &&
|
|
1969
|
+
mode !== 'default') {
|
|
1970
1970
|
warn(`invalid <transition> mode: ${mode}`);
|
|
1971
1971
|
}
|
|
1972
1972
|
// at this point children has a guaranteed length of 1.
|
|
@@ -2193,20 +2193,24 @@ function setTransitionHooks(vnode, hooks) {
|
|
|
2193
2193
|
vnode.transition = hooks;
|
|
2194
2194
|
}
|
|
2195
2195
|
}
|
|
2196
|
-
function getTransitionRawChildren(children, keepComment = false) {
|
|
2196
|
+
function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
2197
2197
|
let ret = [];
|
|
2198
2198
|
let keyedFragmentCount = 0;
|
|
2199
2199
|
for (let i = 0; i < children.length; i++) {
|
|
2200
|
-
|
|
2200
|
+
let child = children[i];
|
|
2201
|
+
// #5360 inherit parent key in case of <template v-for>
|
|
2202
|
+
const key = parentKey == null
|
|
2203
|
+
? child.key
|
|
2204
|
+
: String(parentKey) + String(child.key != null ? child.key : i);
|
|
2201
2205
|
// handle fragment children case, e.g. v-for
|
|
2202
2206
|
if (child.type === Fragment) {
|
|
2203
2207
|
if (child.patchFlag & 128 /* KEYED_FRAGMENT */)
|
|
2204
2208
|
keyedFragmentCount++;
|
|
2205
|
-
ret = ret.concat(getTransitionRawChildren(child.children, keepComment));
|
|
2209
|
+
ret = ret.concat(getTransitionRawChildren(child.children, keepComment, key));
|
|
2206
2210
|
}
|
|
2207
2211
|
// comment placeholders should be skipped, e.g. v-if
|
|
2208
2212
|
else if (keepComment || child.type !== Comment) {
|
|
2209
|
-
ret.push(child);
|
|
2213
|
+
ret.push(key != null ? cloneVNode(child, { key }) : child);
|
|
2210
2214
|
}
|
|
2211
2215
|
}
|
|
2212
2216
|
// #1126 if a transition children list contains multiple sub fragments, these
|
|
@@ -3178,6 +3182,10 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
|
|
|
3178
3182
|
const propsToUpdate = instance.vnode.dynamicProps;
|
|
3179
3183
|
for (let i = 0; i < propsToUpdate.length; i++) {
|
|
3180
3184
|
let key = propsToUpdate[i];
|
|
3185
|
+
// skip if the prop key is a declared emit event listener
|
|
3186
|
+
if (isEmitListener(instance.emitsOptions, key)) {
|
|
3187
|
+
continue;
|
|
3188
|
+
}
|
|
3181
3189
|
// PROPS flag guarantees rawProps to be non-null
|
|
3182
3190
|
const value = rawProps[key];
|
|
3183
3191
|
if (options) {
|
|
@@ -3690,7 +3698,6 @@ return withDirectives(h(comp), [
|
|
|
3690
3698
|
[bar, this.y]
|
|
3691
3699
|
])
|
|
3692
3700
|
*/
|
|
3693
|
-
const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo');
|
|
3694
3701
|
function validateDirectiveName(name) {
|
|
3695
3702
|
if (isBuiltInDirective(name)) {
|
|
3696
3703
|
warn('Do not use built-in directive ids as custom directive id: ' + name);
|
|
@@ -3705,7 +3712,8 @@ function withDirectives(vnode, directives) {
|
|
|
3705
3712
|
(process.env.NODE_ENV !== 'production') && warn(`withDirectives can only be used inside render functions.`);
|
|
3706
3713
|
return vnode;
|
|
3707
3714
|
}
|
|
3708
|
-
const instance = internalInstance
|
|
3715
|
+
const instance = getExposeProxy(internalInstance) ||
|
|
3716
|
+
internalInstance.proxy;
|
|
3709
3717
|
const bindings = vnode.dirs || (vnode.dirs = []);
|
|
3710
3718
|
for (let i = 0; i < directives.length; i++) {
|
|
3711
3719
|
let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];
|
|
@@ -3777,6 +3785,9 @@ function createAppContext() {
|
|
|
3777
3785
|
let uid = 0;
|
|
3778
3786
|
function createAppAPI(render, hydrate) {
|
|
3779
3787
|
return function createApp(rootComponent, rootProps = null) {
|
|
3788
|
+
if (!isFunction(rootComponent)) {
|
|
3789
|
+
rootComponent = Object.assign({}, rootComponent);
|
|
3790
|
+
}
|
|
3780
3791
|
if (rootProps != null && !isObject(rootProps)) {
|
|
3781
3792
|
(process.env.NODE_ENV !== 'production') && warn(`root props passed to app.mount() must be an object.`);
|
|
3782
3793
|
rootProps = null;
|
|
@@ -3976,6 +3987,9 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
3976
3987
|
if (!isArray(existing)) {
|
|
3977
3988
|
if (_isString) {
|
|
3978
3989
|
refs[ref] = [refValue];
|
|
3990
|
+
if (hasOwn(setupState, ref)) {
|
|
3991
|
+
setupState[ref] = refs[ref];
|
|
3992
|
+
}
|
|
3979
3993
|
}
|
|
3980
3994
|
else {
|
|
3981
3995
|
ref.value = [refValue];
|
|
@@ -4176,7 +4190,8 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4176
4190
|
// e.g. <option :value="obj">, <input type="checkbox" :true-value="1">
|
|
4177
4191
|
const forcePatchValue = (type === 'input' && dirs) || type === 'option';
|
|
4178
4192
|
// skip props & children if this is hoisted static nodes
|
|
4179
|
-
|
|
4193
|
+
// #5405 in dev, always hydrate children for HMR
|
|
4194
|
+
if ((process.env.NODE_ENV !== 'production') || forcePatchValue || patchFlag !== -1 /* HOISTED */) {
|
|
4180
4195
|
if (dirs) {
|
|
4181
4196
|
invokeDirectiveHook(vnode, null, parentComponent, 'created');
|
|
4182
4197
|
}
|
|
@@ -4351,7 +4366,7 @@ function startMeasure(instance, type) {
|
|
|
4351
4366
|
perf.mark(`vue-${type}-${instance.uid}`);
|
|
4352
4367
|
}
|
|
4353
4368
|
if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) {
|
|
4354
|
-
devtoolsPerfStart(instance, type,
|
|
4369
|
+
devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now());
|
|
4355
4370
|
}
|
|
4356
4371
|
}
|
|
4357
4372
|
function endMeasure(instance, type) {
|
|
@@ -4364,7 +4379,7 @@ function endMeasure(instance, type) {
|
|
|
4364
4379
|
perf.clearMarks(endTag);
|
|
4365
4380
|
}
|
|
4366
4381
|
if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) {
|
|
4367
|
-
devtoolsPerfEnd(instance, type,
|
|
4382
|
+
devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now());
|
|
4368
4383
|
}
|
|
4369
4384
|
}
|
|
4370
4385
|
function isSupported() {
|
|
@@ -6761,9 +6776,11 @@ const PublicInstanceProxyHandlers = {
|
|
|
6761
6776
|
const { data, setupState, ctx } = instance;
|
|
6762
6777
|
if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) {
|
|
6763
6778
|
setupState[key] = value;
|
|
6779
|
+
return true;
|
|
6764
6780
|
}
|
|
6765
6781
|
else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
|
|
6766
6782
|
data[key] = value;
|
|
6783
|
+
return true;
|
|
6767
6784
|
}
|
|
6768
6785
|
else if (hasOwn(instance.props, key)) {
|
|
6769
6786
|
(process.env.NODE_ENV !== 'production') &&
|
|
@@ -6799,6 +6816,16 @@ const PublicInstanceProxyHandlers = {
|
|
|
6799
6816
|
hasOwn(ctx, key) ||
|
|
6800
6817
|
hasOwn(publicPropertiesMap, key) ||
|
|
6801
6818
|
hasOwn(appContext.config.globalProperties, key));
|
|
6819
|
+
},
|
|
6820
|
+
defineProperty(target, key, descriptor) {
|
|
6821
|
+
if (descriptor.get != null) {
|
|
6822
|
+
// invalidate key cache of a getter based property #5417
|
|
6823
|
+
target.$.accessCache[key] = 0;
|
|
6824
|
+
}
|
|
6825
|
+
else if (hasOwn(descriptor, 'value')) {
|
|
6826
|
+
this.set(target, key, descriptor.value, null);
|
|
6827
|
+
}
|
|
6828
|
+
return Reflect.defineProperty(target, key, descriptor);
|
|
6802
6829
|
}
|
|
6803
6830
|
};
|
|
6804
6831
|
if ((process.env.NODE_ENV !== 'production') && !false) {
|
|
@@ -7702,7 +7729,7 @@ function isMemoSame(cached, memo) {
|
|
|
7702
7729
|
}
|
|
7703
7730
|
|
|
7704
7731
|
// Core API ------------------------------------------------------------------
|
|
7705
|
-
const version = "3.2.
|
|
7732
|
+
const version = "3.2.32";
|
|
7706
7733
|
const _ssrUtils = {
|
|
7707
7734
|
createComponentInstance,
|
|
7708
7735
|
setupComponent,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/runtime-core",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.32",
|
|
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/core/tree/main/packages/runtime-core#readme",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@vue/shared": "3.2.
|
|
36
|
-
"@vue/reactivity": "3.2.
|
|
35
|
+
"@vue/shared": "3.2.32",
|
|
36
|
+
"@vue/reactivity": "3.2.32"
|
|
37
37
|
}
|
|
38
38
|
}
|