@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
|
@@ -201,13 +201,15 @@ var Vue = (function () {
|
|
|
201
201
|
* @private
|
|
202
202
|
*/
|
|
203
203
|
const toDisplayString = (val) => {
|
|
204
|
-
return val
|
|
205
|
-
?
|
|
206
|
-
:
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
204
|
+
return isString(val)
|
|
205
|
+
? val
|
|
206
|
+
: val == null
|
|
207
|
+
? ''
|
|
208
|
+
: isArray(val) ||
|
|
209
|
+
(isObject(val) &&
|
|
210
|
+
(val.toString === objectToString || !isFunction(val.toString)))
|
|
211
|
+
? JSON.stringify(val, replacer, 2)
|
|
212
|
+
: String(val);
|
|
211
213
|
};
|
|
212
214
|
const replacer = (_key, val) => {
|
|
213
215
|
// can't use isRef here since @vue/shared has no deps
|
|
@@ -281,6 +283,7 @@ var Vue = (function () {
|
|
|
281
283
|
'onVnodeBeforeMount,onVnodeMounted,' +
|
|
282
284
|
'onVnodeBeforeUpdate,onVnodeUpdated,' +
|
|
283
285
|
'onVnodeBeforeUnmount,onVnodeUnmounted');
|
|
286
|
+
const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo');
|
|
284
287
|
const cacheStringFunction = (fn) => {
|
|
285
288
|
const cache = Object.create(null);
|
|
286
289
|
return ((str) => {
|
|
@@ -346,11 +349,19 @@ var Vue = (function () {
|
|
|
346
349
|
}
|
|
347
350
|
|
|
348
351
|
let activeEffectScope;
|
|
349
|
-
const effectScopeStack = [];
|
|
350
352
|
class EffectScope {
|
|
351
353
|
constructor(detached = false) {
|
|
354
|
+
/**
|
|
355
|
+
* @internal
|
|
356
|
+
*/
|
|
352
357
|
this.active = true;
|
|
358
|
+
/**
|
|
359
|
+
* @internal
|
|
360
|
+
*/
|
|
353
361
|
this.effects = [];
|
|
362
|
+
/**
|
|
363
|
+
* @internal
|
|
364
|
+
*/
|
|
354
365
|
this.cleanups = [];
|
|
355
366
|
if (!detached && activeEffectScope) {
|
|
356
367
|
this.parent = activeEffectScope;
|
|
@@ -360,36 +371,46 @@ var Vue = (function () {
|
|
|
360
371
|
}
|
|
361
372
|
run(fn) {
|
|
362
373
|
if (this.active) {
|
|
374
|
+
const currentEffectScope = activeEffectScope;
|
|
363
375
|
try {
|
|
364
|
-
this
|
|
376
|
+
activeEffectScope = this;
|
|
365
377
|
return fn();
|
|
366
378
|
}
|
|
367
379
|
finally {
|
|
368
|
-
|
|
380
|
+
activeEffectScope = currentEffectScope;
|
|
369
381
|
}
|
|
370
382
|
}
|
|
371
383
|
else {
|
|
372
384
|
warn(`cannot run an inactive effect scope.`);
|
|
373
385
|
}
|
|
374
386
|
}
|
|
387
|
+
/**
|
|
388
|
+
* This should only be called on non-detached scopes
|
|
389
|
+
* @internal
|
|
390
|
+
*/
|
|
375
391
|
on() {
|
|
376
|
-
|
|
377
|
-
effectScopeStack.push(this);
|
|
378
|
-
activeEffectScope = this;
|
|
379
|
-
}
|
|
392
|
+
activeEffectScope = this;
|
|
380
393
|
}
|
|
394
|
+
/**
|
|
395
|
+
* This should only be called on non-detached scopes
|
|
396
|
+
* @internal
|
|
397
|
+
*/
|
|
381
398
|
off() {
|
|
382
|
-
|
|
383
|
-
effectScopeStack.pop();
|
|
384
|
-
activeEffectScope = effectScopeStack[effectScopeStack.length - 1];
|
|
385
|
-
}
|
|
399
|
+
activeEffectScope = this.parent;
|
|
386
400
|
}
|
|
387
401
|
stop(fromParent) {
|
|
388
402
|
if (this.active) {
|
|
389
|
-
|
|
390
|
-
this.
|
|
403
|
+
let i, l;
|
|
404
|
+
for (i = 0, l = this.effects.length; i < l; i++) {
|
|
405
|
+
this.effects[i].stop();
|
|
406
|
+
}
|
|
407
|
+
for (i = 0, l = this.cleanups.length; i < l; i++) {
|
|
408
|
+
this.cleanups[i]();
|
|
409
|
+
}
|
|
391
410
|
if (this.scopes) {
|
|
392
|
-
this.scopes.
|
|
411
|
+
for (i = 0, l = this.scopes.length; i < l; i++) {
|
|
412
|
+
this.scopes[i].stop(true);
|
|
413
|
+
}
|
|
393
414
|
}
|
|
394
415
|
// nested scope, dereference from parent to avoid memory leaks
|
|
395
416
|
if (this.parent && !fromParent) {
|
|
@@ -407,8 +428,7 @@ var Vue = (function () {
|
|
|
407
428
|
function effectScope(detached) {
|
|
408
429
|
return new EffectScope(detached);
|
|
409
430
|
}
|
|
410
|
-
function recordEffectScope(effect, scope) {
|
|
411
|
-
scope = scope || activeEffectScope;
|
|
431
|
+
function recordEffectScope(effect, scope = activeEffectScope) {
|
|
412
432
|
if (scope && scope.active) {
|
|
413
433
|
scope.effects.push(effect);
|
|
414
434
|
}
|
|
@@ -471,7 +491,6 @@ var Vue = (function () {
|
|
|
471
491
|
* When recursion depth is greater, fall back to using a full cleanup.
|
|
472
492
|
*/
|
|
473
493
|
const maxMarkerBits = 30;
|
|
474
|
-
const effectStack = [];
|
|
475
494
|
let activeEffect;
|
|
476
495
|
const ITERATE_KEY = Symbol('iterate' );
|
|
477
496
|
const MAP_KEY_ITERATE_KEY = Symbol('Map key iterate' );
|
|
@@ -481,35 +500,42 @@ var Vue = (function () {
|
|
|
481
500
|
this.scheduler = scheduler;
|
|
482
501
|
this.active = true;
|
|
483
502
|
this.deps = [];
|
|
503
|
+
this.parent = undefined;
|
|
484
504
|
recordEffectScope(this, scope);
|
|
485
505
|
}
|
|
486
506
|
run() {
|
|
487
507
|
if (!this.active) {
|
|
488
508
|
return this.fn();
|
|
489
509
|
}
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
if (effectTrackDepth <= maxMarkerBits) {
|
|
496
|
-
initDepMarkers(this);
|
|
497
|
-
}
|
|
498
|
-
else {
|
|
499
|
-
cleanupEffect(this);
|
|
500
|
-
}
|
|
501
|
-
return this.fn();
|
|
510
|
+
let parent = activeEffect;
|
|
511
|
+
let lastShouldTrack = shouldTrack;
|
|
512
|
+
while (parent) {
|
|
513
|
+
if (parent === this) {
|
|
514
|
+
return;
|
|
502
515
|
}
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
516
|
+
parent = parent.parent;
|
|
517
|
+
}
|
|
518
|
+
try {
|
|
519
|
+
this.parent = activeEffect;
|
|
520
|
+
activeEffect = this;
|
|
521
|
+
shouldTrack = true;
|
|
522
|
+
trackOpBit = 1 << ++effectTrackDepth;
|
|
523
|
+
if (effectTrackDepth <= maxMarkerBits) {
|
|
524
|
+
initDepMarkers(this);
|
|
525
|
+
}
|
|
526
|
+
else {
|
|
527
|
+
cleanupEffect(this);
|
|
512
528
|
}
|
|
529
|
+
return this.fn();
|
|
530
|
+
}
|
|
531
|
+
finally {
|
|
532
|
+
if (effectTrackDepth <= maxMarkerBits) {
|
|
533
|
+
finalizeDepMarkers(this);
|
|
534
|
+
}
|
|
535
|
+
trackOpBit = 1 << --effectTrackDepth;
|
|
536
|
+
activeEffect = this.parent;
|
|
537
|
+
shouldTrack = lastShouldTrack;
|
|
538
|
+
this.parent = undefined;
|
|
513
539
|
}
|
|
514
540
|
}
|
|
515
541
|
stop() {
|
|
@@ -557,32 +583,24 @@ var Vue = (function () {
|
|
|
557
583
|
trackStack.push(shouldTrack);
|
|
558
584
|
shouldTrack = false;
|
|
559
585
|
}
|
|
560
|
-
function enableTracking() {
|
|
561
|
-
trackStack.push(shouldTrack);
|
|
562
|
-
shouldTrack = true;
|
|
563
|
-
}
|
|
564
586
|
function resetTracking() {
|
|
565
587
|
const last = trackStack.pop();
|
|
566
588
|
shouldTrack = last === undefined ? true : last;
|
|
567
589
|
}
|
|
568
590
|
function track(target, type, key) {
|
|
569
|
-
if (
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
591
|
+
if (shouldTrack && activeEffect) {
|
|
592
|
+
let depsMap = targetMap.get(target);
|
|
593
|
+
if (!depsMap) {
|
|
594
|
+
targetMap.set(target, (depsMap = new Map()));
|
|
595
|
+
}
|
|
596
|
+
let dep = depsMap.get(key);
|
|
597
|
+
if (!dep) {
|
|
598
|
+
depsMap.set(key, (dep = createDep()));
|
|
599
|
+
}
|
|
600
|
+
const eventInfo = { effect: activeEffect, target, type, key }
|
|
601
|
+
;
|
|
602
|
+
trackEffects(dep, eventInfo);
|
|
579
603
|
}
|
|
580
|
-
const eventInfo = { effect: activeEffect, target, type, key }
|
|
581
|
-
;
|
|
582
|
-
trackEffects(dep, eventInfo);
|
|
583
|
-
}
|
|
584
|
-
function isTracking() {
|
|
585
|
-
return shouldTrack && activeEffect !== undefined;
|
|
586
604
|
}
|
|
587
605
|
function trackEffects(dep, debuggerEventExtraInfo) {
|
|
588
606
|
let shouldTrack = false;
|
|
@@ -600,9 +618,7 @@ var Vue = (function () {
|
|
|
600
618
|
dep.add(activeEffect);
|
|
601
619
|
activeEffect.deps.push(dep);
|
|
602
620
|
if (activeEffect.onTrack) {
|
|
603
|
-
activeEffect.onTrack(Object.assign({
|
|
604
|
-
effect: activeEffect
|
|
605
|
-
}, debuggerEventExtraInfo));
|
|
621
|
+
activeEffect.onTrack(Object.assign({ effect: activeEffect }, debuggerEventExtraInfo));
|
|
606
622
|
}
|
|
607
623
|
}
|
|
608
624
|
}
|
|
@@ -1267,13 +1283,10 @@ var Vue = (function () {
|
|
|
1267
1283
|
const toReadonly = (value) => isObject(value) ? readonly(value) : value;
|
|
1268
1284
|
|
|
1269
1285
|
function trackRefValue(ref) {
|
|
1270
|
-
if (
|
|
1286
|
+
if (shouldTrack && activeEffect) {
|
|
1271
1287
|
ref = toRaw(ref);
|
|
1272
|
-
if (!ref.dep) {
|
|
1273
|
-
ref.dep = createDep();
|
|
1274
|
-
}
|
|
1275
1288
|
{
|
|
1276
|
-
trackEffects(ref.dep, {
|
|
1289
|
+
trackEffects(ref.dep || (ref.dep = createDep()), {
|
|
1277
1290
|
target: ref,
|
|
1278
1291
|
type: "get" /* GET */,
|
|
1279
1292
|
key: 'value'
|
|
@@ -1295,7 +1308,7 @@ var Vue = (function () {
|
|
|
1295
1308
|
}
|
|
1296
1309
|
}
|
|
1297
1310
|
function isRef(r) {
|
|
1298
|
-
return
|
|
1311
|
+
return !!(r && r.__v_isRef === true);
|
|
1299
1312
|
}
|
|
1300
1313
|
function ref(value) {
|
|
1301
1314
|
return createRef(value, false);
|
|
@@ -2106,23 +2119,23 @@ var Vue = (function () {
|
|
|
2106
2119
|
["GLOBAL_MOUNT" /* GLOBAL_MOUNT */]: {
|
|
2107
2120
|
message: `The global app bootstrapping API has changed: vm.$mount() and the "el" ` +
|
|
2108
2121
|
`option have been removed. Use createApp(RootComponent).mount() instead.`,
|
|
2109
|
-
link: `https://v3.vuejs.org/
|
|
2122
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/global-api.html#mounting-app-instance`
|
|
2110
2123
|
},
|
|
2111
2124
|
["GLOBAL_MOUNT_CONTAINER" /* GLOBAL_MOUNT_CONTAINER */]: {
|
|
2112
2125
|
message: `Vue detected directives on the mount container. ` +
|
|
2113
2126
|
`In Vue 3, the container is no longer considered part of the template ` +
|
|
2114
2127
|
`and will not be processed/replaced.`,
|
|
2115
|
-
link: `https://v3.vuejs.org/
|
|
2128
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/mount-changes.html`
|
|
2116
2129
|
},
|
|
2117
2130
|
["GLOBAL_EXTEND" /* GLOBAL_EXTEND */]: {
|
|
2118
2131
|
message: `Vue.extend() has been removed in Vue 3. ` +
|
|
2119
2132
|
`Use defineComponent() instead.`,
|
|
2120
|
-
link: `https://
|
|
2133
|
+
link: `https://vuejs.org/api/general.html#definecomponent`
|
|
2121
2134
|
},
|
|
2122
2135
|
["GLOBAL_PROTOTYPE" /* GLOBAL_PROTOTYPE */]: {
|
|
2123
2136
|
message: `Vue.prototype is no longer available in Vue 3. ` +
|
|
2124
2137
|
`Use app.config.globalProperties instead.`,
|
|
2125
|
-
link: `https://v3.vuejs.org/
|
|
2138
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/global-api.html#vue-prototype-replaced-by-config-globalproperties`
|
|
2126
2139
|
},
|
|
2127
2140
|
["GLOBAL_SET" /* GLOBAL_SET */]: {
|
|
2128
2141
|
message: `Vue.set() has been removed as it is no longer needed in Vue 3. ` +
|
|
@@ -2135,7 +2148,7 @@ var Vue = (function () {
|
|
|
2135
2148
|
["GLOBAL_OBSERVABLE" /* GLOBAL_OBSERVABLE */]: {
|
|
2136
2149
|
message: `Vue.observable() has been removed. ` +
|
|
2137
2150
|
`Use \`import { reactive } from "vue"\` from Composition API instead.`,
|
|
2138
|
-
link: `https://
|
|
2151
|
+
link: `https://vuejs.org/api/reactivity-core.html#reactive`
|
|
2139
2152
|
},
|
|
2140
2153
|
["GLOBAL_PRIVATE_UTIL" /* GLOBAL_PRIVATE_UTIL */]: {
|
|
2141
2154
|
message: `Vue.util has been removed. Please refactor to avoid its usage ` +
|
|
@@ -2154,11 +2167,11 @@ var Vue = (function () {
|
|
|
2154
2167
|
["CONFIG_KEY_CODES" /* CONFIG_KEY_CODES */]: {
|
|
2155
2168
|
message: `config.keyCodes has been removed. ` +
|
|
2156
2169
|
`In Vue 3, you can directly use the kebab-case key names as v-on modifiers.`,
|
|
2157
|
-
link: `https://v3.vuejs.org/
|
|
2170
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/keycode-modifiers.html`
|
|
2158
2171
|
},
|
|
2159
2172
|
["CONFIG_PRODUCTION_TIP" /* CONFIG_PRODUCTION_TIP */]: {
|
|
2160
2173
|
message: `config.productionTip has been removed.`,
|
|
2161
|
-
link: `https://v3.vuejs.org/
|
|
2174
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/global-api.html#config-productiontip-removed`
|
|
2162
2175
|
},
|
|
2163
2176
|
["CONFIG_IGNORED_ELEMENTS" /* CONFIG_IGNORED_ELEMENTS */]: {
|
|
2164
2177
|
message: () => {
|
|
@@ -2171,7 +2184,7 @@ var Vue = (function () {
|
|
|
2171
2184
|
}
|
|
2172
2185
|
return msg;
|
|
2173
2186
|
},
|
|
2174
|
-
link: `https://v3.vuejs.org/
|
|
2187
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/global-api.html#config-ignoredelements-is-now-config-iscustomelement`
|
|
2175
2188
|
},
|
|
2176
2189
|
["CONFIG_WHITESPACE" /* CONFIG_WHITESPACE */]: {
|
|
2177
2190
|
// this warning is only relevant in the full build when using runtime
|
|
@@ -2194,12 +2207,12 @@ var Vue = (function () {
|
|
|
2194
2207
|
},
|
|
2195
2208
|
["INSTANCE_DESTROY" /* INSTANCE_DESTROY */]: {
|
|
2196
2209
|
message: `vm.$destroy() has been removed. Use app.unmount() instead.`,
|
|
2197
|
-
link: `https://
|
|
2210
|
+
link: `https://vuejs.org/api/application.html#app-unmount`
|
|
2198
2211
|
},
|
|
2199
2212
|
["INSTANCE_EVENT_EMITTER" /* INSTANCE_EVENT_EMITTER */]: {
|
|
2200
2213
|
message: `vm.$on/$once/$off() have been removed. ` +
|
|
2201
2214
|
`Use an external event emitter library instead.`,
|
|
2202
|
-
link: `https://v3.vuejs.org/
|
|
2215
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/events-api.html`
|
|
2203
2216
|
},
|
|
2204
2217
|
["INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */]: {
|
|
2205
2218
|
message: event => `"${event}" lifecycle events are no longer supported. From templates, ` +
|
|
@@ -2207,23 +2220,23 @@ var Vue = (function () {
|
|
|
2207
2220
|
`should be changed to @vnode-${event.slice(5)}. ` +
|
|
2208
2221
|
`From JavaScript, use Composition API to dynamically register lifecycle ` +
|
|
2209
2222
|
`hooks.`,
|
|
2210
|
-
link: `https://v3.vuejs.org/
|
|
2223
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/vnode-lifecycle-events.html`
|
|
2211
2224
|
},
|
|
2212
2225
|
["INSTANCE_CHILDREN" /* INSTANCE_CHILDREN */]: {
|
|
2213
2226
|
message: `vm.$children has been removed. Consider refactoring your logic ` +
|
|
2214
2227
|
`to avoid relying on direct access to child components.`,
|
|
2215
|
-
link: `https://v3.vuejs.org/
|
|
2228
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/children.html`
|
|
2216
2229
|
},
|
|
2217
2230
|
["INSTANCE_LISTENERS" /* INSTANCE_LISTENERS */]: {
|
|
2218
2231
|
message: `vm.$listeners has been removed. In Vue 3, parent v-on listeners are ` +
|
|
2219
2232
|
`included in vm.$attrs and it is no longer necessary to separately use ` +
|
|
2220
2233
|
`v-on="$listeners" if you are already using v-bind="$attrs". ` +
|
|
2221
2234
|
`(Note: the Vue 3 behavior only applies if this compat config is disabled)`,
|
|
2222
|
-
link: `https://v3.vuejs.org/
|
|
2235
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/listeners-removed.html`
|
|
2223
2236
|
},
|
|
2224
2237
|
["INSTANCE_SCOPED_SLOTS" /* INSTANCE_SCOPED_SLOTS */]: {
|
|
2225
2238
|
message: `vm.$scopedSlots has been removed. Use vm.$slots instead.`,
|
|
2226
|
-
link: `https://v3.vuejs.org/
|
|
2239
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/slots-unification.html`
|
|
2227
2240
|
},
|
|
2228
2241
|
["INSTANCE_ATTRS_CLASS_STYLE" /* INSTANCE_ATTRS_CLASS_STYLE */]: {
|
|
2229
2242
|
message: componentName => `Component <${componentName || 'Anonymous'}> has \`inheritAttrs: false\` but is ` +
|
|
@@ -2234,17 +2247,17 @@ var Vue = (function () {
|
|
|
2234
2247
|
`If you are binding $attrs to a non-root element and expecting ` +
|
|
2235
2248
|
`class/style to fallthrough on root, you will need to now manually bind ` +
|
|
2236
2249
|
`them on root via :class="$attrs.class".`,
|
|
2237
|
-
link: `https://v3.vuejs.org/
|
|
2250
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/attrs-includes-class-style.html`
|
|
2238
2251
|
},
|
|
2239
2252
|
["OPTIONS_DATA_FN" /* OPTIONS_DATA_FN */]: {
|
|
2240
2253
|
message: `The "data" option can no longer be a plain object. ` +
|
|
2241
2254
|
`Always use a function.`,
|
|
2242
|
-
link: `https://v3.vuejs.org/
|
|
2255
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/data-option.html`
|
|
2243
2256
|
},
|
|
2244
2257
|
["OPTIONS_DATA_MERGE" /* OPTIONS_DATA_MERGE */]: {
|
|
2245
2258
|
message: (key) => `Detected conflicting key "${key}" when merging data option values. ` +
|
|
2246
2259
|
`In Vue 3, data keys are merged shallowly and will override one another.`,
|
|
2247
|
-
link: `https://v3.vuejs.org/
|
|
2260
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/data-option.html#mixin-merge-behavior-change`
|
|
2248
2261
|
},
|
|
2249
2262
|
["OPTIONS_BEFORE_DESTROY" /* OPTIONS_BEFORE_DESTROY */]: {
|
|
2250
2263
|
message: `\`beforeDestroy\` has been renamed to \`beforeUnmount\`.`
|
|
@@ -2258,23 +2271,23 @@ var Vue = (function () {
|
|
|
2258
2271
|
`If current usage is intended, you can disable the compat behavior and ` +
|
|
2259
2272
|
`suppress this warning with:` +
|
|
2260
2273
|
`\n\n configureCompat({ ${"WATCH_ARRAY" /* WATCH_ARRAY */}: false })\n`,
|
|
2261
|
-
link: `https://v3.vuejs.org/
|
|
2274
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/watch.html`
|
|
2262
2275
|
},
|
|
2263
2276
|
["PROPS_DEFAULT_THIS" /* PROPS_DEFAULT_THIS */]: {
|
|
2264
2277
|
message: (key) => `props default value function no longer has access to "this". The compat ` +
|
|
2265
2278
|
`build only offers access to this.$options.` +
|
|
2266
2279
|
`(found in prop "${key}")`,
|
|
2267
|
-
link: `https://v3.vuejs.org/
|
|
2280
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/props-default-this.html`
|
|
2268
2281
|
},
|
|
2269
2282
|
["CUSTOM_DIR" /* CUSTOM_DIR */]: {
|
|
2270
2283
|
message: (legacyHook, newHook) => `Custom directive hook "${legacyHook}" has been removed. ` +
|
|
2271
2284
|
`Use "${newHook}" instead.`,
|
|
2272
|
-
link: `https://v3.vuejs.org/
|
|
2285
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/custom-directives.html`
|
|
2273
2286
|
},
|
|
2274
2287
|
["V_ON_KEYCODE_MODIFIER" /* V_ON_KEYCODE_MODIFIER */]: {
|
|
2275
2288
|
message: `Using keyCode as v-on modifier is no longer supported. ` +
|
|
2276
2289
|
`Use kebab-case key name modifiers instead.`,
|
|
2277
|
-
link: `https://v3.vuejs.org/
|
|
2290
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/keycode-modifiers.html`
|
|
2278
2291
|
},
|
|
2279
2292
|
["ATTR_FALSE_VALUE" /* ATTR_FALSE_VALUE */]: {
|
|
2280
2293
|
message: (name) => `Attribute "${name}" with v-bind value \`false\` will render ` +
|
|
@@ -2282,7 +2295,7 @@ var Vue = (function () {
|
|
|
2282
2295
|
`use \`null\` or \`undefined\` instead. If the usage is intended, ` +
|
|
2283
2296
|
`you can disable the compat behavior and suppress this warning with:` +
|
|
2284
2297
|
`\n\n configureCompat({ ${"ATTR_FALSE_VALUE" /* ATTR_FALSE_VALUE */}: false })\n`,
|
|
2285
|
-
link: `https://v3.vuejs.org/
|
|
2298
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/attribute-coercion.html`
|
|
2286
2299
|
},
|
|
2287
2300
|
["ATTR_ENUMERATED_COERCION" /* ATTR_ENUMERATED_COERCION */]: {
|
|
2288
2301
|
message: (name, value, coerced) => `Enumerated attribute "${name}" with v-bind value \`${value}\` will ` +
|
|
@@ -2291,7 +2304,7 @@ var Vue = (function () {
|
|
|
2291
2304
|
`If the usage is intended, ` +
|
|
2292
2305
|
`you can disable the compat behavior and suppress this warning with:` +
|
|
2293
2306
|
`\n\n configureCompat({ ${"ATTR_ENUMERATED_COERCION" /* ATTR_ENUMERATED_COERCION */}: false })\n`,
|
|
2294
|
-
link: `https://v3.vuejs.org/
|
|
2307
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/attribute-coercion.html`
|
|
2295
2308
|
},
|
|
2296
2309
|
["TRANSITION_CLASSES" /* TRANSITION_CLASSES */]: {
|
|
2297
2310
|
message: `` // this feature cannot be runtime-detected
|
|
@@ -2302,7 +2315,7 @@ var Vue = (function () {
|
|
|
2302
2315
|
`for styling, you can disable the compat behavior and suppress this ` +
|
|
2303
2316
|
`warning with:` +
|
|
2304
2317
|
`\n\n configureCompat({ ${"TRANSITION_GROUP_ROOT" /* TRANSITION_GROUP_ROOT */}: false })\n`,
|
|
2305
|
-
link: `https://v3.vuejs.org/
|
|
2318
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/transition-group.html`
|
|
2306
2319
|
},
|
|
2307
2320
|
["COMPONENT_ASYNC" /* COMPONENT_ASYNC */]: {
|
|
2308
2321
|
message: (comp) => {
|
|
@@ -2315,7 +2328,7 @@ var Vue = (function () {
|
|
|
2315
2328
|
`warning with:` +
|
|
2316
2329
|
`\n\n configureCompat({ ${"COMPONENT_ASYNC" /* COMPONENT_ASYNC */}: false })\n`);
|
|
2317
2330
|
},
|
|
2318
|
-
link: `https://v3.vuejs.org/
|
|
2331
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/async-components.html`
|
|
2319
2332
|
},
|
|
2320
2333
|
["COMPONENT_FUNCTIONAL" /* COMPONENT_FUNCTIONAL */]: {
|
|
2321
2334
|
message: (comp) => {
|
|
@@ -2326,7 +2339,7 @@ var Vue = (function () {
|
|
|
2326
2339
|
`components usage have been migrated and its compat behavior has ` +
|
|
2327
2340
|
`been disabled.`);
|
|
2328
2341
|
},
|
|
2329
|
-
link: `https://v3.vuejs.org/
|
|
2342
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/functional-components.html`
|
|
2330
2343
|
},
|
|
2331
2344
|
["COMPONENT_V_MODEL" /* COMPONENT_V_MODEL */]: {
|
|
2332
2345
|
message: (comp) => {
|
|
@@ -2343,20 +2356,20 @@ var Vue = (function () {
|
|
|
2343
2356
|
`to work with v-model should now use the "modelValue" prop and emit the ` +
|
|
2344
2357
|
`"update:modelValue" event. You can update the usage and then ${configMsg}`);
|
|
2345
2358
|
},
|
|
2346
|
-
link: `https://v3.vuejs.org/
|
|
2359
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html`
|
|
2347
2360
|
},
|
|
2348
2361
|
["RENDER_FUNCTION" /* RENDER_FUNCTION */]: {
|
|
2349
2362
|
message: `Vue 3's render function API has changed. ` +
|
|
2350
2363
|
`You can opt-in to the new API with:` +
|
|
2351
2364
|
`\n\n configureCompat({ ${"RENDER_FUNCTION" /* RENDER_FUNCTION */}: false })\n` +
|
|
2352
2365
|
`\n (This can also be done per-component via the "compatConfig" option.)`,
|
|
2353
|
-
link: `https://v3.vuejs.org/
|
|
2366
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/render-function-api.html`
|
|
2354
2367
|
},
|
|
2355
2368
|
["FILTERS" /* FILTERS */]: {
|
|
2356
2369
|
message: `filters have been removed in Vue 3. ` +
|
|
2357
2370
|
`The "|" symbol will be treated as native JavaScript bitwise OR operator. ` +
|
|
2358
2371
|
`Use method calls or computed properties instead.`,
|
|
2359
|
-
link: `https://v3.vuejs.org/
|
|
2372
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/filters.html`
|
|
2360
2373
|
},
|
|
2361
2374
|
["PRIVATE_APIS" /* PRIVATE_APIS */]: {
|
|
2362
2375
|
message: name => `"${name}" is a Vue 2 private API that no longer exists in Vue 3. ` +
|
|
@@ -2424,7 +2437,7 @@ var Vue = (function () {
|
|
|
2424
2437
|
warn$1(`Deprecation config "${key}" is compiler-specific and you are ` +
|
|
2425
2438
|
`running a runtime-only build of Vue. This deprecation should be ` +
|
|
2426
2439
|
`configured via compiler options in your build setup instead.\n` +
|
|
2427
|
-
`Details: https://v3.vuejs.org/
|
|
2440
|
+
`Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`);
|
|
2428
2441
|
}
|
|
2429
2442
|
}
|
|
2430
2443
|
else {
|
|
@@ -3638,12 +3651,10 @@ var Vue = (function () {
|
|
|
3638
3651
|
return doWatch(effect, null, options);
|
|
3639
3652
|
}
|
|
3640
3653
|
function watchPostEffect(effect, options) {
|
|
3641
|
-
return doWatch(effect, null, (Object.assign(
|
|
3642
|
-
));
|
|
3654
|
+
return doWatch(effect, null, (Object.assign(Object.assign({}, options), { flush: 'post' }) ));
|
|
3643
3655
|
}
|
|
3644
3656
|
function watchSyncEffect(effect, options) {
|
|
3645
|
-
return doWatch(effect, null, (Object.assign(
|
|
3646
|
-
));
|
|
3657
|
+
return doWatch(effect, null, (Object.assign(Object.assign({}, options), { flush: 'sync' }) ));
|
|
3647
3658
|
}
|
|
3648
3659
|
// initial value for watchers to trigger on undefined initial values
|
|
3649
3660
|
const INITIAL_WATCHER_VALUE = {};
|
|
@@ -3953,7 +3964,9 @@ var Vue = (function () {
|
|
|
3953
3964
|
const { mode } = rawProps;
|
|
3954
3965
|
// check mode
|
|
3955
3966
|
if (mode &&
|
|
3956
|
-
mode !== 'in-out' &&
|
|
3967
|
+
mode !== 'in-out' &&
|
|
3968
|
+
mode !== 'out-in' &&
|
|
3969
|
+
mode !== 'default') {
|
|
3957
3970
|
warn$1(`invalid <transition> mode: ${mode}`);
|
|
3958
3971
|
}
|
|
3959
3972
|
// at this point children has a guaranteed length of 1.
|
|
@@ -4183,20 +4196,24 @@ var Vue = (function () {
|
|
|
4183
4196
|
vnode.transition = hooks;
|
|
4184
4197
|
}
|
|
4185
4198
|
}
|
|
4186
|
-
function getTransitionRawChildren(children, keepComment = false) {
|
|
4199
|
+
function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
4187
4200
|
let ret = [];
|
|
4188
4201
|
let keyedFragmentCount = 0;
|
|
4189
4202
|
for (let i = 0; i < children.length; i++) {
|
|
4190
|
-
|
|
4203
|
+
let child = children[i];
|
|
4204
|
+
// #5360 inherit parent key in case of <template v-for>
|
|
4205
|
+
const key = parentKey == null
|
|
4206
|
+
? child.key
|
|
4207
|
+
: String(parentKey) + String(child.key != null ? child.key : i);
|
|
4191
4208
|
// handle fragment children case, e.g. v-for
|
|
4192
4209
|
if (child.type === Fragment) {
|
|
4193
4210
|
if (child.patchFlag & 128 /* KEYED_FRAGMENT */)
|
|
4194
4211
|
keyedFragmentCount++;
|
|
4195
|
-
ret = ret.concat(getTransitionRawChildren(child.children, keepComment));
|
|
4212
|
+
ret = ret.concat(getTransitionRawChildren(child.children, keepComment, key));
|
|
4196
4213
|
}
|
|
4197
4214
|
// comment placeholders should be skipped, e.g. v-if
|
|
4198
4215
|
else if (keepComment || child.type !== Comment) {
|
|
4199
|
-
ret.push(child);
|
|
4216
|
+
ret.push(key != null ? cloneVNode(child, { key }) : child);
|
|
4200
4217
|
}
|
|
4201
4218
|
}
|
|
4202
4219
|
// #1126 if a transition children list contains multiple sub fragments, these
|
|
@@ -5254,6 +5271,10 @@ var Vue = (function () {
|
|
|
5254
5271
|
const propsToUpdate = instance.vnode.dynamicProps;
|
|
5255
5272
|
for (let i = 0; i < propsToUpdate.length; i++) {
|
|
5256
5273
|
let key = propsToUpdate[i];
|
|
5274
|
+
// skip if the prop key is a declared emit event listener
|
|
5275
|
+
if (isEmitListener(instance.emitsOptions, key)) {
|
|
5276
|
+
continue;
|
|
5277
|
+
}
|
|
5257
5278
|
// PROPS flag guarantees rawProps to be non-null
|
|
5258
5279
|
const value = rawProps[key];
|
|
5259
5280
|
if (options) {
|
|
@@ -5825,7 +5846,6 @@ var Vue = (function () {
|
|
|
5825
5846
|
[bar, this.y]
|
|
5826
5847
|
])
|
|
5827
5848
|
*/
|
|
5828
|
-
const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo');
|
|
5829
5849
|
function validateDirectiveName(name) {
|
|
5830
5850
|
if (isBuiltInDirective(name)) {
|
|
5831
5851
|
warn$1('Do not use built-in directive ids as custom directive id: ' + name);
|
|
@@ -5840,7 +5860,8 @@ var Vue = (function () {
|
|
|
5840
5860
|
warn$1(`withDirectives can only be used inside render functions.`);
|
|
5841
5861
|
return vnode;
|
|
5842
5862
|
}
|
|
5843
|
-
const instance = internalInstance
|
|
5863
|
+
const instance = getExposeProxy(internalInstance) ||
|
|
5864
|
+
internalInstance.proxy;
|
|
5844
5865
|
const bindings = vnode.dirs || (vnode.dirs = []);
|
|
5845
5866
|
for (let i = 0; i < directives.length; i++) {
|
|
5846
5867
|
let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];
|
|
@@ -5960,7 +5981,7 @@ var Vue = (function () {
|
|
|
5960
5981
|
return vm;
|
|
5961
5982
|
}
|
|
5962
5983
|
}
|
|
5963
|
-
Vue.version = `2.6.14-compat:${"3.2.
|
|
5984
|
+
Vue.version = `2.6.14-compat:${"3.2.32"}`;
|
|
5964
5985
|
Vue.config = singletonApp.config;
|
|
5965
5986
|
Vue.use = (p, ...options) => {
|
|
5966
5987
|
if (p && isFunction(p.install)) {
|
|
@@ -6387,6 +6408,9 @@ var Vue = (function () {
|
|
|
6387
6408
|
let uid = 0;
|
|
6388
6409
|
function createAppAPI(render, hydrate) {
|
|
6389
6410
|
return function createApp(rootComponent, rootProps = null) {
|
|
6411
|
+
if (!isFunction(rootComponent)) {
|
|
6412
|
+
rootComponent = Object.assign({}, rootComponent);
|
|
6413
|
+
}
|
|
6390
6414
|
if (rootProps != null && !isObject(rootProps)) {
|
|
6391
6415
|
warn$1(`root props passed to app.mount() must be an object.`);
|
|
6392
6416
|
rootProps = null;
|
|
@@ -6586,6 +6610,9 @@ var Vue = (function () {
|
|
|
6586
6610
|
if (!isArray(existing)) {
|
|
6587
6611
|
if (_isString) {
|
|
6588
6612
|
refs[ref] = [refValue];
|
|
6613
|
+
if (hasOwn(setupState, ref)) {
|
|
6614
|
+
setupState[ref] = refs[ref];
|
|
6615
|
+
}
|
|
6589
6616
|
}
|
|
6590
6617
|
else {
|
|
6591
6618
|
ref.value = [refValue];
|
|
@@ -6784,7 +6811,8 @@ var Vue = (function () {
|
|
|
6784
6811
|
// e.g. <option :value="obj">, <input type="checkbox" :true-value="1">
|
|
6785
6812
|
const forcePatchValue = (type === 'input' && dirs) || type === 'option';
|
|
6786
6813
|
// skip props & children if this is hoisted static nodes
|
|
6787
|
-
|
|
6814
|
+
// #5405 in dev, always hydrate children for HMR
|
|
6815
|
+
{
|
|
6788
6816
|
if (dirs) {
|
|
6789
6817
|
invokeDirectiveHook(vnode, null, parentComponent, 'created');
|
|
6790
6818
|
}
|
|
@@ -6957,7 +6985,7 @@ var Vue = (function () {
|
|
|
6957
6985
|
perf.mark(`vue-${type}-${instance.uid}`);
|
|
6958
6986
|
}
|
|
6959
6987
|
{
|
|
6960
|
-
devtoolsPerfStart(instance, type,
|
|
6988
|
+
devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now());
|
|
6961
6989
|
}
|
|
6962
6990
|
}
|
|
6963
6991
|
function endMeasure(instance, type) {
|
|
@@ -6970,7 +6998,7 @@ var Vue = (function () {
|
|
|
6970
6998
|
perf.clearMarks(endTag);
|
|
6971
6999
|
}
|
|
6972
7000
|
{
|
|
6973
|
-
devtoolsPerfEnd(instance, type,
|
|
7001
|
+
devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now());
|
|
6974
7002
|
}
|
|
6975
7003
|
}
|
|
6976
7004
|
function isSupported() {
|
|
@@ -9938,9 +9966,11 @@ var Vue = (function () {
|
|
|
9938
9966
|
const { data, setupState, ctx } = instance;
|
|
9939
9967
|
if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) {
|
|
9940
9968
|
setupState[key] = value;
|
|
9969
|
+
return true;
|
|
9941
9970
|
}
|
|
9942
9971
|
else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
|
|
9943
9972
|
data[key] = value;
|
|
9973
|
+
return true;
|
|
9944
9974
|
}
|
|
9945
9975
|
else if (hasOwn(instance.props, key)) {
|
|
9946
9976
|
warn$1(`Attempting to mutate prop "${key}". Props are readonly.`, instance);
|
|
@@ -9974,6 +10004,16 @@ var Vue = (function () {
|
|
|
9974
10004
|
hasOwn(ctx, key) ||
|
|
9975
10005
|
hasOwn(publicPropertiesMap, key) ||
|
|
9976
10006
|
hasOwn(appContext.config.globalProperties, key));
|
|
10007
|
+
},
|
|
10008
|
+
defineProperty(target, key, descriptor) {
|
|
10009
|
+
if (descriptor.get != null) {
|
|
10010
|
+
// invalidate key cache of a getter based property #5417
|
|
10011
|
+
target.$.accessCache[key] = 0;
|
|
10012
|
+
}
|
|
10013
|
+
else if (hasOwn(descriptor, 'value')) {
|
|
10014
|
+
this.set(target, key, descriptor.value, null);
|
|
10015
|
+
}
|
|
10016
|
+
return Reflect.defineProperty(target, key, descriptor);
|
|
9977
10017
|
}
|
|
9978
10018
|
};
|
|
9979
10019
|
{
|
|
@@ -10859,7 +10899,7 @@ var Vue = (function () {
|
|
|
10859
10899
|
}
|
|
10860
10900
|
|
|
10861
10901
|
// Core API ------------------------------------------------------------------
|
|
10862
|
-
const version = "3.2.
|
|
10902
|
+
const version = "3.2.32";
|
|
10863
10903
|
/**
|
|
10864
10904
|
* SSR utils for \@vue/server-renderer. Only exposed in cjs builds.
|
|
10865
10905
|
* @internal
|