@vue/compat 3.2.22 → 3.2.26
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/README.md +1 -0
- package/dist/vue.cjs.js +237 -237
- package/dist/vue.cjs.prod.js +224 -217
- package/dist/vue.esm-browser.js +212 -216
- package/dist/vue.esm-browser.prod.js +1 -1
- package/dist/vue.esm-bundler.js +214 -217
- package/dist/vue.global.js +212 -216
- package/dist/vue.global.prod.js +1 -1
- package/dist/vue.runtime.esm-browser.js +158 -163
- package/dist/vue.runtime.esm-browser.prod.js +1 -1
- package/dist/vue.runtime.esm-bundler.js +160 -164
- package/dist/vue.runtime.global.js +158 -163
- package/dist/vue.runtime.global.prod.js +1 -1
- package/package.json +2 -2
|
@@ -34,7 +34,7 @@ const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomo
|
|
|
34
34
|
const isSpecialBooleanAttr = /*#__PURE__*/ makeMap(specialBooleanAttrs);
|
|
35
35
|
/**
|
|
36
36
|
* Boolean attributes should be included if the value is truthy or ''.
|
|
37
|
-
* e.g.
|
|
37
|
+
* e.g. `<select multiple>` compiles to `{ multiple: '' }`
|
|
38
38
|
*/
|
|
39
39
|
function includeBooleanAttr(value) {
|
|
40
40
|
return !!value || value === '';
|
|
@@ -266,7 +266,7 @@ const isIntegerKey = (key) => isString(key) &&
|
|
|
266
266
|
'' + parseInt(key, 10) === key;
|
|
267
267
|
const isReservedProp = /*#__PURE__*/ makeMap(
|
|
268
268
|
// the leading comma is intentional so empty string "" is also included
|
|
269
|
-
',key,ref,' +
|
|
269
|
+
',key,ref,ref_for,ref_key,' +
|
|
270
270
|
'onVnodeBeforeMount,onVnodeMounted,' +
|
|
271
271
|
'onVnodeBeforeUpdate,onVnodeUpdated,' +
|
|
272
272
|
'onVnodeBeforeUnmount,onVnodeUnmounted');
|
|
@@ -455,7 +455,7 @@ const targetMap = new WeakMap();
|
|
|
455
455
|
let effectTrackDepth = 0;
|
|
456
456
|
let trackOpBit = 1;
|
|
457
457
|
/**
|
|
458
|
-
* The bitwise track markers support at most 30 levels
|
|
458
|
+
* The bitwise track markers support at most 30 levels of recursion.
|
|
459
459
|
* This value is chosen to enable modern JS engines to use a SMI on all platforms.
|
|
460
460
|
* When recursion depth is greater, fall back to using a full cleanup.
|
|
461
461
|
*/
|
|
@@ -776,7 +776,7 @@ const shallowSet = /*#__PURE__*/ createSetter(true);
|
|
|
776
776
|
function createSetter(shallow = false) {
|
|
777
777
|
return function set(target, key, value, receiver) {
|
|
778
778
|
let oldValue = target[key];
|
|
779
|
-
if (!shallow) {
|
|
779
|
+
if (!shallow && !isReadonly(value)) {
|
|
780
780
|
value = toRaw(value);
|
|
781
781
|
oldValue = toRaw(oldValue);
|
|
782
782
|
if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
|
|
@@ -1361,21 +1361,25 @@ function toRefs(object) {
|
|
|
1361
1361
|
return ret;
|
|
1362
1362
|
}
|
|
1363
1363
|
class ObjectRefImpl {
|
|
1364
|
-
constructor(_object, _key) {
|
|
1364
|
+
constructor(_object, _key, _defaultValue) {
|
|
1365
1365
|
this._object = _object;
|
|
1366
1366
|
this._key = _key;
|
|
1367
|
+
this._defaultValue = _defaultValue;
|
|
1367
1368
|
this.__v_isRef = true;
|
|
1368
1369
|
}
|
|
1369
1370
|
get value() {
|
|
1370
|
-
|
|
1371
|
+
const val = this._object[this._key];
|
|
1372
|
+
return val === undefined ? this._defaultValue : val;
|
|
1371
1373
|
}
|
|
1372
1374
|
set value(newVal) {
|
|
1373
1375
|
this._object[this._key] = newVal;
|
|
1374
1376
|
}
|
|
1375
1377
|
}
|
|
1376
|
-
function toRef(object, key) {
|
|
1378
|
+
function toRef(object, key, defaultValue) {
|
|
1377
1379
|
const val = object[key];
|
|
1378
|
-
return isRef(val)
|
|
1380
|
+
return isRef(val)
|
|
1381
|
+
? val
|
|
1382
|
+
: new ObjectRefImpl(object, key, defaultValue);
|
|
1379
1383
|
}
|
|
1380
1384
|
|
|
1381
1385
|
class ComputedRefImpl {
|
|
@@ -1821,11 +1825,6 @@ const deprecationData = {
|
|
|
1821
1825
|
`Use "${newHook}" instead.`,
|
|
1822
1826
|
link: `https://v3.vuejs.org/guide/migration/custom-directives.html`
|
|
1823
1827
|
},
|
|
1824
|
-
["V_FOR_REF" /* V_FOR_REF */]: {
|
|
1825
|
-
message: `Ref usage on v-for no longer creates array ref values in Vue 3. ` +
|
|
1826
|
-
`Consider using function refs or refactor to avoid ref usage altogether.`,
|
|
1827
|
-
link: `https://v3.vuejs.org/guide/migration/array-refs.html`
|
|
1828
|
-
},
|
|
1829
1828
|
["V_ON_KEYCODE_MODIFIER" /* V_ON_KEYCODE_MODIFIER */]: {
|
|
1830
1829
|
message: `Using keyCode as v-on modifier is no longer supported. ` +
|
|
1831
1830
|
`Use kebab-case key name modifiers instead.`,
|
|
@@ -3232,7 +3231,8 @@ const BaseTransitionImpl = {
|
|
|
3232
3231
|
const rawProps = toRaw(props);
|
|
3233
3232
|
const { mode } = rawProps;
|
|
3234
3233
|
// check mode
|
|
3235
|
-
if (mode &&
|
|
3234
|
+
if (mode &&
|
|
3235
|
+
mode !== 'in-out' && mode !== 'out-in' && mode !== 'default') {
|
|
3236
3236
|
warn$1(`invalid <transition> mode: ${mode}`);
|
|
3237
3237
|
}
|
|
3238
3238
|
// at this point children has a guaranteed length of 1.
|
|
@@ -3878,7 +3878,7 @@ function registerKeepAliveHook(hook, type, target = currentInstance) {
|
|
|
3878
3878
|
}
|
|
3879
3879
|
current = current.parent;
|
|
3880
3880
|
}
|
|
3881
|
-
hook();
|
|
3881
|
+
return hook();
|
|
3882
3882
|
});
|
|
3883
3883
|
injectHook(type, wrappedHook, target);
|
|
3884
3884
|
// In addition to registering it on the target instance, we walk up the parent
|
|
@@ -4656,7 +4656,7 @@ function setFullProps(instance, rawProps, props, attrs) {
|
|
|
4656
4656
|
continue;
|
|
4657
4657
|
}
|
|
4658
4658
|
}
|
|
4659
|
-
if (value !== attrs[key]) {
|
|
4659
|
+
if (!(key in attrs) || value !== attrs[key]) {
|
|
4660
4660
|
attrs[key] = value;
|
|
4661
4661
|
hasAttrsChanged = true;
|
|
4662
4662
|
}
|
|
@@ -5237,7 +5237,7 @@ function createCompatVue(createApp, createSingletonApp) {
|
|
|
5237
5237
|
return vm;
|
|
5238
5238
|
}
|
|
5239
5239
|
}
|
|
5240
|
-
Vue.version = "3.2.
|
|
5240
|
+
Vue.version = "3.2.26";
|
|
5241
5241
|
Vue.config = singletonApp.config;
|
|
5242
5242
|
Vue.use = (p, ...options) => {
|
|
5243
5243
|
if (p && isFunction(p.install)) {
|
|
@@ -5588,7 +5588,7 @@ const methodsToPatch = [
|
|
|
5588
5588
|
];
|
|
5589
5589
|
const patched = new WeakSet();
|
|
5590
5590
|
function defineReactive(obj, key, val) {
|
|
5591
|
-
// it's possible for the
|
|
5591
|
+
// it's possible for the original object to be mutated after being defined
|
|
5592
5592
|
// and expecting reactivity... we are covering it here because this seems to
|
|
5593
5593
|
// be a bit more common.
|
|
5594
5594
|
if (isObject(val) && !isReactive(val) && !patched.has(val)) {
|
|
@@ -5808,6 +5808,102 @@ function createAppAPI(render, hydrate) {
|
|
|
5808
5808
|
};
|
|
5809
5809
|
}
|
|
5810
5810
|
|
|
5811
|
+
/**
|
|
5812
|
+
* Function for handling a template ref
|
|
5813
|
+
*/
|
|
5814
|
+
function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
5815
|
+
if (isArray(rawRef)) {
|
|
5816
|
+
rawRef.forEach((r, i) => setRef(r, oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), parentSuspense, vnode, isUnmount));
|
|
5817
|
+
return;
|
|
5818
|
+
}
|
|
5819
|
+
if (isAsyncWrapper(vnode) && !isUnmount) {
|
|
5820
|
+
// when mounting async components, nothing needs to be done,
|
|
5821
|
+
// because the template ref is forwarded to inner component
|
|
5822
|
+
return;
|
|
5823
|
+
}
|
|
5824
|
+
const refValue = vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */
|
|
5825
|
+
? getExposeProxy(vnode.component) || vnode.component.proxy
|
|
5826
|
+
: vnode.el;
|
|
5827
|
+
const value = isUnmount ? null : refValue;
|
|
5828
|
+
const { i: owner, r: ref } = rawRef;
|
|
5829
|
+
if (!owner) {
|
|
5830
|
+
warn$1(`Missing ref owner context. ref cannot be used on hoisted vnodes. ` +
|
|
5831
|
+
`A vnode with ref must be created inside the render function.`);
|
|
5832
|
+
return;
|
|
5833
|
+
}
|
|
5834
|
+
const oldRef = oldRawRef && oldRawRef.r;
|
|
5835
|
+
const refs = owner.refs === EMPTY_OBJ ? (owner.refs = {}) : owner.refs;
|
|
5836
|
+
const setupState = owner.setupState;
|
|
5837
|
+
// dynamic ref changed. unset old ref
|
|
5838
|
+
if (oldRef != null && oldRef !== ref) {
|
|
5839
|
+
if (isString(oldRef)) {
|
|
5840
|
+
refs[oldRef] = null;
|
|
5841
|
+
if (hasOwn(setupState, oldRef)) {
|
|
5842
|
+
setupState[oldRef] = null;
|
|
5843
|
+
}
|
|
5844
|
+
}
|
|
5845
|
+
else if (isRef(oldRef)) {
|
|
5846
|
+
oldRef.value = null;
|
|
5847
|
+
}
|
|
5848
|
+
}
|
|
5849
|
+
if (isFunction(ref)) {
|
|
5850
|
+
callWithErrorHandling(ref, owner, 12 /* FUNCTION_REF */, [value, refs]);
|
|
5851
|
+
}
|
|
5852
|
+
else {
|
|
5853
|
+
const _isString = isString(ref);
|
|
5854
|
+
const _isRef = isRef(ref);
|
|
5855
|
+
if (_isString || _isRef) {
|
|
5856
|
+
const doSet = () => {
|
|
5857
|
+
if (rawRef.f) {
|
|
5858
|
+
const existing = _isString ? refs[ref] : ref.value;
|
|
5859
|
+
if (isUnmount) {
|
|
5860
|
+
isArray(existing) && remove(existing, refValue);
|
|
5861
|
+
}
|
|
5862
|
+
else {
|
|
5863
|
+
if (!isArray(existing)) {
|
|
5864
|
+
if (_isString) {
|
|
5865
|
+
refs[ref] = [refValue];
|
|
5866
|
+
}
|
|
5867
|
+
else {
|
|
5868
|
+
ref.value = [refValue];
|
|
5869
|
+
if (rawRef.k)
|
|
5870
|
+
refs[rawRef.k] = ref.value;
|
|
5871
|
+
}
|
|
5872
|
+
}
|
|
5873
|
+
else if (!existing.includes(refValue)) {
|
|
5874
|
+
existing.push(refValue);
|
|
5875
|
+
}
|
|
5876
|
+
}
|
|
5877
|
+
}
|
|
5878
|
+
else if (_isString) {
|
|
5879
|
+
refs[ref] = value;
|
|
5880
|
+
if (hasOwn(setupState, ref)) {
|
|
5881
|
+
setupState[ref] = value;
|
|
5882
|
+
}
|
|
5883
|
+
}
|
|
5884
|
+
else if (isRef(ref)) {
|
|
5885
|
+
ref.value = value;
|
|
5886
|
+
if (rawRef.k)
|
|
5887
|
+
refs[rawRef.k] = value;
|
|
5888
|
+
}
|
|
5889
|
+
else {
|
|
5890
|
+
warn$1('Invalid template ref type:', ref, `(${typeof ref})`);
|
|
5891
|
+
}
|
|
5892
|
+
};
|
|
5893
|
+
if (value) {
|
|
5894
|
+
doSet.id = -1;
|
|
5895
|
+
queuePostRenderEffect(doSet, parentSuspense);
|
|
5896
|
+
}
|
|
5897
|
+
else {
|
|
5898
|
+
doSet();
|
|
5899
|
+
}
|
|
5900
|
+
}
|
|
5901
|
+
else {
|
|
5902
|
+
warn$1('Invalid template ref type:', ref, `(${typeof ref})`);
|
|
5903
|
+
}
|
|
5904
|
+
}
|
|
5905
|
+
}
|
|
5906
|
+
|
|
5811
5907
|
let hasMismatch = false;
|
|
5812
5908
|
const isSVGContainer = (container) => /svg/.test(container.namespaceURI) && container.tagName !== 'foreignObject';
|
|
5813
5909
|
const isComment = (node) => node.nodeType === 8 /* COMMENT */;
|
|
@@ -6169,44 +6265,6 @@ function isSupported() {
|
|
|
6169
6265
|
return supported;
|
|
6170
6266
|
}
|
|
6171
6267
|
|
|
6172
|
-
function convertLegacyRefInFor(vnode) {
|
|
6173
|
-
// refInFor
|
|
6174
|
-
if (vnode.props && vnode.props.refInFor) {
|
|
6175
|
-
delete vnode.props.refInFor;
|
|
6176
|
-
if (vnode.ref) {
|
|
6177
|
-
if (isArray(vnode.ref)) {
|
|
6178
|
-
vnode.ref.forEach(r => (r.f = true));
|
|
6179
|
-
}
|
|
6180
|
-
else {
|
|
6181
|
-
vnode.ref.f = true;
|
|
6182
|
-
}
|
|
6183
|
-
}
|
|
6184
|
-
}
|
|
6185
|
-
}
|
|
6186
|
-
function registerLegacyRef(refs, key, value, owner, isInFor, isUnmount) {
|
|
6187
|
-
const existing = refs[key];
|
|
6188
|
-
if (isUnmount) {
|
|
6189
|
-
if (isArray(existing)) {
|
|
6190
|
-
remove(existing, value);
|
|
6191
|
-
}
|
|
6192
|
-
else {
|
|
6193
|
-
refs[key] = null;
|
|
6194
|
-
}
|
|
6195
|
-
}
|
|
6196
|
-
else if (isInFor) {
|
|
6197
|
-
warnDeprecation("V_FOR_REF" /* V_FOR_REF */, owner);
|
|
6198
|
-
if (!isArray(existing)) {
|
|
6199
|
-
refs[key] = [value];
|
|
6200
|
-
}
|
|
6201
|
-
else if (!existing.includes(value)) {
|
|
6202
|
-
existing.push(value);
|
|
6203
|
-
}
|
|
6204
|
-
}
|
|
6205
|
-
else {
|
|
6206
|
-
refs[key] = value;
|
|
6207
|
-
}
|
|
6208
|
-
}
|
|
6209
|
-
|
|
6210
6268
|
const queuePostRenderEffect = queueEffectWithSuspense
|
|
6211
6269
|
;
|
|
6212
6270
|
/**
|
|
@@ -6478,12 +6536,15 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6478
6536
|
const oldProps = n1.props || EMPTY_OBJ;
|
|
6479
6537
|
const newProps = n2.props || EMPTY_OBJ;
|
|
6480
6538
|
let vnodeHook;
|
|
6539
|
+
// disable recurse in beforeUpdate hooks
|
|
6540
|
+
parentComponent && toggleRecurse(parentComponent, false);
|
|
6481
6541
|
if ((vnodeHook = newProps.onVnodeBeforeUpdate)) {
|
|
6482
6542
|
invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
6483
6543
|
}
|
|
6484
6544
|
if (dirs) {
|
|
6485
6545
|
invokeDirectiveHook(n2, n1, parentComponent, 'beforeUpdate');
|
|
6486
6546
|
}
|
|
6547
|
+
parentComponent && toggleRecurse(parentComponent, true);
|
|
6487
6548
|
if (isHmrUpdating) {
|
|
6488
6549
|
// HMR updated, force full diff
|
|
6489
6550
|
patchFlag = 0;
|
|
@@ -6767,7 +6828,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6767
6828
|
const { el, props } = initialVNode;
|
|
6768
6829
|
const { bm, m, parent } = instance;
|
|
6769
6830
|
const isAsyncWrapperVNode = isAsyncWrapper(initialVNode);
|
|
6770
|
-
|
|
6831
|
+
toggleRecurse(instance, false);
|
|
6771
6832
|
// beforeMount hook
|
|
6772
6833
|
if (bm) {
|
|
6773
6834
|
invokeArrayFns(bm);
|
|
@@ -6780,7 +6841,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6780
6841
|
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */, instance)) {
|
|
6781
6842
|
instance.emit('hook:beforeMount');
|
|
6782
6843
|
}
|
|
6783
|
-
|
|
6844
|
+
toggleRecurse(instance, true);
|
|
6784
6845
|
if (el && hydrateNode) {
|
|
6785
6846
|
// vnode has adopted host node - perform hydration instead of mount.
|
|
6786
6847
|
const hydrateSubTree = () => {
|
|
@@ -6868,7 +6929,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6868
6929
|
pushWarningContext(next || instance.vnode);
|
|
6869
6930
|
}
|
|
6870
6931
|
// Disallow component effect recursion during pre-lifecycle hooks.
|
|
6871
|
-
|
|
6932
|
+
toggleRecurse(instance, false);
|
|
6872
6933
|
if (next) {
|
|
6873
6934
|
next.el = vnode.el;
|
|
6874
6935
|
updateComponentPreRender(instance, next, optimized);
|
|
@@ -6887,7 +6948,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6887
6948
|
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */, instance)) {
|
|
6888
6949
|
instance.emit('hook:beforeUpdate');
|
|
6889
6950
|
}
|
|
6890
|
-
|
|
6951
|
+
toggleRecurse(instance, true);
|
|
6891
6952
|
// render
|
|
6892
6953
|
{
|
|
6893
6954
|
startMeasure(instance, `render`);
|
|
@@ -6936,13 +6997,13 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6936
6997
|
}
|
|
6937
6998
|
};
|
|
6938
6999
|
// create reactive effect for rendering
|
|
6939
|
-
const effect = new ReactiveEffect(componentUpdateFn, () => queueJob(instance.update), instance.scope // track it in component's effect scope
|
|
6940
|
-
);
|
|
7000
|
+
const effect = (instance.effect = new ReactiveEffect(componentUpdateFn, () => queueJob(instance.update), instance.scope // track it in component's effect scope
|
|
7001
|
+
));
|
|
6941
7002
|
const update = (instance.update = effect.run.bind(effect));
|
|
6942
7003
|
update.id = instance.uid;
|
|
6943
7004
|
// allowRecurse
|
|
6944
7005
|
// #1801, #2043 component render effects should allow recursive updates
|
|
6945
|
-
|
|
7006
|
+
toggleRecurse(instance, true);
|
|
6946
7007
|
{
|
|
6947
7008
|
effect.onTrack = instance.rtc
|
|
6948
7009
|
? e => invokeArrayFns(instance.rtc, e)
|
|
@@ -7472,88 +7533,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7472
7533
|
createApp: createAppAPI(render, hydrate)
|
|
7473
7534
|
};
|
|
7474
7535
|
}
|
|
7475
|
-
function
|
|
7476
|
-
|
|
7477
|
-
rawRef.forEach((r, i) => setRef(r, oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), parentSuspense, vnode, isUnmount));
|
|
7478
|
-
return;
|
|
7479
|
-
}
|
|
7480
|
-
if (isAsyncWrapper(vnode) && !isUnmount) {
|
|
7481
|
-
// when mounting async components, nothing needs to be done,
|
|
7482
|
-
// because the template ref is forwarded to inner component
|
|
7483
|
-
return;
|
|
7484
|
-
}
|
|
7485
|
-
const refValue = vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */
|
|
7486
|
-
? getExposeProxy(vnode.component) || vnode.component.proxy
|
|
7487
|
-
: vnode.el;
|
|
7488
|
-
const value = isUnmount ? null : refValue;
|
|
7489
|
-
const { i: owner, r: ref } = rawRef;
|
|
7490
|
-
if (!owner) {
|
|
7491
|
-
warn$1(`Missing ref owner context. ref cannot be used on hoisted vnodes. ` +
|
|
7492
|
-
`A vnode with ref must be created inside the render function.`);
|
|
7493
|
-
return;
|
|
7494
|
-
}
|
|
7495
|
-
const oldRef = oldRawRef && oldRawRef.r;
|
|
7496
|
-
const refs = owner.refs === EMPTY_OBJ ? (owner.refs = {}) : owner.refs;
|
|
7497
|
-
const setupState = owner.setupState;
|
|
7498
|
-
// dynamic ref changed. unset old ref
|
|
7499
|
-
if (oldRef != null && oldRef !== ref) {
|
|
7500
|
-
if (isString(oldRef)) {
|
|
7501
|
-
refs[oldRef] = null;
|
|
7502
|
-
if (hasOwn(setupState, oldRef)) {
|
|
7503
|
-
setupState[oldRef] = null;
|
|
7504
|
-
}
|
|
7505
|
-
}
|
|
7506
|
-
else if (isRef(oldRef)) {
|
|
7507
|
-
oldRef.value = null;
|
|
7508
|
-
}
|
|
7509
|
-
}
|
|
7510
|
-
if (isString(ref)) {
|
|
7511
|
-
const doSet = () => {
|
|
7512
|
-
if (isCompatEnabled("V_FOR_REF" /* V_FOR_REF */, owner)) {
|
|
7513
|
-
registerLegacyRef(refs, ref, refValue, owner, rawRef.f, isUnmount);
|
|
7514
|
-
}
|
|
7515
|
-
else {
|
|
7516
|
-
refs[ref] = value;
|
|
7517
|
-
}
|
|
7518
|
-
if (hasOwn(setupState, ref)) {
|
|
7519
|
-
setupState[ref] = value;
|
|
7520
|
-
}
|
|
7521
|
-
};
|
|
7522
|
-
// #1789: for non-null values, set them after render
|
|
7523
|
-
// null values means this is unmount and it should not overwrite another
|
|
7524
|
-
// ref with the same key
|
|
7525
|
-
if (value) {
|
|
7526
|
-
doSet.id = -1;
|
|
7527
|
-
queuePostRenderEffect(doSet, parentSuspense);
|
|
7528
|
-
}
|
|
7529
|
-
else {
|
|
7530
|
-
doSet();
|
|
7531
|
-
}
|
|
7532
|
-
}
|
|
7533
|
-
else if (isRef(ref)) {
|
|
7534
|
-
const doSet = () => {
|
|
7535
|
-
ref.value = value;
|
|
7536
|
-
};
|
|
7537
|
-
if (value) {
|
|
7538
|
-
doSet.id = -1;
|
|
7539
|
-
queuePostRenderEffect(doSet, parentSuspense);
|
|
7540
|
-
}
|
|
7541
|
-
else {
|
|
7542
|
-
doSet();
|
|
7543
|
-
}
|
|
7544
|
-
}
|
|
7545
|
-
else if (isFunction(ref)) {
|
|
7546
|
-
callWithErrorHandling(ref, owner, 12 /* FUNCTION_REF */, [value, refs]);
|
|
7547
|
-
}
|
|
7548
|
-
else {
|
|
7549
|
-
warn$1('Invalid template ref type:', value, `(${typeof value})`);
|
|
7550
|
-
}
|
|
7551
|
-
}
|
|
7552
|
-
function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
|
|
7553
|
-
callWithAsyncErrorHandling(hook, instance, 7 /* VNODE_HOOK */, [
|
|
7554
|
-
vnode,
|
|
7555
|
-
prevVNode
|
|
7556
|
-
]);
|
|
7536
|
+
function toggleRecurse({ effect, update }, allowed) {
|
|
7537
|
+
effect.allowRecurse = update.allowRecurse = allowed;
|
|
7557
7538
|
}
|
|
7558
7539
|
/**
|
|
7559
7540
|
* #1156
|
|
@@ -8202,6 +8183,7 @@ function convertLegacyFunctionalComponent(comp) {
|
|
|
8202
8183
|
};
|
|
8203
8184
|
Func.props = comp.props;
|
|
8204
8185
|
Func.displayName = comp.name;
|
|
8186
|
+
Func.compatConfig = comp.compatConfig;
|
|
8205
8187
|
// v2 functional components do not inherit attrs
|
|
8206
8188
|
Func.inheritAttrs = false;
|
|
8207
8189
|
normalizedFunctionalComponentMap.set(comp, Func);
|
|
@@ -8347,10 +8329,10 @@ const createVNodeWithArgsTransform = (...args) => {
|
|
|
8347
8329
|
};
|
|
8348
8330
|
const InternalObjectKey = `__vInternal`;
|
|
8349
8331
|
const normalizeKey = ({ key }) => key != null ? key : null;
|
|
8350
|
-
const normalizeRef = ({ ref }) => {
|
|
8332
|
+
const normalizeRef = ({ ref, ref_key, ref_for }) => {
|
|
8351
8333
|
return (ref != null
|
|
8352
8334
|
? isString(ref) || isRef(ref) || isFunction(ref)
|
|
8353
|
-
? { i: currentRenderingInstance, r: ref }
|
|
8335
|
+
? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for }
|
|
8354
8336
|
: ref
|
|
8355
8337
|
: null);
|
|
8356
8338
|
};
|
|
@@ -8418,7 +8400,6 @@ function createBaseVNode(type, props = null, children = null, patchFlag = 0, dyn
|
|
|
8418
8400
|
}
|
|
8419
8401
|
{
|
|
8420
8402
|
convertLegacyVModelProps(vnode);
|
|
8421
|
-
convertLegacyRefInFor(vnode);
|
|
8422
8403
|
defineLegacyVNodeProperties(vnode);
|
|
8423
8404
|
}
|
|
8424
8405
|
return vnode;
|
|
@@ -8704,6 +8685,12 @@ function mergeProps(...args) {
|
|
|
8704
8685
|
}
|
|
8705
8686
|
}
|
|
8706
8687
|
return ret;
|
|
8688
|
+
}
|
|
8689
|
+
function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
|
|
8690
|
+
callWithAsyncErrorHandling(hook, instance, 7 /* VNODE_HOOK */, [
|
|
8691
|
+
vnode,
|
|
8692
|
+
prevVNode
|
|
8693
|
+
]);
|
|
8707
8694
|
}
|
|
8708
8695
|
|
|
8709
8696
|
function getCompatChildren(instance) {
|
|
@@ -9136,23 +9123,23 @@ const PublicInstanceProxyHandlers = {
|
|
|
9136
9123
|
const n = accessCache[key];
|
|
9137
9124
|
if (n !== undefined) {
|
|
9138
9125
|
switch (n) {
|
|
9139
|
-
case
|
|
9126
|
+
case 1 /* SETUP */:
|
|
9140
9127
|
return setupState[key];
|
|
9141
|
-
case
|
|
9128
|
+
case 2 /* DATA */:
|
|
9142
9129
|
return data[key];
|
|
9143
|
-
case
|
|
9130
|
+
case 4 /* CONTEXT */:
|
|
9144
9131
|
return ctx[key];
|
|
9145
|
-
case
|
|
9132
|
+
case 3 /* PROPS */:
|
|
9146
9133
|
return props[key];
|
|
9147
9134
|
// default: just fallthrough
|
|
9148
9135
|
}
|
|
9149
9136
|
}
|
|
9150
9137
|
else if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) {
|
|
9151
|
-
accessCache[key] =
|
|
9138
|
+
accessCache[key] = 1 /* SETUP */;
|
|
9152
9139
|
return setupState[key];
|
|
9153
9140
|
}
|
|
9154
9141
|
else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
|
|
9155
|
-
accessCache[key] =
|
|
9142
|
+
accessCache[key] = 2 /* DATA */;
|
|
9156
9143
|
return data[key];
|
|
9157
9144
|
}
|
|
9158
9145
|
else if (
|
|
@@ -9160,15 +9147,15 @@ const PublicInstanceProxyHandlers = {
|
|
|
9160
9147
|
// props
|
|
9161
9148
|
(normalizedProps = instance.propsOptions[0]) &&
|
|
9162
9149
|
hasOwn(normalizedProps, key)) {
|
|
9163
|
-
accessCache[key] =
|
|
9150
|
+
accessCache[key] = 3 /* PROPS */;
|
|
9164
9151
|
return props[key];
|
|
9165
9152
|
}
|
|
9166
9153
|
else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
|
|
9167
|
-
accessCache[key] =
|
|
9154
|
+
accessCache[key] = 4 /* CONTEXT */;
|
|
9168
9155
|
return ctx[key];
|
|
9169
9156
|
}
|
|
9170
9157
|
else if (shouldCacheAccess) {
|
|
9171
|
-
accessCache[key] =
|
|
9158
|
+
accessCache[key] = 0 /* OTHER */;
|
|
9172
9159
|
}
|
|
9173
9160
|
}
|
|
9174
9161
|
const publicGetter = publicPropertiesMap[key];
|
|
@@ -9189,7 +9176,7 @@ const PublicInstanceProxyHandlers = {
|
|
|
9189
9176
|
}
|
|
9190
9177
|
else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
|
|
9191
9178
|
// user may set custom properties to `this` that start with `$`
|
|
9192
|
-
accessCache[key] =
|
|
9179
|
+
accessCache[key] = 4 /* CONTEXT */;
|
|
9193
9180
|
return ctx[key];
|
|
9194
9181
|
}
|
|
9195
9182
|
else if (
|
|
@@ -9257,7 +9244,7 @@ const PublicInstanceProxyHandlers = {
|
|
|
9257
9244
|
},
|
|
9258
9245
|
has({ _: { data, setupState, accessCache, ctx, appContext, propsOptions } }, key) {
|
|
9259
9246
|
let normalizedProps;
|
|
9260
|
-
return (accessCache[key]
|
|
9247
|
+
return (!!accessCache[key] ||
|
|
9261
9248
|
(data !== EMPTY_OBJ && hasOwn(data, key)) ||
|
|
9262
9249
|
(setupState !== EMPTY_OBJ && hasOwn(setupState, key)) ||
|
|
9263
9250
|
((normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key)) ||
|
|
@@ -9363,6 +9350,7 @@ function createComponentInstance(vnode, parent, suspense) {
|
|
|
9363
9350
|
root: null,
|
|
9364
9351
|
next: null,
|
|
9365
9352
|
subTree: null,
|
|
9353
|
+
effect: null,
|
|
9366
9354
|
update: null,
|
|
9367
9355
|
scope: new EffectScope(true /* detached */),
|
|
9368
9356
|
render: null,
|
|
@@ -10832,7 +10820,7 @@ function isMemoSame(cached, memo) {
|
|
|
10832
10820
|
}
|
|
10833
10821
|
|
|
10834
10822
|
// Core API ------------------------------------------------------------------
|
|
10835
|
-
const version = "3.2.
|
|
10823
|
+
const version = "3.2.26";
|
|
10836
10824
|
/**
|
|
10837
10825
|
* SSR utils for \@vue/server-renderer. Only exposed in cjs builds.
|
|
10838
10826
|
* @internal
|
|
@@ -11099,12 +11087,19 @@ prevChildren, parentComponent, parentSuspense, unmountChildren) {
|
|
|
11099
11087
|
el[key] = value == null ? '' : value;
|
|
11100
11088
|
return;
|
|
11101
11089
|
}
|
|
11102
|
-
if (key === 'value' &&
|
|
11090
|
+
if (key === 'value' &&
|
|
11091
|
+
el.tagName !== 'PROGRESS' &&
|
|
11092
|
+
// custom elements may use _value internally
|
|
11093
|
+
!el.tagName.includes('-')) {
|
|
11103
11094
|
// store value as _value as well since
|
|
11104
11095
|
// non-string values will be stringified.
|
|
11105
11096
|
el._value = value;
|
|
11106
11097
|
const newValue = value == null ? '' : value;
|
|
11107
|
-
if (el.value !== newValue
|
|
11098
|
+
if (el.value !== newValue ||
|
|
11099
|
+
// #4956: always set for OPTION elements because its value falls back to
|
|
11100
|
+
// textContent if no value attribute is present. And setting .value for
|
|
11101
|
+
// OPTION has no side effect
|
|
11102
|
+
el.tagName === 'OPTION') {
|
|
11108
11103
|
el.value = newValue;
|
|
11109
11104
|
}
|
|
11110
11105
|
if (value == null) {
|
|
@@ -11500,7 +11495,7 @@ class VueElement extends BaseClass {
|
|
|
11500
11495
|
// HMR
|
|
11501
11496
|
{
|
|
11502
11497
|
instance.ceReload = newStyles => {
|
|
11503
|
-
//
|
|
11498
|
+
// always reset styles
|
|
11504
11499
|
if (this._styles) {
|
|
11505
11500
|
this._styles.forEach(s => this.shadowRoot.removeChild(s));
|
|
11506
11501
|
this._styles.length = 0;
|