@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
|
@@ -37,7 +37,7 @@ var Vue = (function () {
|
|
|
37
37
|
const isSpecialBooleanAttr = /*#__PURE__*/ makeMap(specialBooleanAttrs);
|
|
38
38
|
/**
|
|
39
39
|
* Boolean attributes should be included if the value is truthy or ''.
|
|
40
|
-
* e.g.
|
|
40
|
+
* e.g. `<select multiple>` compiles to `{ multiple: '' }`
|
|
41
41
|
*/
|
|
42
42
|
function includeBooleanAttr(value) {
|
|
43
43
|
return !!value || value === '';
|
|
@@ -269,7 +269,7 @@ var Vue = (function () {
|
|
|
269
269
|
'' + parseInt(key, 10) === key;
|
|
270
270
|
const isReservedProp = /*#__PURE__*/ makeMap(
|
|
271
271
|
// the leading comma is intentional so empty string "" is also included
|
|
272
|
-
',key,ref,' +
|
|
272
|
+
',key,ref,ref_for,ref_key,' +
|
|
273
273
|
'onVnodeBeforeMount,onVnodeMounted,' +
|
|
274
274
|
'onVnodeBeforeUpdate,onVnodeUpdated,' +
|
|
275
275
|
'onVnodeBeforeUnmount,onVnodeUnmounted');
|
|
@@ -458,7 +458,7 @@ var Vue = (function () {
|
|
|
458
458
|
let effectTrackDepth = 0;
|
|
459
459
|
let trackOpBit = 1;
|
|
460
460
|
/**
|
|
461
|
-
* The bitwise track markers support at most 30 levels
|
|
461
|
+
* The bitwise track markers support at most 30 levels of recursion.
|
|
462
462
|
* This value is chosen to enable modern JS engines to use a SMI on all platforms.
|
|
463
463
|
* When recursion depth is greater, fall back to using a full cleanup.
|
|
464
464
|
*/
|
|
@@ -779,7 +779,7 @@ var Vue = (function () {
|
|
|
779
779
|
function createSetter(shallow = false) {
|
|
780
780
|
return function set(target, key, value, receiver) {
|
|
781
781
|
let oldValue = target[key];
|
|
782
|
-
if (!shallow) {
|
|
782
|
+
if (!shallow && !isReadonly(value)) {
|
|
783
783
|
value = toRaw(value);
|
|
784
784
|
oldValue = toRaw(oldValue);
|
|
785
785
|
if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
|
|
@@ -1364,21 +1364,25 @@ var Vue = (function () {
|
|
|
1364
1364
|
return ret;
|
|
1365
1365
|
}
|
|
1366
1366
|
class ObjectRefImpl {
|
|
1367
|
-
constructor(_object, _key) {
|
|
1367
|
+
constructor(_object, _key, _defaultValue) {
|
|
1368
1368
|
this._object = _object;
|
|
1369
1369
|
this._key = _key;
|
|
1370
|
+
this._defaultValue = _defaultValue;
|
|
1370
1371
|
this.__v_isRef = true;
|
|
1371
1372
|
}
|
|
1372
1373
|
get value() {
|
|
1373
|
-
|
|
1374
|
+
const val = this._object[this._key];
|
|
1375
|
+
return val === undefined ? this._defaultValue : val;
|
|
1374
1376
|
}
|
|
1375
1377
|
set value(newVal) {
|
|
1376
1378
|
this._object[this._key] = newVal;
|
|
1377
1379
|
}
|
|
1378
1380
|
}
|
|
1379
|
-
function toRef(object, key) {
|
|
1381
|
+
function toRef(object, key, defaultValue) {
|
|
1380
1382
|
const val = object[key];
|
|
1381
|
-
return isRef(val)
|
|
1383
|
+
return isRef(val)
|
|
1384
|
+
? val
|
|
1385
|
+
: new ObjectRefImpl(object, key, defaultValue);
|
|
1382
1386
|
}
|
|
1383
1387
|
|
|
1384
1388
|
class ComputedRefImpl {
|
|
@@ -1824,11 +1828,6 @@ var Vue = (function () {
|
|
|
1824
1828
|
`Use "${newHook}" instead.`,
|
|
1825
1829
|
link: `https://v3.vuejs.org/guide/migration/custom-directives.html`
|
|
1826
1830
|
},
|
|
1827
|
-
["V_FOR_REF" /* V_FOR_REF */]: {
|
|
1828
|
-
message: `Ref usage on v-for no longer creates array ref values in Vue 3. ` +
|
|
1829
|
-
`Consider using function refs or refactor to avoid ref usage altogether.`,
|
|
1830
|
-
link: `https://v3.vuejs.org/guide/migration/array-refs.html`
|
|
1831
|
-
},
|
|
1832
1831
|
["V_ON_KEYCODE_MODIFIER" /* V_ON_KEYCODE_MODIFIER */]: {
|
|
1833
1832
|
message: `Using keyCode as v-on modifier is no longer supported. ` +
|
|
1834
1833
|
`Use kebab-case key name modifiers instead.`,
|
|
@@ -3235,7 +3234,8 @@ var Vue = (function () {
|
|
|
3235
3234
|
const rawProps = toRaw(props);
|
|
3236
3235
|
const { mode } = rawProps;
|
|
3237
3236
|
// check mode
|
|
3238
|
-
if (mode &&
|
|
3237
|
+
if (mode &&
|
|
3238
|
+
mode !== 'in-out' && mode !== 'out-in' && mode !== 'default') {
|
|
3239
3239
|
warn$1(`invalid <transition> mode: ${mode}`);
|
|
3240
3240
|
}
|
|
3241
3241
|
// at this point children has a guaranteed length of 1.
|
|
@@ -3881,7 +3881,7 @@ var Vue = (function () {
|
|
|
3881
3881
|
}
|
|
3882
3882
|
current = current.parent;
|
|
3883
3883
|
}
|
|
3884
|
-
hook();
|
|
3884
|
+
return hook();
|
|
3885
3885
|
});
|
|
3886
3886
|
injectHook(type, wrappedHook, target);
|
|
3887
3887
|
// In addition to registering it on the target instance, we walk up the parent
|
|
@@ -4659,7 +4659,7 @@ var Vue = (function () {
|
|
|
4659
4659
|
continue;
|
|
4660
4660
|
}
|
|
4661
4661
|
}
|
|
4662
|
-
if (value !== attrs[key]) {
|
|
4662
|
+
if (!(key in attrs) || value !== attrs[key]) {
|
|
4663
4663
|
attrs[key] = value;
|
|
4664
4664
|
hasAttrsChanged = true;
|
|
4665
4665
|
}
|
|
@@ -5240,7 +5240,7 @@ var Vue = (function () {
|
|
|
5240
5240
|
return vm;
|
|
5241
5241
|
}
|
|
5242
5242
|
}
|
|
5243
|
-
Vue.version = "3.2.
|
|
5243
|
+
Vue.version = "3.2.26";
|
|
5244
5244
|
Vue.config = singletonApp.config;
|
|
5245
5245
|
Vue.use = (p, ...options) => {
|
|
5246
5246
|
if (p && isFunction(p.install)) {
|
|
@@ -5591,7 +5591,7 @@ var Vue = (function () {
|
|
|
5591
5591
|
];
|
|
5592
5592
|
const patched = new WeakSet();
|
|
5593
5593
|
function defineReactive(obj, key, val) {
|
|
5594
|
-
// it's possible for the
|
|
5594
|
+
// it's possible for the original object to be mutated after being defined
|
|
5595
5595
|
// and expecting reactivity... we are covering it here because this seems to
|
|
5596
5596
|
// be a bit more common.
|
|
5597
5597
|
if (isObject(val) && !isReactive(val) && !patched.has(val)) {
|
|
@@ -5811,6 +5811,102 @@ var Vue = (function () {
|
|
|
5811
5811
|
};
|
|
5812
5812
|
}
|
|
5813
5813
|
|
|
5814
|
+
/**
|
|
5815
|
+
* Function for handling a template ref
|
|
5816
|
+
*/
|
|
5817
|
+
function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
5818
|
+
if (isArray(rawRef)) {
|
|
5819
|
+
rawRef.forEach((r, i) => setRef(r, oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), parentSuspense, vnode, isUnmount));
|
|
5820
|
+
return;
|
|
5821
|
+
}
|
|
5822
|
+
if (isAsyncWrapper(vnode) && !isUnmount) {
|
|
5823
|
+
// when mounting async components, nothing needs to be done,
|
|
5824
|
+
// because the template ref is forwarded to inner component
|
|
5825
|
+
return;
|
|
5826
|
+
}
|
|
5827
|
+
const refValue = vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */
|
|
5828
|
+
? getExposeProxy(vnode.component) || vnode.component.proxy
|
|
5829
|
+
: vnode.el;
|
|
5830
|
+
const value = isUnmount ? null : refValue;
|
|
5831
|
+
const { i: owner, r: ref } = rawRef;
|
|
5832
|
+
if (!owner) {
|
|
5833
|
+
warn$1(`Missing ref owner context. ref cannot be used on hoisted vnodes. ` +
|
|
5834
|
+
`A vnode with ref must be created inside the render function.`);
|
|
5835
|
+
return;
|
|
5836
|
+
}
|
|
5837
|
+
const oldRef = oldRawRef && oldRawRef.r;
|
|
5838
|
+
const refs = owner.refs === EMPTY_OBJ ? (owner.refs = {}) : owner.refs;
|
|
5839
|
+
const setupState = owner.setupState;
|
|
5840
|
+
// dynamic ref changed. unset old ref
|
|
5841
|
+
if (oldRef != null && oldRef !== ref) {
|
|
5842
|
+
if (isString(oldRef)) {
|
|
5843
|
+
refs[oldRef] = null;
|
|
5844
|
+
if (hasOwn(setupState, oldRef)) {
|
|
5845
|
+
setupState[oldRef] = null;
|
|
5846
|
+
}
|
|
5847
|
+
}
|
|
5848
|
+
else if (isRef(oldRef)) {
|
|
5849
|
+
oldRef.value = null;
|
|
5850
|
+
}
|
|
5851
|
+
}
|
|
5852
|
+
if (isFunction(ref)) {
|
|
5853
|
+
callWithErrorHandling(ref, owner, 12 /* FUNCTION_REF */, [value, refs]);
|
|
5854
|
+
}
|
|
5855
|
+
else {
|
|
5856
|
+
const _isString = isString(ref);
|
|
5857
|
+
const _isRef = isRef(ref);
|
|
5858
|
+
if (_isString || _isRef) {
|
|
5859
|
+
const doSet = () => {
|
|
5860
|
+
if (rawRef.f) {
|
|
5861
|
+
const existing = _isString ? refs[ref] : ref.value;
|
|
5862
|
+
if (isUnmount) {
|
|
5863
|
+
isArray(existing) && remove(existing, refValue);
|
|
5864
|
+
}
|
|
5865
|
+
else {
|
|
5866
|
+
if (!isArray(existing)) {
|
|
5867
|
+
if (_isString) {
|
|
5868
|
+
refs[ref] = [refValue];
|
|
5869
|
+
}
|
|
5870
|
+
else {
|
|
5871
|
+
ref.value = [refValue];
|
|
5872
|
+
if (rawRef.k)
|
|
5873
|
+
refs[rawRef.k] = ref.value;
|
|
5874
|
+
}
|
|
5875
|
+
}
|
|
5876
|
+
else if (!existing.includes(refValue)) {
|
|
5877
|
+
existing.push(refValue);
|
|
5878
|
+
}
|
|
5879
|
+
}
|
|
5880
|
+
}
|
|
5881
|
+
else if (_isString) {
|
|
5882
|
+
refs[ref] = value;
|
|
5883
|
+
if (hasOwn(setupState, ref)) {
|
|
5884
|
+
setupState[ref] = value;
|
|
5885
|
+
}
|
|
5886
|
+
}
|
|
5887
|
+
else if (isRef(ref)) {
|
|
5888
|
+
ref.value = value;
|
|
5889
|
+
if (rawRef.k)
|
|
5890
|
+
refs[rawRef.k] = value;
|
|
5891
|
+
}
|
|
5892
|
+
else {
|
|
5893
|
+
warn$1('Invalid template ref type:', ref, `(${typeof ref})`);
|
|
5894
|
+
}
|
|
5895
|
+
};
|
|
5896
|
+
if (value) {
|
|
5897
|
+
doSet.id = -1;
|
|
5898
|
+
queuePostRenderEffect(doSet, parentSuspense);
|
|
5899
|
+
}
|
|
5900
|
+
else {
|
|
5901
|
+
doSet();
|
|
5902
|
+
}
|
|
5903
|
+
}
|
|
5904
|
+
else {
|
|
5905
|
+
warn$1('Invalid template ref type:', ref, `(${typeof ref})`);
|
|
5906
|
+
}
|
|
5907
|
+
}
|
|
5908
|
+
}
|
|
5909
|
+
|
|
5814
5910
|
let hasMismatch = false;
|
|
5815
5911
|
const isSVGContainer = (container) => /svg/.test(container.namespaceURI) && container.tagName !== 'foreignObject';
|
|
5816
5912
|
const isComment = (node) => node.nodeType === 8 /* COMMENT */;
|
|
@@ -6172,44 +6268,6 @@ var Vue = (function () {
|
|
|
6172
6268
|
return supported;
|
|
6173
6269
|
}
|
|
6174
6270
|
|
|
6175
|
-
function convertLegacyRefInFor(vnode) {
|
|
6176
|
-
// refInFor
|
|
6177
|
-
if (vnode.props && vnode.props.refInFor) {
|
|
6178
|
-
delete vnode.props.refInFor;
|
|
6179
|
-
if (vnode.ref) {
|
|
6180
|
-
if (isArray(vnode.ref)) {
|
|
6181
|
-
vnode.ref.forEach(r => (r.f = true));
|
|
6182
|
-
}
|
|
6183
|
-
else {
|
|
6184
|
-
vnode.ref.f = true;
|
|
6185
|
-
}
|
|
6186
|
-
}
|
|
6187
|
-
}
|
|
6188
|
-
}
|
|
6189
|
-
function registerLegacyRef(refs, key, value, owner, isInFor, isUnmount) {
|
|
6190
|
-
const existing = refs[key];
|
|
6191
|
-
if (isUnmount) {
|
|
6192
|
-
if (isArray(existing)) {
|
|
6193
|
-
remove(existing, value);
|
|
6194
|
-
}
|
|
6195
|
-
else {
|
|
6196
|
-
refs[key] = null;
|
|
6197
|
-
}
|
|
6198
|
-
}
|
|
6199
|
-
else if (isInFor) {
|
|
6200
|
-
warnDeprecation("V_FOR_REF" /* V_FOR_REF */, owner);
|
|
6201
|
-
if (!isArray(existing)) {
|
|
6202
|
-
refs[key] = [value];
|
|
6203
|
-
}
|
|
6204
|
-
else if (!existing.includes(value)) {
|
|
6205
|
-
existing.push(value);
|
|
6206
|
-
}
|
|
6207
|
-
}
|
|
6208
|
-
else {
|
|
6209
|
-
refs[key] = value;
|
|
6210
|
-
}
|
|
6211
|
-
}
|
|
6212
|
-
|
|
6213
6271
|
const queuePostRenderEffect = queueEffectWithSuspense
|
|
6214
6272
|
;
|
|
6215
6273
|
/**
|
|
@@ -6481,12 +6539,15 @@ var Vue = (function () {
|
|
|
6481
6539
|
const oldProps = n1.props || EMPTY_OBJ;
|
|
6482
6540
|
const newProps = n2.props || EMPTY_OBJ;
|
|
6483
6541
|
let vnodeHook;
|
|
6542
|
+
// disable recurse in beforeUpdate hooks
|
|
6543
|
+
parentComponent && toggleRecurse(parentComponent, false);
|
|
6484
6544
|
if ((vnodeHook = newProps.onVnodeBeforeUpdate)) {
|
|
6485
6545
|
invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
6486
6546
|
}
|
|
6487
6547
|
if (dirs) {
|
|
6488
6548
|
invokeDirectiveHook(n2, n1, parentComponent, 'beforeUpdate');
|
|
6489
6549
|
}
|
|
6550
|
+
parentComponent && toggleRecurse(parentComponent, true);
|
|
6490
6551
|
if (isHmrUpdating) {
|
|
6491
6552
|
// HMR updated, force full diff
|
|
6492
6553
|
patchFlag = 0;
|
|
@@ -6770,7 +6831,7 @@ var Vue = (function () {
|
|
|
6770
6831
|
const { el, props } = initialVNode;
|
|
6771
6832
|
const { bm, m, parent } = instance;
|
|
6772
6833
|
const isAsyncWrapperVNode = isAsyncWrapper(initialVNode);
|
|
6773
|
-
|
|
6834
|
+
toggleRecurse(instance, false);
|
|
6774
6835
|
// beforeMount hook
|
|
6775
6836
|
if (bm) {
|
|
6776
6837
|
invokeArrayFns(bm);
|
|
@@ -6783,7 +6844,7 @@ var Vue = (function () {
|
|
|
6783
6844
|
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */, instance)) {
|
|
6784
6845
|
instance.emit('hook:beforeMount');
|
|
6785
6846
|
}
|
|
6786
|
-
|
|
6847
|
+
toggleRecurse(instance, true);
|
|
6787
6848
|
if (el && hydrateNode) {
|
|
6788
6849
|
// vnode has adopted host node - perform hydration instead of mount.
|
|
6789
6850
|
const hydrateSubTree = () => {
|
|
@@ -6871,7 +6932,7 @@ var Vue = (function () {
|
|
|
6871
6932
|
pushWarningContext(next || instance.vnode);
|
|
6872
6933
|
}
|
|
6873
6934
|
// Disallow component effect recursion during pre-lifecycle hooks.
|
|
6874
|
-
|
|
6935
|
+
toggleRecurse(instance, false);
|
|
6875
6936
|
if (next) {
|
|
6876
6937
|
next.el = vnode.el;
|
|
6877
6938
|
updateComponentPreRender(instance, next, optimized);
|
|
@@ -6890,7 +6951,7 @@ var Vue = (function () {
|
|
|
6890
6951
|
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */, instance)) {
|
|
6891
6952
|
instance.emit('hook:beforeUpdate');
|
|
6892
6953
|
}
|
|
6893
|
-
|
|
6954
|
+
toggleRecurse(instance, true);
|
|
6894
6955
|
// render
|
|
6895
6956
|
{
|
|
6896
6957
|
startMeasure(instance, `render`);
|
|
@@ -6939,13 +7000,13 @@ var Vue = (function () {
|
|
|
6939
7000
|
}
|
|
6940
7001
|
};
|
|
6941
7002
|
// create reactive effect for rendering
|
|
6942
|
-
const effect = new ReactiveEffect(componentUpdateFn, () => queueJob(instance.update), instance.scope // track it in component's effect scope
|
|
6943
|
-
);
|
|
7003
|
+
const effect = (instance.effect = new ReactiveEffect(componentUpdateFn, () => queueJob(instance.update), instance.scope // track it in component's effect scope
|
|
7004
|
+
));
|
|
6944
7005
|
const update = (instance.update = effect.run.bind(effect));
|
|
6945
7006
|
update.id = instance.uid;
|
|
6946
7007
|
// allowRecurse
|
|
6947
7008
|
// #1801, #2043 component render effects should allow recursive updates
|
|
6948
|
-
|
|
7009
|
+
toggleRecurse(instance, true);
|
|
6949
7010
|
{
|
|
6950
7011
|
effect.onTrack = instance.rtc
|
|
6951
7012
|
? e => invokeArrayFns(instance.rtc, e)
|
|
@@ -7475,88 +7536,8 @@ var Vue = (function () {
|
|
|
7475
7536
|
createApp: createAppAPI(render, hydrate)
|
|
7476
7537
|
};
|
|
7477
7538
|
}
|
|
7478
|
-
function
|
|
7479
|
-
|
|
7480
|
-
rawRef.forEach((r, i) => setRef(r, oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), parentSuspense, vnode, isUnmount));
|
|
7481
|
-
return;
|
|
7482
|
-
}
|
|
7483
|
-
if (isAsyncWrapper(vnode) && !isUnmount) {
|
|
7484
|
-
// when mounting async components, nothing needs to be done,
|
|
7485
|
-
// because the template ref is forwarded to inner component
|
|
7486
|
-
return;
|
|
7487
|
-
}
|
|
7488
|
-
const refValue = vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */
|
|
7489
|
-
? getExposeProxy(vnode.component) || vnode.component.proxy
|
|
7490
|
-
: vnode.el;
|
|
7491
|
-
const value = isUnmount ? null : refValue;
|
|
7492
|
-
const { i: owner, r: ref } = rawRef;
|
|
7493
|
-
if (!owner) {
|
|
7494
|
-
warn$1(`Missing ref owner context. ref cannot be used on hoisted vnodes. ` +
|
|
7495
|
-
`A vnode with ref must be created inside the render function.`);
|
|
7496
|
-
return;
|
|
7497
|
-
}
|
|
7498
|
-
const oldRef = oldRawRef && oldRawRef.r;
|
|
7499
|
-
const refs = owner.refs === EMPTY_OBJ ? (owner.refs = {}) : owner.refs;
|
|
7500
|
-
const setupState = owner.setupState;
|
|
7501
|
-
// dynamic ref changed. unset old ref
|
|
7502
|
-
if (oldRef != null && oldRef !== ref) {
|
|
7503
|
-
if (isString(oldRef)) {
|
|
7504
|
-
refs[oldRef] = null;
|
|
7505
|
-
if (hasOwn(setupState, oldRef)) {
|
|
7506
|
-
setupState[oldRef] = null;
|
|
7507
|
-
}
|
|
7508
|
-
}
|
|
7509
|
-
else if (isRef(oldRef)) {
|
|
7510
|
-
oldRef.value = null;
|
|
7511
|
-
}
|
|
7512
|
-
}
|
|
7513
|
-
if (isString(ref)) {
|
|
7514
|
-
const doSet = () => {
|
|
7515
|
-
if (isCompatEnabled("V_FOR_REF" /* V_FOR_REF */, owner)) {
|
|
7516
|
-
registerLegacyRef(refs, ref, refValue, owner, rawRef.f, isUnmount);
|
|
7517
|
-
}
|
|
7518
|
-
else {
|
|
7519
|
-
refs[ref] = value;
|
|
7520
|
-
}
|
|
7521
|
-
if (hasOwn(setupState, ref)) {
|
|
7522
|
-
setupState[ref] = value;
|
|
7523
|
-
}
|
|
7524
|
-
};
|
|
7525
|
-
// #1789: for non-null values, set them after render
|
|
7526
|
-
// null values means this is unmount and it should not overwrite another
|
|
7527
|
-
// ref with the same key
|
|
7528
|
-
if (value) {
|
|
7529
|
-
doSet.id = -1;
|
|
7530
|
-
queuePostRenderEffect(doSet, parentSuspense);
|
|
7531
|
-
}
|
|
7532
|
-
else {
|
|
7533
|
-
doSet();
|
|
7534
|
-
}
|
|
7535
|
-
}
|
|
7536
|
-
else if (isRef(ref)) {
|
|
7537
|
-
const doSet = () => {
|
|
7538
|
-
ref.value = value;
|
|
7539
|
-
};
|
|
7540
|
-
if (value) {
|
|
7541
|
-
doSet.id = -1;
|
|
7542
|
-
queuePostRenderEffect(doSet, parentSuspense);
|
|
7543
|
-
}
|
|
7544
|
-
else {
|
|
7545
|
-
doSet();
|
|
7546
|
-
}
|
|
7547
|
-
}
|
|
7548
|
-
else if (isFunction(ref)) {
|
|
7549
|
-
callWithErrorHandling(ref, owner, 12 /* FUNCTION_REF */, [value, refs]);
|
|
7550
|
-
}
|
|
7551
|
-
else {
|
|
7552
|
-
warn$1('Invalid template ref type:', value, `(${typeof value})`);
|
|
7553
|
-
}
|
|
7554
|
-
}
|
|
7555
|
-
function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
|
|
7556
|
-
callWithAsyncErrorHandling(hook, instance, 7 /* VNODE_HOOK */, [
|
|
7557
|
-
vnode,
|
|
7558
|
-
prevVNode
|
|
7559
|
-
]);
|
|
7539
|
+
function toggleRecurse({ effect, update }, allowed) {
|
|
7540
|
+
effect.allowRecurse = update.allowRecurse = allowed;
|
|
7560
7541
|
}
|
|
7561
7542
|
/**
|
|
7562
7543
|
* #1156
|
|
@@ -8205,6 +8186,7 @@ var Vue = (function () {
|
|
|
8205
8186
|
};
|
|
8206
8187
|
Func.props = comp.props;
|
|
8207
8188
|
Func.displayName = comp.name;
|
|
8189
|
+
Func.compatConfig = comp.compatConfig;
|
|
8208
8190
|
// v2 functional components do not inherit attrs
|
|
8209
8191
|
Func.inheritAttrs = false;
|
|
8210
8192
|
normalizedFunctionalComponentMap.set(comp, Func);
|
|
@@ -8350,10 +8332,10 @@ var Vue = (function () {
|
|
|
8350
8332
|
};
|
|
8351
8333
|
const InternalObjectKey = `__vInternal`;
|
|
8352
8334
|
const normalizeKey = ({ key }) => key != null ? key : null;
|
|
8353
|
-
const normalizeRef = ({ ref }) => {
|
|
8335
|
+
const normalizeRef = ({ ref, ref_key, ref_for }) => {
|
|
8354
8336
|
return (ref != null
|
|
8355
8337
|
? isString(ref) || isRef(ref) || isFunction(ref)
|
|
8356
|
-
? { i: currentRenderingInstance, r: ref }
|
|
8338
|
+
? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for }
|
|
8357
8339
|
: ref
|
|
8358
8340
|
: null);
|
|
8359
8341
|
};
|
|
@@ -8421,7 +8403,6 @@ var Vue = (function () {
|
|
|
8421
8403
|
}
|
|
8422
8404
|
{
|
|
8423
8405
|
convertLegacyVModelProps(vnode);
|
|
8424
|
-
convertLegacyRefInFor(vnode);
|
|
8425
8406
|
defineLegacyVNodeProperties(vnode);
|
|
8426
8407
|
}
|
|
8427
8408
|
return vnode;
|
|
@@ -8707,6 +8688,12 @@ var Vue = (function () {
|
|
|
8707
8688
|
}
|
|
8708
8689
|
}
|
|
8709
8690
|
return ret;
|
|
8691
|
+
}
|
|
8692
|
+
function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
|
|
8693
|
+
callWithAsyncErrorHandling(hook, instance, 7 /* VNODE_HOOK */, [
|
|
8694
|
+
vnode,
|
|
8695
|
+
prevVNode
|
|
8696
|
+
]);
|
|
8710
8697
|
}
|
|
8711
8698
|
|
|
8712
8699
|
function getCompatChildren(instance) {
|
|
@@ -9139,23 +9126,23 @@ var Vue = (function () {
|
|
|
9139
9126
|
const n = accessCache[key];
|
|
9140
9127
|
if (n !== undefined) {
|
|
9141
9128
|
switch (n) {
|
|
9142
|
-
case
|
|
9129
|
+
case 1 /* SETUP */:
|
|
9143
9130
|
return setupState[key];
|
|
9144
|
-
case
|
|
9131
|
+
case 2 /* DATA */:
|
|
9145
9132
|
return data[key];
|
|
9146
|
-
case
|
|
9133
|
+
case 4 /* CONTEXT */:
|
|
9147
9134
|
return ctx[key];
|
|
9148
|
-
case
|
|
9135
|
+
case 3 /* PROPS */:
|
|
9149
9136
|
return props[key];
|
|
9150
9137
|
// default: just fallthrough
|
|
9151
9138
|
}
|
|
9152
9139
|
}
|
|
9153
9140
|
else if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) {
|
|
9154
|
-
accessCache[key] =
|
|
9141
|
+
accessCache[key] = 1 /* SETUP */;
|
|
9155
9142
|
return setupState[key];
|
|
9156
9143
|
}
|
|
9157
9144
|
else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
|
|
9158
|
-
accessCache[key] =
|
|
9145
|
+
accessCache[key] = 2 /* DATA */;
|
|
9159
9146
|
return data[key];
|
|
9160
9147
|
}
|
|
9161
9148
|
else if (
|
|
@@ -9163,15 +9150,15 @@ var Vue = (function () {
|
|
|
9163
9150
|
// props
|
|
9164
9151
|
(normalizedProps = instance.propsOptions[0]) &&
|
|
9165
9152
|
hasOwn(normalizedProps, key)) {
|
|
9166
|
-
accessCache[key] =
|
|
9153
|
+
accessCache[key] = 3 /* PROPS */;
|
|
9167
9154
|
return props[key];
|
|
9168
9155
|
}
|
|
9169
9156
|
else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
|
|
9170
|
-
accessCache[key] =
|
|
9157
|
+
accessCache[key] = 4 /* CONTEXT */;
|
|
9171
9158
|
return ctx[key];
|
|
9172
9159
|
}
|
|
9173
9160
|
else if (shouldCacheAccess) {
|
|
9174
|
-
accessCache[key] =
|
|
9161
|
+
accessCache[key] = 0 /* OTHER */;
|
|
9175
9162
|
}
|
|
9176
9163
|
}
|
|
9177
9164
|
const publicGetter = publicPropertiesMap[key];
|
|
@@ -9192,7 +9179,7 @@ var Vue = (function () {
|
|
|
9192
9179
|
}
|
|
9193
9180
|
else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
|
|
9194
9181
|
// user may set custom properties to `this` that start with `$`
|
|
9195
|
-
accessCache[key] =
|
|
9182
|
+
accessCache[key] = 4 /* CONTEXT */;
|
|
9196
9183
|
return ctx[key];
|
|
9197
9184
|
}
|
|
9198
9185
|
else if (
|
|
@@ -9260,7 +9247,7 @@ var Vue = (function () {
|
|
|
9260
9247
|
},
|
|
9261
9248
|
has({ _: { data, setupState, accessCache, ctx, appContext, propsOptions } }, key) {
|
|
9262
9249
|
let normalizedProps;
|
|
9263
|
-
return (accessCache[key]
|
|
9250
|
+
return (!!accessCache[key] ||
|
|
9264
9251
|
(data !== EMPTY_OBJ && hasOwn(data, key)) ||
|
|
9265
9252
|
(setupState !== EMPTY_OBJ && hasOwn(setupState, key)) ||
|
|
9266
9253
|
((normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key)) ||
|
|
@@ -9366,6 +9353,7 @@ var Vue = (function () {
|
|
|
9366
9353
|
root: null,
|
|
9367
9354
|
next: null,
|
|
9368
9355
|
subTree: null,
|
|
9356
|
+
effect: null,
|
|
9369
9357
|
update: null,
|
|
9370
9358
|
scope: new EffectScope(true /* detached */),
|
|
9371
9359
|
render: null,
|
|
@@ -10830,7 +10818,7 @@ var Vue = (function () {
|
|
|
10830
10818
|
}
|
|
10831
10819
|
|
|
10832
10820
|
// Core API ------------------------------------------------------------------
|
|
10833
|
-
const version = "3.2.
|
|
10821
|
+
const version = "3.2.26";
|
|
10834
10822
|
/**
|
|
10835
10823
|
* SSR utils for \@vue/server-renderer. Only exposed in cjs builds.
|
|
10836
10824
|
* @internal
|
|
@@ -11097,12 +11085,19 @@ var Vue = (function () {
|
|
|
11097
11085
|
el[key] = value == null ? '' : value;
|
|
11098
11086
|
return;
|
|
11099
11087
|
}
|
|
11100
|
-
if (key === 'value' &&
|
|
11088
|
+
if (key === 'value' &&
|
|
11089
|
+
el.tagName !== 'PROGRESS' &&
|
|
11090
|
+
// custom elements may use _value internally
|
|
11091
|
+
!el.tagName.includes('-')) {
|
|
11101
11092
|
// store value as _value as well since
|
|
11102
11093
|
// non-string values will be stringified.
|
|
11103
11094
|
el._value = value;
|
|
11104
11095
|
const newValue = value == null ? '' : value;
|
|
11105
|
-
if (el.value !== newValue
|
|
11096
|
+
if (el.value !== newValue ||
|
|
11097
|
+
// #4956: always set for OPTION elements because its value falls back to
|
|
11098
|
+
// textContent if no value attribute is present. And setting .value for
|
|
11099
|
+
// OPTION has no side effect
|
|
11100
|
+
el.tagName === 'OPTION') {
|
|
11106
11101
|
el.value = newValue;
|
|
11107
11102
|
}
|
|
11108
11103
|
if (value == null) {
|
|
@@ -11498,7 +11493,7 @@ var Vue = (function () {
|
|
|
11498
11493
|
// HMR
|
|
11499
11494
|
{
|
|
11500
11495
|
instance.ceReload = newStyles => {
|
|
11501
|
-
//
|
|
11496
|
+
// always reset styles
|
|
11502
11497
|
if (this._styles) {
|
|
11503
11498
|
this._styles.forEach(s => this.shadowRoot.removeChild(s));
|
|
11504
11499
|
this._styles.length = 0;
|