@vue/compat 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/README.md +40 -41
- package/dist/vue.cjs.js +168 -128
- package/dist/vue.cjs.prod.js +120 -77
- package/dist/vue.esm-browser.js +168 -128
- package/dist/vue.esm-browser.prod.js +1 -1
- package/dist/vue.esm-bundler.js +170 -130
- package/dist/vue.global.js +168 -128
- package/dist/vue.global.prod.js +1 -1
- package/dist/vue.runtime.esm-browser.js +160 -120
- package/dist/vue.runtime.esm-browser.prod.js +1 -1
- package/dist/vue.runtime.esm-bundler.js +162 -122
- package/dist/vue.runtime.global.js +160 -120
- package/dist/vue.runtime.global.prod.js +1 -1
- package/package.json +2 -2
|
@@ -198,13 +198,15 @@ function looseIndexOf(arr, val) {
|
|
|
198
198
|
* @private
|
|
199
199
|
*/
|
|
200
200
|
const toDisplayString = (val) => {
|
|
201
|
-
return val
|
|
202
|
-
?
|
|
203
|
-
:
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
201
|
+
return isString(val)
|
|
202
|
+
? val
|
|
203
|
+
: val == null
|
|
204
|
+
? ''
|
|
205
|
+
: isArray(val) ||
|
|
206
|
+
(isObject(val) &&
|
|
207
|
+
(val.toString === objectToString || !isFunction(val.toString)))
|
|
208
|
+
? JSON.stringify(val, replacer, 2)
|
|
209
|
+
: String(val);
|
|
208
210
|
};
|
|
209
211
|
const replacer = (_key, val) => {
|
|
210
212
|
// can't use isRef here since @vue/shared has no deps
|
|
@@ -278,6 +280,7 @@ const isReservedProp = /*#__PURE__*/ makeMap(
|
|
|
278
280
|
'onVnodeBeforeMount,onVnodeMounted,' +
|
|
279
281
|
'onVnodeBeforeUpdate,onVnodeUpdated,' +
|
|
280
282
|
'onVnodeBeforeUnmount,onVnodeUnmounted');
|
|
283
|
+
const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo');
|
|
281
284
|
const cacheStringFunction = (fn) => {
|
|
282
285
|
const cache = Object.create(null);
|
|
283
286
|
return ((str) => {
|
|
@@ -343,11 +346,19 @@ function warn(msg, ...args) {
|
|
|
343
346
|
}
|
|
344
347
|
|
|
345
348
|
let activeEffectScope;
|
|
346
|
-
const effectScopeStack = [];
|
|
347
349
|
class EffectScope {
|
|
348
350
|
constructor(detached = false) {
|
|
351
|
+
/**
|
|
352
|
+
* @internal
|
|
353
|
+
*/
|
|
349
354
|
this.active = true;
|
|
355
|
+
/**
|
|
356
|
+
* @internal
|
|
357
|
+
*/
|
|
350
358
|
this.effects = [];
|
|
359
|
+
/**
|
|
360
|
+
* @internal
|
|
361
|
+
*/
|
|
351
362
|
this.cleanups = [];
|
|
352
363
|
if (!detached && activeEffectScope) {
|
|
353
364
|
this.parent = activeEffectScope;
|
|
@@ -357,36 +368,46 @@ class EffectScope {
|
|
|
357
368
|
}
|
|
358
369
|
run(fn) {
|
|
359
370
|
if (this.active) {
|
|
371
|
+
const currentEffectScope = activeEffectScope;
|
|
360
372
|
try {
|
|
361
|
-
this
|
|
373
|
+
activeEffectScope = this;
|
|
362
374
|
return fn();
|
|
363
375
|
}
|
|
364
376
|
finally {
|
|
365
|
-
|
|
377
|
+
activeEffectScope = currentEffectScope;
|
|
366
378
|
}
|
|
367
379
|
}
|
|
368
380
|
else {
|
|
369
381
|
warn(`cannot run an inactive effect scope.`);
|
|
370
382
|
}
|
|
371
383
|
}
|
|
384
|
+
/**
|
|
385
|
+
* This should only be called on non-detached scopes
|
|
386
|
+
* @internal
|
|
387
|
+
*/
|
|
372
388
|
on() {
|
|
373
|
-
|
|
374
|
-
effectScopeStack.push(this);
|
|
375
|
-
activeEffectScope = this;
|
|
376
|
-
}
|
|
389
|
+
activeEffectScope = this;
|
|
377
390
|
}
|
|
391
|
+
/**
|
|
392
|
+
* This should only be called on non-detached scopes
|
|
393
|
+
* @internal
|
|
394
|
+
*/
|
|
378
395
|
off() {
|
|
379
|
-
|
|
380
|
-
effectScopeStack.pop();
|
|
381
|
-
activeEffectScope = effectScopeStack[effectScopeStack.length - 1];
|
|
382
|
-
}
|
|
396
|
+
activeEffectScope = this.parent;
|
|
383
397
|
}
|
|
384
398
|
stop(fromParent) {
|
|
385
399
|
if (this.active) {
|
|
386
|
-
|
|
387
|
-
this.
|
|
400
|
+
let i, l;
|
|
401
|
+
for (i = 0, l = this.effects.length; i < l; i++) {
|
|
402
|
+
this.effects[i].stop();
|
|
403
|
+
}
|
|
404
|
+
for (i = 0, l = this.cleanups.length; i < l; i++) {
|
|
405
|
+
this.cleanups[i]();
|
|
406
|
+
}
|
|
388
407
|
if (this.scopes) {
|
|
389
|
-
this.scopes.
|
|
408
|
+
for (i = 0, l = this.scopes.length; i < l; i++) {
|
|
409
|
+
this.scopes[i].stop(true);
|
|
410
|
+
}
|
|
390
411
|
}
|
|
391
412
|
// nested scope, dereference from parent to avoid memory leaks
|
|
392
413
|
if (this.parent && !fromParent) {
|
|
@@ -404,8 +425,7 @@ class EffectScope {
|
|
|
404
425
|
function effectScope(detached) {
|
|
405
426
|
return new EffectScope(detached);
|
|
406
427
|
}
|
|
407
|
-
function recordEffectScope(effect, scope) {
|
|
408
|
-
scope = scope || activeEffectScope;
|
|
428
|
+
function recordEffectScope(effect, scope = activeEffectScope) {
|
|
409
429
|
if (scope && scope.active) {
|
|
410
430
|
scope.effects.push(effect);
|
|
411
431
|
}
|
|
@@ -468,7 +488,6 @@ let trackOpBit = 1;
|
|
|
468
488
|
* When recursion depth is greater, fall back to using a full cleanup.
|
|
469
489
|
*/
|
|
470
490
|
const maxMarkerBits = 30;
|
|
471
|
-
const effectStack = [];
|
|
472
491
|
let activeEffect;
|
|
473
492
|
const ITERATE_KEY = Symbol('iterate' );
|
|
474
493
|
const MAP_KEY_ITERATE_KEY = Symbol('Map key iterate' );
|
|
@@ -478,35 +497,42 @@ class ReactiveEffect {
|
|
|
478
497
|
this.scheduler = scheduler;
|
|
479
498
|
this.active = true;
|
|
480
499
|
this.deps = [];
|
|
500
|
+
this.parent = undefined;
|
|
481
501
|
recordEffectScope(this, scope);
|
|
482
502
|
}
|
|
483
503
|
run() {
|
|
484
504
|
if (!this.active) {
|
|
485
505
|
return this.fn();
|
|
486
506
|
}
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
if (effectTrackDepth <= maxMarkerBits) {
|
|
493
|
-
initDepMarkers(this);
|
|
494
|
-
}
|
|
495
|
-
else {
|
|
496
|
-
cleanupEffect(this);
|
|
497
|
-
}
|
|
498
|
-
return this.fn();
|
|
507
|
+
let parent = activeEffect;
|
|
508
|
+
let lastShouldTrack = shouldTrack;
|
|
509
|
+
while (parent) {
|
|
510
|
+
if (parent === this) {
|
|
511
|
+
return;
|
|
499
512
|
}
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
513
|
+
parent = parent.parent;
|
|
514
|
+
}
|
|
515
|
+
try {
|
|
516
|
+
this.parent = activeEffect;
|
|
517
|
+
activeEffect = this;
|
|
518
|
+
shouldTrack = true;
|
|
519
|
+
trackOpBit = 1 << ++effectTrackDepth;
|
|
520
|
+
if (effectTrackDepth <= maxMarkerBits) {
|
|
521
|
+
initDepMarkers(this);
|
|
522
|
+
}
|
|
523
|
+
else {
|
|
524
|
+
cleanupEffect(this);
|
|
509
525
|
}
|
|
526
|
+
return this.fn();
|
|
527
|
+
}
|
|
528
|
+
finally {
|
|
529
|
+
if (effectTrackDepth <= maxMarkerBits) {
|
|
530
|
+
finalizeDepMarkers(this);
|
|
531
|
+
}
|
|
532
|
+
trackOpBit = 1 << --effectTrackDepth;
|
|
533
|
+
activeEffect = this.parent;
|
|
534
|
+
shouldTrack = lastShouldTrack;
|
|
535
|
+
this.parent = undefined;
|
|
510
536
|
}
|
|
511
537
|
}
|
|
512
538
|
stop() {
|
|
@@ -554,32 +580,24 @@ function pauseTracking() {
|
|
|
554
580
|
trackStack.push(shouldTrack);
|
|
555
581
|
shouldTrack = false;
|
|
556
582
|
}
|
|
557
|
-
function enableTracking() {
|
|
558
|
-
trackStack.push(shouldTrack);
|
|
559
|
-
shouldTrack = true;
|
|
560
|
-
}
|
|
561
583
|
function resetTracking() {
|
|
562
584
|
const last = trackStack.pop();
|
|
563
585
|
shouldTrack = last === undefined ? true : last;
|
|
564
586
|
}
|
|
565
587
|
function track(target, type, key) {
|
|
566
|
-
if (
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
588
|
+
if (shouldTrack && activeEffect) {
|
|
589
|
+
let depsMap = targetMap.get(target);
|
|
590
|
+
if (!depsMap) {
|
|
591
|
+
targetMap.set(target, (depsMap = new Map()));
|
|
592
|
+
}
|
|
593
|
+
let dep = depsMap.get(key);
|
|
594
|
+
if (!dep) {
|
|
595
|
+
depsMap.set(key, (dep = createDep()));
|
|
596
|
+
}
|
|
597
|
+
const eventInfo = { effect: activeEffect, target, type, key }
|
|
598
|
+
;
|
|
599
|
+
trackEffects(dep, eventInfo);
|
|
576
600
|
}
|
|
577
|
-
const eventInfo = { effect: activeEffect, target, type, key }
|
|
578
|
-
;
|
|
579
|
-
trackEffects(dep, eventInfo);
|
|
580
|
-
}
|
|
581
|
-
function isTracking() {
|
|
582
|
-
return shouldTrack && activeEffect !== undefined;
|
|
583
601
|
}
|
|
584
602
|
function trackEffects(dep, debuggerEventExtraInfo) {
|
|
585
603
|
let shouldTrack = false;
|
|
@@ -597,9 +615,7 @@ function trackEffects(dep, debuggerEventExtraInfo) {
|
|
|
597
615
|
dep.add(activeEffect);
|
|
598
616
|
activeEffect.deps.push(dep);
|
|
599
617
|
if (activeEffect.onTrack) {
|
|
600
|
-
activeEffect.onTrack(Object.assign({
|
|
601
|
-
effect: activeEffect
|
|
602
|
-
}, debuggerEventExtraInfo));
|
|
618
|
+
activeEffect.onTrack(Object.assign({ effect: activeEffect }, debuggerEventExtraInfo));
|
|
603
619
|
}
|
|
604
620
|
}
|
|
605
621
|
}
|
|
@@ -1264,13 +1280,10 @@ const toReactive = (value) => isObject(value) ? reactive(value) : value;
|
|
|
1264
1280
|
const toReadonly = (value) => isObject(value) ? readonly(value) : value;
|
|
1265
1281
|
|
|
1266
1282
|
function trackRefValue(ref) {
|
|
1267
|
-
if (
|
|
1283
|
+
if (shouldTrack && activeEffect) {
|
|
1268
1284
|
ref = toRaw(ref);
|
|
1269
|
-
if (!ref.dep) {
|
|
1270
|
-
ref.dep = createDep();
|
|
1271
|
-
}
|
|
1272
1285
|
{
|
|
1273
|
-
trackEffects(ref.dep, {
|
|
1286
|
+
trackEffects(ref.dep || (ref.dep = createDep()), {
|
|
1274
1287
|
target: ref,
|
|
1275
1288
|
type: "get" /* GET */,
|
|
1276
1289
|
key: 'value'
|
|
@@ -1292,7 +1305,7 @@ function triggerRefValue(ref, newVal) {
|
|
|
1292
1305
|
}
|
|
1293
1306
|
}
|
|
1294
1307
|
function isRef(r) {
|
|
1295
|
-
return
|
|
1308
|
+
return !!(r && r.__v_isRef === true);
|
|
1296
1309
|
}
|
|
1297
1310
|
function ref(value) {
|
|
1298
1311
|
return createRef(value, false);
|
|
@@ -2103,23 +2116,23 @@ const deprecationData = {
|
|
|
2103
2116
|
["GLOBAL_MOUNT" /* GLOBAL_MOUNT */]: {
|
|
2104
2117
|
message: `The global app bootstrapping API has changed: vm.$mount() and the "el" ` +
|
|
2105
2118
|
`option have been removed. Use createApp(RootComponent).mount() instead.`,
|
|
2106
|
-
link: `https://v3.vuejs.org/
|
|
2119
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/global-api.html#mounting-app-instance`
|
|
2107
2120
|
},
|
|
2108
2121
|
["GLOBAL_MOUNT_CONTAINER" /* GLOBAL_MOUNT_CONTAINER */]: {
|
|
2109
2122
|
message: `Vue detected directives on the mount container. ` +
|
|
2110
2123
|
`In Vue 3, the container is no longer considered part of the template ` +
|
|
2111
2124
|
`and will not be processed/replaced.`,
|
|
2112
|
-
link: `https://v3.vuejs.org/
|
|
2125
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/mount-changes.html`
|
|
2113
2126
|
},
|
|
2114
2127
|
["GLOBAL_EXTEND" /* GLOBAL_EXTEND */]: {
|
|
2115
2128
|
message: `Vue.extend() has been removed in Vue 3. ` +
|
|
2116
2129
|
`Use defineComponent() instead.`,
|
|
2117
|
-
link: `https://
|
|
2130
|
+
link: `https://vuejs.org/api/general.html#definecomponent`
|
|
2118
2131
|
},
|
|
2119
2132
|
["GLOBAL_PROTOTYPE" /* GLOBAL_PROTOTYPE */]: {
|
|
2120
2133
|
message: `Vue.prototype is no longer available in Vue 3. ` +
|
|
2121
2134
|
`Use app.config.globalProperties instead.`,
|
|
2122
|
-
link: `https://v3.vuejs.org/
|
|
2135
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/global-api.html#vue-prototype-replaced-by-config-globalproperties`
|
|
2123
2136
|
},
|
|
2124
2137
|
["GLOBAL_SET" /* GLOBAL_SET */]: {
|
|
2125
2138
|
message: `Vue.set() has been removed as it is no longer needed in Vue 3. ` +
|
|
@@ -2132,7 +2145,7 @@ const deprecationData = {
|
|
|
2132
2145
|
["GLOBAL_OBSERVABLE" /* GLOBAL_OBSERVABLE */]: {
|
|
2133
2146
|
message: `Vue.observable() has been removed. ` +
|
|
2134
2147
|
`Use \`import { reactive } from "vue"\` from Composition API instead.`,
|
|
2135
|
-
link: `https://
|
|
2148
|
+
link: `https://vuejs.org/api/reactivity-core.html#reactive`
|
|
2136
2149
|
},
|
|
2137
2150
|
["GLOBAL_PRIVATE_UTIL" /* GLOBAL_PRIVATE_UTIL */]: {
|
|
2138
2151
|
message: `Vue.util has been removed. Please refactor to avoid its usage ` +
|
|
@@ -2151,11 +2164,11 @@ const deprecationData = {
|
|
|
2151
2164
|
["CONFIG_KEY_CODES" /* CONFIG_KEY_CODES */]: {
|
|
2152
2165
|
message: `config.keyCodes has been removed. ` +
|
|
2153
2166
|
`In Vue 3, you can directly use the kebab-case key names as v-on modifiers.`,
|
|
2154
|
-
link: `https://v3.vuejs.org/
|
|
2167
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/keycode-modifiers.html`
|
|
2155
2168
|
},
|
|
2156
2169
|
["CONFIG_PRODUCTION_TIP" /* CONFIG_PRODUCTION_TIP */]: {
|
|
2157
2170
|
message: `config.productionTip has been removed.`,
|
|
2158
|
-
link: `https://v3.vuejs.org/
|
|
2171
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/global-api.html#config-productiontip-removed`
|
|
2159
2172
|
},
|
|
2160
2173
|
["CONFIG_IGNORED_ELEMENTS" /* CONFIG_IGNORED_ELEMENTS */]: {
|
|
2161
2174
|
message: () => {
|
|
@@ -2168,7 +2181,7 @@ const deprecationData = {
|
|
|
2168
2181
|
}
|
|
2169
2182
|
return msg;
|
|
2170
2183
|
},
|
|
2171
|
-
link: `https://v3.vuejs.org/
|
|
2184
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/global-api.html#config-ignoredelements-is-now-config-iscustomelement`
|
|
2172
2185
|
},
|
|
2173
2186
|
["CONFIG_WHITESPACE" /* CONFIG_WHITESPACE */]: {
|
|
2174
2187
|
// this warning is only relevant in the full build when using runtime
|
|
@@ -2191,12 +2204,12 @@ const deprecationData = {
|
|
|
2191
2204
|
},
|
|
2192
2205
|
["INSTANCE_DESTROY" /* INSTANCE_DESTROY */]: {
|
|
2193
2206
|
message: `vm.$destroy() has been removed. Use app.unmount() instead.`,
|
|
2194
|
-
link: `https://
|
|
2207
|
+
link: `https://vuejs.org/api/application.html#app-unmount`
|
|
2195
2208
|
},
|
|
2196
2209
|
["INSTANCE_EVENT_EMITTER" /* INSTANCE_EVENT_EMITTER */]: {
|
|
2197
2210
|
message: `vm.$on/$once/$off() have been removed. ` +
|
|
2198
2211
|
`Use an external event emitter library instead.`,
|
|
2199
|
-
link: `https://v3.vuejs.org/
|
|
2212
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/events-api.html`
|
|
2200
2213
|
},
|
|
2201
2214
|
["INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */]: {
|
|
2202
2215
|
message: event => `"${event}" lifecycle events are no longer supported. From templates, ` +
|
|
@@ -2204,23 +2217,23 @@ const deprecationData = {
|
|
|
2204
2217
|
`should be changed to @vnode-${event.slice(5)}. ` +
|
|
2205
2218
|
`From JavaScript, use Composition API to dynamically register lifecycle ` +
|
|
2206
2219
|
`hooks.`,
|
|
2207
|
-
link: `https://v3.vuejs.org/
|
|
2220
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/vnode-lifecycle-events.html`
|
|
2208
2221
|
},
|
|
2209
2222
|
["INSTANCE_CHILDREN" /* INSTANCE_CHILDREN */]: {
|
|
2210
2223
|
message: `vm.$children has been removed. Consider refactoring your logic ` +
|
|
2211
2224
|
`to avoid relying on direct access to child components.`,
|
|
2212
|
-
link: `https://v3.vuejs.org/
|
|
2225
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/children.html`
|
|
2213
2226
|
},
|
|
2214
2227
|
["INSTANCE_LISTENERS" /* INSTANCE_LISTENERS */]: {
|
|
2215
2228
|
message: `vm.$listeners has been removed. In Vue 3, parent v-on listeners are ` +
|
|
2216
2229
|
`included in vm.$attrs and it is no longer necessary to separately use ` +
|
|
2217
2230
|
`v-on="$listeners" if you are already using v-bind="$attrs". ` +
|
|
2218
2231
|
`(Note: the Vue 3 behavior only applies if this compat config is disabled)`,
|
|
2219
|
-
link: `https://v3.vuejs.org/
|
|
2232
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/listeners-removed.html`
|
|
2220
2233
|
},
|
|
2221
2234
|
["INSTANCE_SCOPED_SLOTS" /* INSTANCE_SCOPED_SLOTS */]: {
|
|
2222
2235
|
message: `vm.$scopedSlots has been removed. Use vm.$slots instead.`,
|
|
2223
|
-
link: `https://v3.vuejs.org/
|
|
2236
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/slots-unification.html`
|
|
2224
2237
|
},
|
|
2225
2238
|
["INSTANCE_ATTRS_CLASS_STYLE" /* INSTANCE_ATTRS_CLASS_STYLE */]: {
|
|
2226
2239
|
message: componentName => `Component <${componentName || 'Anonymous'}> has \`inheritAttrs: false\` but is ` +
|
|
@@ -2231,17 +2244,17 @@ const deprecationData = {
|
|
|
2231
2244
|
`If you are binding $attrs to a non-root element and expecting ` +
|
|
2232
2245
|
`class/style to fallthrough on root, you will need to now manually bind ` +
|
|
2233
2246
|
`them on root via :class="$attrs.class".`,
|
|
2234
|
-
link: `https://v3.vuejs.org/
|
|
2247
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/attrs-includes-class-style.html`
|
|
2235
2248
|
},
|
|
2236
2249
|
["OPTIONS_DATA_FN" /* OPTIONS_DATA_FN */]: {
|
|
2237
2250
|
message: `The "data" option can no longer be a plain object. ` +
|
|
2238
2251
|
`Always use a function.`,
|
|
2239
|
-
link: `https://v3.vuejs.org/
|
|
2252
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/data-option.html`
|
|
2240
2253
|
},
|
|
2241
2254
|
["OPTIONS_DATA_MERGE" /* OPTIONS_DATA_MERGE */]: {
|
|
2242
2255
|
message: (key) => `Detected conflicting key "${key}" when merging data option values. ` +
|
|
2243
2256
|
`In Vue 3, data keys are merged shallowly and will override one another.`,
|
|
2244
|
-
link: `https://v3.vuejs.org/
|
|
2257
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/data-option.html#mixin-merge-behavior-change`
|
|
2245
2258
|
},
|
|
2246
2259
|
["OPTIONS_BEFORE_DESTROY" /* OPTIONS_BEFORE_DESTROY */]: {
|
|
2247
2260
|
message: `\`beforeDestroy\` has been renamed to \`beforeUnmount\`.`
|
|
@@ -2255,23 +2268,23 @@ const deprecationData = {
|
|
|
2255
2268
|
`If current usage is intended, you can disable the compat behavior and ` +
|
|
2256
2269
|
`suppress this warning with:` +
|
|
2257
2270
|
`\n\n configureCompat({ ${"WATCH_ARRAY" /* WATCH_ARRAY */}: false })\n`,
|
|
2258
|
-
link: `https://v3.vuejs.org/
|
|
2271
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/watch.html`
|
|
2259
2272
|
},
|
|
2260
2273
|
["PROPS_DEFAULT_THIS" /* PROPS_DEFAULT_THIS */]: {
|
|
2261
2274
|
message: (key) => `props default value function no longer has access to "this". The compat ` +
|
|
2262
2275
|
`build only offers access to this.$options.` +
|
|
2263
2276
|
`(found in prop "${key}")`,
|
|
2264
|
-
link: `https://v3.vuejs.org/
|
|
2277
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/props-default-this.html`
|
|
2265
2278
|
},
|
|
2266
2279
|
["CUSTOM_DIR" /* CUSTOM_DIR */]: {
|
|
2267
2280
|
message: (legacyHook, newHook) => `Custom directive hook "${legacyHook}" has been removed. ` +
|
|
2268
2281
|
`Use "${newHook}" instead.`,
|
|
2269
|
-
link: `https://v3.vuejs.org/
|
|
2282
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/custom-directives.html`
|
|
2270
2283
|
},
|
|
2271
2284
|
["V_ON_KEYCODE_MODIFIER" /* V_ON_KEYCODE_MODIFIER */]: {
|
|
2272
2285
|
message: `Using keyCode as v-on modifier is no longer supported. ` +
|
|
2273
2286
|
`Use kebab-case key name modifiers instead.`,
|
|
2274
|
-
link: `https://v3.vuejs.org/
|
|
2287
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/keycode-modifiers.html`
|
|
2275
2288
|
},
|
|
2276
2289
|
["ATTR_FALSE_VALUE" /* ATTR_FALSE_VALUE */]: {
|
|
2277
2290
|
message: (name) => `Attribute "${name}" with v-bind value \`false\` will render ` +
|
|
@@ -2279,7 +2292,7 @@ const deprecationData = {
|
|
|
2279
2292
|
`use \`null\` or \`undefined\` instead. If the usage is intended, ` +
|
|
2280
2293
|
`you can disable the compat behavior and suppress this warning with:` +
|
|
2281
2294
|
`\n\n configureCompat({ ${"ATTR_FALSE_VALUE" /* ATTR_FALSE_VALUE */}: false })\n`,
|
|
2282
|
-
link: `https://v3.vuejs.org/
|
|
2295
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/attribute-coercion.html`
|
|
2283
2296
|
},
|
|
2284
2297
|
["ATTR_ENUMERATED_COERCION" /* ATTR_ENUMERATED_COERCION */]: {
|
|
2285
2298
|
message: (name, value, coerced) => `Enumerated attribute "${name}" with v-bind value \`${value}\` will ` +
|
|
@@ -2288,7 +2301,7 @@ const deprecationData = {
|
|
|
2288
2301
|
`If the usage is intended, ` +
|
|
2289
2302
|
`you can disable the compat behavior and suppress this warning with:` +
|
|
2290
2303
|
`\n\n configureCompat({ ${"ATTR_ENUMERATED_COERCION" /* ATTR_ENUMERATED_COERCION */}: false })\n`,
|
|
2291
|
-
link: `https://v3.vuejs.org/
|
|
2304
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/attribute-coercion.html`
|
|
2292
2305
|
},
|
|
2293
2306
|
["TRANSITION_CLASSES" /* TRANSITION_CLASSES */]: {
|
|
2294
2307
|
message: `` // this feature cannot be runtime-detected
|
|
@@ -2299,7 +2312,7 @@ const deprecationData = {
|
|
|
2299
2312
|
`for styling, you can disable the compat behavior and suppress this ` +
|
|
2300
2313
|
`warning with:` +
|
|
2301
2314
|
`\n\n configureCompat({ ${"TRANSITION_GROUP_ROOT" /* TRANSITION_GROUP_ROOT */}: false })\n`,
|
|
2302
|
-
link: `https://v3.vuejs.org/
|
|
2315
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/transition-group.html`
|
|
2303
2316
|
},
|
|
2304
2317
|
["COMPONENT_ASYNC" /* COMPONENT_ASYNC */]: {
|
|
2305
2318
|
message: (comp) => {
|
|
@@ -2312,7 +2325,7 @@ const deprecationData = {
|
|
|
2312
2325
|
`warning with:` +
|
|
2313
2326
|
`\n\n configureCompat({ ${"COMPONENT_ASYNC" /* COMPONENT_ASYNC */}: false })\n`);
|
|
2314
2327
|
},
|
|
2315
|
-
link: `https://v3.vuejs.org/
|
|
2328
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/async-components.html`
|
|
2316
2329
|
},
|
|
2317
2330
|
["COMPONENT_FUNCTIONAL" /* COMPONENT_FUNCTIONAL */]: {
|
|
2318
2331
|
message: (comp) => {
|
|
@@ -2323,7 +2336,7 @@ const deprecationData = {
|
|
|
2323
2336
|
`components usage have been migrated and its compat behavior has ` +
|
|
2324
2337
|
`been disabled.`);
|
|
2325
2338
|
},
|
|
2326
|
-
link: `https://v3.vuejs.org/
|
|
2339
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/functional-components.html`
|
|
2327
2340
|
},
|
|
2328
2341
|
["COMPONENT_V_MODEL" /* COMPONENT_V_MODEL */]: {
|
|
2329
2342
|
message: (comp) => {
|
|
@@ -2340,20 +2353,20 @@ const deprecationData = {
|
|
|
2340
2353
|
`to work with v-model should now use the "modelValue" prop and emit the ` +
|
|
2341
2354
|
`"update:modelValue" event. You can update the usage and then ${configMsg}`);
|
|
2342
2355
|
},
|
|
2343
|
-
link: `https://v3.vuejs.org/
|
|
2356
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html`
|
|
2344
2357
|
},
|
|
2345
2358
|
["RENDER_FUNCTION" /* RENDER_FUNCTION */]: {
|
|
2346
2359
|
message: `Vue 3's render function API has changed. ` +
|
|
2347
2360
|
`You can opt-in to the new API with:` +
|
|
2348
2361
|
`\n\n configureCompat({ ${"RENDER_FUNCTION" /* RENDER_FUNCTION */}: false })\n` +
|
|
2349
2362
|
`\n (This can also be done per-component via the "compatConfig" option.)`,
|
|
2350
|
-
link: `https://v3.vuejs.org/
|
|
2363
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/render-function-api.html`
|
|
2351
2364
|
},
|
|
2352
2365
|
["FILTERS" /* FILTERS */]: {
|
|
2353
2366
|
message: `filters have been removed in Vue 3. ` +
|
|
2354
2367
|
`The "|" symbol will be treated as native JavaScript bitwise OR operator. ` +
|
|
2355
2368
|
`Use method calls or computed properties instead.`,
|
|
2356
|
-
link: `https://v3.vuejs.org/
|
|
2369
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/filters.html`
|
|
2357
2370
|
},
|
|
2358
2371
|
["PRIVATE_APIS" /* PRIVATE_APIS */]: {
|
|
2359
2372
|
message: name => `"${name}" is a Vue 2 private API that no longer exists in Vue 3. ` +
|
|
@@ -2421,7 +2434,7 @@ function validateCompatConfig(config, instance) {
|
|
|
2421
2434
|
warn$1(`Deprecation config "${key}" is compiler-specific and you are ` +
|
|
2422
2435
|
`running a runtime-only build of Vue. This deprecation should be ` +
|
|
2423
2436
|
`configured via compiler options in your build setup instead.\n` +
|
|
2424
|
-
`Details: https://v3.vuejs.org/
|
|
2437
|
+
`Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`);
|
|
2425
2438
|
}
|
|
2426
2439
|
}
|
|
2427
2440
|
else {
|
|
@@ -3635,12 +3648,10 @@ function watchEffect(effect, options) {
|
|
|
3635
3648
|
return doWatch(effect, null, options);
|
|
3636
3649
|
}
|
|
3637
3650
|
function watchPostEffect(effect, options) {
|
|
3638
|
-
return doWatch(effect, null, (Object.assign(
|
|
3639
|
-
));
|
|
3651
|
+
return doWatch(effect, null, (Object.assign(Object.assign({}, options), { flush: 'post' }) ));
|
|
3640
3652
|
}
|
|
3641
3653
|
function watchSyncEffect(effect, options) {
|
|
3642
|
-
return doWatch(effect, null, (Object.assign(
|
|
3643
|
-
));
|
|
3654
|
+
return doWatch(effect, null, (Object.assign(Object.assign({}, options), { flush: 'sync' }) ));
|
|
3644
3655
|
}
|
|
3645
3656
|
// initial value for watchers to trigger on undefined initial values
|
|
3646
3657
|
const INITIAL_WATCHER_VALUE = {};
|
|
@@ -3950,7 +3961,9 @@ const BaseTransitionImpl = {
|
|
|
3950
3961
|
const { mode } = rawProps;
|
|
3951
3962
|
// check mode
|
|
3952
3963
|
if (mode &&
|
|
3953
|
-
mode !== 'in-out' &&
|
|
3964
|
+
mode !== 'in-out' &&
|
|
3965
|
+
mode !== 'out-in' &&
|
|
3966
|
+
mode !== 'default') {
|
|
3954
3967
|
warn$1(`invalid <transition> mode: ${mode}`);
|
|
3955
3968
|
}
|
|
3956
3969
|
// at this point children has a guaranteed length of 1.
|
|
@@ -4180,20 +4193,24 @@ function setTransitionHooks(vnode, hooks) {
|
|
|
4180
4193
|
vnode.transition = hooks;
|
|
4181
4194
|
}
|
|
4182
4195
|
}
|
|
4183
|
-
function getTransitionRawChildren(children, keepComment = false) {
|
|
4196
|
+
function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
4184
4197
|
let ret = [];
|
|
4185
4198
|
let keyedFragmentCount = 0;
|
|
4186
4199
|
for (let i = 0; i < children.length; i++) {
|
|
4187
|
-
|
|
4200
|
+
let child = children[i];
|
|
4201
|
+
// #5360 inherit parent key in case of <template v-for>
|
|
4202
|
+
const key = parentKey == null
|
|
4203
|
+
? child.key
|
|
4204
|
+
: String(parentKey) + String(child.key != null ? child.key : i);
|
|
4188
4205
|
// handle fragment children case, e.g. v-for
|
|
4189
4206
|
if (child.type === Fragment) {
|
|
4190
4207
|
if (child.patchFlag & 128 /* KEYED_FRAGMENT */)
|
|
4191
4208
|
keyedFragmentCount++;
|
|
4192
|
-
ret = ret.concat(getTransitionRawChildren(child.children, keepComment));
|
|
4209
|
+
ret = ret.concat(getTransitionRawChildren(child.children, keepComment, key));
|
|
4193
4210
|
}
|
|
4194
4211
|
// comment placeholders should be skipped, e.g. v-if
|
|
4195
4212
|
else if (keepComment || child.type !== Comment) {
|
|
4196
|
-
ret.push(child);
|
|
4213
|
+
ret.push(key != null ? cloneVNode(child, { key }) : child);
|
|
4197
4214
|
}
|
|
4198
4215
|
}
|
|
4199
4216
|
// #1126 if a transition children list contains multiple sub fragments, these
|
|
@@ -5251,6 +5268,10 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
|
|
|
5251
5268
|
const propsToUpdate = instance.vnode.dynamicProps;
|
|
5252
5269
|
for (let i = 0; i < propsToUpdate.length; i++) {
|
|
5253
5270
|
let key = propsToUpdate[i];
|
|
5271
|
+
// skip if the prop key is a declared emit event listener
|
|
5272
|
+
if (isEmitListener(instance.emitsOptions, key)) {
|
|
5273
|
+
continue;
|
|
5274
|
+
}
|
|
5254
5275
|
// PROPS flag guarantees rawProps to be non-null
|
|
5255
5276
|
const value = rawProps[key];
|
|
5256
5277
|
if (options) {
|
|
@@ -5822,7 +5843,6 @@ return withDirectives(h(comp), [
|
|
|
5822
5843
|
[bar, this.y]
|
|
5823
5844
|
])
|
|
5824
5845
|
*/
|
|
5825
|
-
const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo');
|
|
5826
5846
|
function validateDirectiveName(name) {
|
|
5827
5847
|
if (isBuiltInDirective(name)) {
|
|
5828
5848
|
warn$1('Do not use built-in directive ids as custom directive id: ' + name);
|
|
@@ -5837,7 +5857,8 @@ function withDirectives(vnode, directives) {
|
|
|
5837
5857
|
warn$1(`withDirectives can only be used inside render functions.`);
|
|
5838
5858
|
return vnode;
|
|
5839
5859
|
}
|
|
5840
|
-
const instance = internalInstance
|
|
5860
|
+
const instance = getExposeProxy(internalInstance) ||
|
|
5861
|
+
internalInstance.proxy;
|
|
5841
5862
|
const bindings = vnode.dirs || (vnode.dirs = []);
|
|
5842
5863
|
for (let i = 0; i < directives.length; i++) {
|
|
5843
5864
|
let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];
|
|
@@ -5957,7 +5978,7 @@ function createCompatVue(createApp, createSingletonApp) {
|
|
|
5957
5978
|
return vm;
|
|
5958
5979
|
}
|
|
5959
5980
|
}
|
|
5960
|
-
Vue.version = `2.6.14-compat:${"3.2.
|
|
5981
|
+
Vue.version = `2.6.14-compat:${"3.2.32"}`;
|
|
5961
5982
|
Vue.config = singletonApp.config;
|
|
5962
5983
|
Vue.use = (p, ...options) => {
|
|
5963
5984
|
if (p && isFunction(p.install)) {
|
|
@@ -6384,6 +6405,9 @@ function createAppContext() {
|
|
|
6384
6405
|
let uid = 0;
|
|
6385
6406
|
function createAppAPI(render, hydrate) {
|
|
6386
6407
|
return function createApp(rootComponent, rootProps = null) {
|
|
6408
|
+
if (!isFunction(rootComponent)) {
|
|
6409
|
+
rootComponent = Object.assign({}, rootComponent);
|
|
6410
|
+
}
|
|
6387
6411
|
if (rootProps != null && !isObject(rootProps)) {
|
|
6388
6412
|
warn$1(`root props passed to app.mount() must be an object.`);
|
|
6389
6413
|
rootProps = null;
|
|
@@ -6583,6 +6607,9 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
6583
6607
|
if (!isArray(existing)) {
|
|
6584
6608
|
if (_isString) {
|
|
6585
6609
|
refs[ref] = [refValue];
|
|
6610
|
+
if (hasOwn(setupState, ref)) {
|
|
6611
|
+
setupState[ref] = refs[ref];
|
|
6612
|
+
}
|
|
6586
6613
|
}
|
|
6587
6614
|
else {
|
|
6588
6615
|
ref.value = [refValue];
|
|
@@ -6781,7 +6808,8 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
6781
6808
|
// e.g. <option :value="obj">, <input type="checkbox" :true-value="1">
|
|
6782
6809
|
const forcePatchValue = (type === 'input' && dirs) || type === 'option';
|
|
6783
6810
|
// skip props & children if this is hoisted static nodes
|
|
6784
|
-
|
|
6811
|
+
// #5405 in dev, always hydrate children for HMR
|
|
6812
|
+
{
|
|
6785
6813
|
if (dirs) {
|
|
6786
6814
|
invokeDirectiveHook(vnode, null, parentComponent, 'created');
|
|
6787
6815
|
}
|
|
@@ -6954,7 +6982,7 @@ function startMeasure(instance, type) {
|
|
|
6954
6982
|
perf.mark(`vue-${type}-${instance.uid}`);
|
|
6955
6983
|
}
|
|
6956
6984
|
{
|
|
6957
|
-
devtoolsPerfStart(instance, type,
|
|
6985
|
+
devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now());
|
|
6958
6986
|
}
|
|
6959
6987
|
}
|
|
6960
6988
|
function endMeasure(instance, type) {
|
|
@@ -6967,7 +6995,7 @@ function endMeasure(instance, type) {
|
|
|
6967
6995
|
perf.clearMarks(endTag);
|
|
6968
6996
|
}
|
|
6969
6997
|
{
|
|
6970
|
-
devtoolsPerfEnd(instance, type,
|
|
6998
|
+
devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now());
|
|
6971
6999
|
}
|
|
6972
7000
|
}
|
|
6973
7001
|
function isSupported() {
|
|
@@ -9935,9 +9963,11 @@ const PublicInstanceProxyHandlers = {
|
|
|
9935
9963
|
const { data, setupState, ctx } = instance;
|
|
9936
9964
|
if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) {
|
|
9937
9965
|
setupState[key] = value;
|
|
9966
|
+
return true;
|
|
9938
9967
|
}
|
|
9939
9968
|
else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
|
|
9940
9969
|
data[key] = value;
|
|
9970
|
+
return true;
|
|
9941
9971
|
}
|
|
9942
9972
|
else if (hasOwn(instance.props, key)) {
|
|
9943
9973
|
warn$1(`Attempting to mutate prop "${key}". Props are readonly.`, instance);
|
|
@@ -9971,6 +10001,16 @@ const PublicInstanceProxyHandlers = {
|
|
|
9971
10001
|
hasOwn(ctx, key) ||
|
|
9972
10002
|
hasOwn(publicPropertiesMap, key) ||
|
|
9973
10003
|
hasOwn(appContext.config.globalProperties, key));
|
|
10004
|
+
},
|
|
10005
|
+
defineProperty(target, key, descriptor) {
|
|
10006
|
+
if (descriptor.get != null) {
|
|
10007
|
+
// invalidate key cache of a getter based property #5417
|
|
10008
|
+
target.$.accessCache[key] = 0;
|
|
10009
|
+
}
|
|
10010
|
+
else if (hasOwn(descriptor, 'value')) {
|
|
10011
|
+
this.set(target, key, descriptor.value, null);
|
|
10012
|
+
}
|
|
10013
|
+
return Reflect.defineProperty(target, key, descriptor);
|
|
9974
10014
|
}
|
|
9975
10015
|
};
|
|
9976
10016
|
{
|
|
@@ -10861,7 +10901,7 @@ function isMemoSame(cached, memo) {
|
|
|
10861
10901
|
}
|
|
10862
10902
|
|
|
10863
10903
|
// Core API ------------------------------------------------------------------
|
|
10864
|
-
const version = "3.2.
|
|
10904
|
+
const version = "3.2.32";
|
|
10865
10905
|
/**
|
|
10866
10906
|
* SSR utils for \@vue/server-renderer. Only exposed in cjs builds.
|
|
10867
10907
|
* @internal
|