@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
|
|
@@ -279,6 +281,7 @@ const isReservedProp = /*#__PURE__*/ makeMap(
|
|
|
279
281
|
'onVnodeBeforeMount,onVnodeMounted,' +
|
|
280
282
|
'onVnodeBeforeUpdate,onVnodeUpdated,' +
|
|
281
283
|
'onVnodeBeforeUnmount,onVnodeUnmounted');
|
|
284
|
+
const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo');
|
|
282
285
|
const cacheStringFunction = (fn) => {
|
|
283
286
|
const cache = Object.create(null);
|
|
284
287
|
return ((str) => {
|
|
@@ -344,11 +347,19 @@ function warn(msg, ...args) {
|
|
|
344
347
|
}
|
|
345
348
|
|
|
346
349
|
let activeEffectScope;
|
|
347
|
-
const effectScopeStack = [];
|
|
348
350
|
class EffectScope {
|
|
349
351
|
constructor(detached = false) {
|
|
352
|
+
/**
|
|
353
|
+
* @internal
|
|
354
|
+
*/
|
|
350
355
|
this.active = true;
|
|
356
|
+
/**
|
|
357
|
+
* @internal
|
|
358
|
+
*/
|
|
351
359
|
this.effects = [];
|
|
360
|
+
/**
|
|
361
|
+
* @internal
|
|
362
|
+
*/
|
|
352
363
|
this.cleanups = [];
|
|
353
364
|
if (!detached && activeEffectScope) {
|
|
354
365
|
this.parent = activeEffectScope;
|
|
@@ -358,36 +369,46 @@ class EffectScope {
|
|
|
358
369
|
}
|
|
359
370
|
run(fn) {
|
|
360
371
|
if (this.active) {
|
|
372
|
+
const currentEffectScope = activeEffectScope;
|
|
361
373
|
try {
|
|
362
|
-
this
|
|
374
|
+
activeEffectScope = this;
|
|
363
375
|
return fn();
|
|
364
376
|
}
|
|
365
377
|
finally {
|
|
366
|
-
|
|
378
|
+
activeEffectScope = currentEffectScope;
|
|
367
379
|
}
|
|
368
380
|
}
|
|
369
381
|
else if ((process.env.NODE_ENV !== 'production')) {
|
|
370
382
|
warn(`cannot run an inactive effect scope.`);
|
|
371
383
|
}
|
|
372
384
|
}
|
|
385
|
+
/**
|
|
386
|
+
* This should only be called on non-detached scopes
|
|
387
|
+
* @internal
|
|
388
|
+
*/
|
|
373
389
|
on() {
|
|
374
|
-
|
|
375
|
-
effectScopeStack.push(this);
|
|
376
|
-
activeEffectScope = this;
|
|
377
|
-
}
|
|
390
|
+
activeEffectScope = this;
|
|
378
391
|
}
|
|
392
|
+
/**
|
|
393
|
+
* This should only be called on non-detached scopes
|
|
394
|
+
* @internal
|
|
395
|
+
*/
|
|
379
396
|
off() {
|
|
380
|
-
|
|
381
|
-
effectScopeStack.pop();
|
|
382
|
-
activeEffectScope = effectScopeStack[effectScopeStack.length - 1];
|
|
383
|
-
}
|
|
397
|
+
activeEffectScope = this.parent;
|
|
384
398
|
}
|
|
385
399
|
stop(fromParent) {
|
|
386
400
|
if (this.active) {
|
|
387
|
-
|
|
388
|
-
this.
|
|
401
|
+
let i, l;
|
|
402
|
+
for (i = 0, l = this.effects.length; i < l; i++) {
|
|
403
|
+
this.effects[i].stop();
|
|
404
|
+
}
|
|
405
|
+
for (i = 0, l = this.cleanups.length; i < l; i++) {
|
|
406
|
+
this.cleanups[i]();
|
|
407
|
+
}
|
|
389
408
|
if (this.scopes) {
|
|
390
|
-
this.scopes.
|
|
409
|
+
for (i = 0, l = this.scopes.length; i < l; i++) {
|
|
410
|
+
this.scopes[i].stop(true);
|
|
411
|
+
}
|
|
391
412
|
}
|
|
392
413
|
// nested scope, dereference from parent to avoid memory leaks
|
|
393
414
|
if (this.parent && !fromParent) {
|
|
@@ -405,8 +426,7 @@ class EffectScope {
|
|
|
405
426
|
function effectScope(detached) {
|
|
406
427
|
return new EffectScope(detached);
|
|
407
428
|
}
|
|
408
|
-
function recordEffectScope(effect, scope) {
|
|
409
|
-
scope = scope || activeEffectScope;
|
|
429
|
+
function recordEffectScope(effect, scope = activeEffectScope) {
|
|
410
430
|
if (scope && scope.active) {
|
|
411
431
|
scope.effects.push(effect);
|
|
412
432
|
}
|
|
@@ -469,7 +489,6 @@ let trackOpBit = 1;
|
|
|
469
489
|
* When recursion depth is greater, fall back to using a full cleanup.
|
|
470
490
|
*/
|
|
471
491
|
const maxMarkerBits = 30;
|
|
472
|
-
const effectStack = [];
|
|
473
492
|
let activeEffect;
|
|
474
493
|
const ITERATE_KEY = Symbol((process.env.NODE_ENV !== 'production') ? 'iterate' : '');
|
|
475
494
|
const MAP_KEY_ITERATE_KEY = Symbol((process.env.NODE_ENV !== 'production') ? 'Map key iterate' : '');
|
|
@@ -479,35 +498,42 @@ class ReactiveEffect {
|
|
|
479
498
|
this.scheduler = scheduler;
|
|
480
499
|
this.active = true;
|
|
481
500
|
this.deps = [];
|
|
501
|
+
this.parent = undefined;
|
|
482
502
|
recordEffectScope(this, scope);
|
|
483
503
|
}
|
|
484
504
|
run() {
|
|
485
505
|
if (!this.active) {
|
|
486
506
|
return this.fn();
|
|
487
507
|
}
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
if (effectTrackDepth <= maxMarkerBits) {
|
|
494
|
-
initDepMarkers(this);
|
|
495
|
-
}
|
|
496
|
-
else {
|
|
497
|
-
cleanupEffect(this);
|
|
498
|
-
}
|
|
499
|
-
return this.fn();
|
|
508
|
+
let parent = activeEffect;
|
|
509
|
+
let lastShouldTrack = shouldTrack;
|
|
510
|
+
while (parent) {
|
|
511
|
+
if (parent === this) {
|
|
512
|
+
return;
|
|
500
513
|
}
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
514
|
+
parent = parent.parent;
|
|
515
|
+
}
|
|
516
|
+
try {
|
|
517
|
+
this.parent = activeEffect;
|
|
518
|
+
activeEffect = this;
|
|
519
|
+
shouldTrack = true;
|
|
520
|
+
trackOpBit = 1 << ++effectTrackDepth;
|
|
521
|
+
if (effectTrackDepth <= maxMarkerBits) {
|
|
522
|
+
initDepMarkers(this);
|
|
523
|
+
}
|
|
524
|
+
else {
|
|
525
|
+
cleanupEffect(this);
|
|
526
|
+
}
|
|
527
|
+
return this.fn();
|
|
528
|
+
}
|
|
529
|
+
finally {
|
|
530
|
+
if (effectTrackDepth <= maxMarkerBits) {
|
|
531
|
+
finalizeDepMarkers(this);
|
|
510
532
|
}
|
|
533
|
+
trackOpBit = 1 << --effectTrackDepth;
|
|
534
|
+
activeEffect = this.parent;
|
|
535
|
+
shouldTrack = lastShouldTrack;
|
|
536
|
+
this.parent = undefined;
|
|
511
537
|
}
|
|
512
538
|
}
|
|
513
539
|
stop() {
|
|
@@ -555,33 +581,25 @@ function pauseTracking() {
|
|
|
555
581
|
trackStack.push(shouldTrack);
|
|
556
582
|
shouldTrack = false;
|
|
557
583
|
}
|
|
558
|
-
function enableTracking() {
|
|
559
|
-
trackStack.push(shouldTrack);
|
|
560
|
-
shouldTrack = true;
|
|
561
|
-
}
|
|
562
584
|
function resetTracking() {
|
|
563
585
|
const last = trackStack.pop();
|
|
564
586
|
shouldTrack = last === undefined ? true : last;
|
|
565
587
|
}
|
|
566
588
|
function track(target, type, key) {
|
|
567
|
-
if (
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
589
|
+
if (shouldTrack && activeEffect) {
|
|
590
|
+
let depsMap = targetMap.get(target);
|
|
591
|
+
if (!depsMap) {
|
|
592
|
+
targetMap.set(target, (depsMap = new Map()));
|
|
593
|
+
}
|
|
594
|
+
let dep = depsMap.get(key);
|
|
595
|
+
if (!dep) {
|
|
596
|
+
depsMap.set(key, (dep = createDep()));
|
|
597
|
+
}
|
|
598
|
+
const eventInfo = (process.env.NODE_ENV !== 'production')
|
|
599
|
+
? { effect: activeEffect, target, type, key }
|
|
600
|
+
: undefined;
|
|
601
|
+
trackEffects(dep, eventInfo);
|
|
577
602
|
}
|
|
578
|
-
const eventInfo = (process.env.NODE_ENV !== 'production')
|
|
579
|
-
? { effect: activeEffect, target, type, key }
|
|
580
|
-
: undefined;
|
|
581
|
-
trackEffects(dep, eventInfo);
|
|
582
|
-
}
|
|
583
|
-
function isTracking() {
|
|
584
|
-
return shouldTrack && activeEffect !== undefined;
|
|
585
603
|
}
|
|
586
604
|
function trackEffects(dep, debuggerEventExtraInfo) {
|
|
587
605
|
let shouldTrack = false;
|
|
@@ -599,9 +617,7 @@ function trackEffects(dep, debuggerEventExtraInfo) {
|
|
|
599
617
|
dep.add(activeEffect);
|
|
600
618
|
activeEffect.deps.push(dep);
|
|
601
619
|
if ((process.env.NODE_ENV !== 'production') && activeEffect.onTrack) {
|
|
602
|
-
activeEffect.onTrack(Object.assign({
|
|
603
|
-
effect: activeEffect
|
|
604
|
-
}, debuggerEventExtraInfo));
|
|
620
|
+
activeEffect.onTrack(Object.assign({ effect: activeEffect }, debuggerEventExtraInfo));
|
|
605
621
|
}
|
|
606
622
|
}
|
|
607
623
|
}
|
|
@@ -1274,20 +1290,17 @@ const toReactive = (value) => isObject(value) ? reactive(value) : value;
|
|
|
1274
1290
|
const toReadonly = (value) => isObject(value) ? readonly(value) : value;
|
|
1275
1291
|
|
|
1276
1292
|
function trackRefValue(ref) {
|
|
1277
|
-
if (
|
|
1293
|
+
if (shouldTrack && activeEffect) {
|
|
1278
1294
|
ref = toRaw(ref);
|
|
1279
|
-
if (!ref.dep) {
|
|
1280
|
-
ref.dep = createDep();
|
|
1281
|
-
}
|
|
1282
1295
|
if ((process.env.NODE_ENV !== 'production')) {
|
|
1283
|
-
trackEffects(ref.dep, {
|
|
1296
|
+
trackEffects(ref.dep || (ref.dep = createDep()), {
|
|
1284
1297
|
target: ref,
|
|
1285
1298
|
type: "get" /* GET */,
|
|
1286
1299
|
key: 'value'
|
|
1287
1300
|
});
|
|
1288
1301
|
}
|
|
1289
1302
|
else {
|
|
1290
|
-
trackEffects(ref.dep);
|
|
1303
|
+
trackEffects(ref.dep || (ref.dep = createDep()));
|
|
1291
1304
|
}
|
|
1292
1305
|
}
|
|
1293
1306
|
}
|
|
@@ -1308,7 +1321,7 @@ function triggerRefValue(ref, newVal) {
|
|
|
1308
1321
|
}
|
|
1309
1322
|
}
|
|
1310
1323
|
function isRef(r) {
|
|
1311
|
-
return
|
|
1324
|
+
return !!(r && r.__v_isRef === true);
|
|
1312
1325
|
}
|
|
1313
1326
|
function ref(value) {
|
|
1314
1327
|
return createRef(value, false);
|
|
@@ -2127,23 +2140,23 @@ const deprecationData = {
|
|
|
2127
2140
|
["GLOBAL_MOUNT" /* GLOBAL_MOUNT */]: {
|
|
2128
2141
|
message: `The global app bootstrapping API has changed: vm.$mount() and the "el" ` +
|
|
2129
2142
|
`option have been removed. Use createApp(RootComponent).mount() instead.`,
|
|
2130
|
-
link: `https://v3.vuejs.org/
|
|
2143
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/global-api.html#mounting-app-instance`
|
|
2131
2144
|
},
|
|
2132
2145
|
["GLOBAL_MOUNT_CONTAINER" /* GLOBAL_MOUNT_CONTAINER */]: {
|
|
2133
2146
|
message: `Vue detected directives on the mount container. ` +
|
|
2134
2147
|
`In Vue 3, the container is no longer considered part of the template ` +
|
|
2135
2148
|
`and will not be processed/replaced.`,
|
|
2136
|
-
link: `https://v3.vuejs.org/
|
|
2149
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/mount-changes.html`
|
|
2137
2150
|
},
|
|
2138
2151
|
["GLOBAL_EXTEND" /* GLOBAL_EXTEND */]: {
|
|
2139
2152
|
message: `Vue.extend() has been removed in Vue 3. ` +
|
|
2140
2153
|
`Use defineComponent() instead.`,
|
|
2141
|
-
link: `https://
|
|
2154
|
+
link: `https://vuejs.org/api/general.html#definecomponent`
|
|
2142
2155
|
},
|
|
2143
2156
|
["GLOBAL_PROTOTYPE" /* GLOBAL_PROTOTYPE */]: {
|
|
2144
2157
|
message: `Vue.prototype is no longer available in Vue 3. ` +
|
|
2145
2158
|
`Use app.config.globalProperties instead.`,
|
|
2146
|
-
link: `https://v3.vuejs.org/
|
|
2159
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/global-api.html#vue-prototype-replaced-by-config-globalproperties`
|
|
2147
2160
|
},
|
|
2148
2161
|
["GLOBAL_SET" /* GLOBAL_SET */]: {
|
|
2149
2162
|
message: `Vue.set() has been removed as it is no longer needed in Vue 3. ` +
|
|
@@ -2156,7 +2169,7 @@ const deprecationData = {
|
|
|
2156
2169
|
["GLOBAL_OBSERVABLE" /* GLOBAL_OBSERVABLE */]: {
|
|
2157
2170
|
message: `Vue.observable() has been removed. ` +
|
|
2158
2171
|
`Use \`import { reactive } from "vue"\` from Composition API instead.`,
|
|
2159
|
-
link: `https://
|
|
2172
|
+
link: `https://vuejs.org/api/reactivity-core.html#reactive`
|
|
2160
2173
|
},
|
|
2161
2174
|
["GLOBAL_PRIVATE_UTIL" /* GLOBAL_PRIVATE_UTIL */]: {
|
|
2162
2175
|
message: `Vue.util has been removed. Please refactor to avoid its usage ` +
|
|
@@ -2175,11 +2188,11 @@ const deprecationData = {
|
|
|
2175
2188
|
["CONFIG_KEY_CODES" /* CONFIG_KEY_CODES */]: {
|
|
2176
2189
|
message: `config.keyCodes has been removed. ` +
|
|
2177
2190
|
`In Vue 3, you can directly use the kebab-case key names as v-on modifiers.`,
|
|
2178
|
-
link: `https://v3.vuejs.org/
|
|
2191
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/keycode-modifiers.html`
|
|
2179
2192
|
},
|
|
2180
2193
|
["CONFIG_PRODUCTION_TIP" /* CONFIG_PRODUCTION_TIP */]: {
|
|
2181
2194
|
message: `config.productionTip has been removed.`,
|
|
2182
|
-
link: `https://v3.vuejs.org/
|
|
2195
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/global-api.html#config-productiontip-removed`
|
|
2183
2196
|
},
|
|
2184
2197
|
["CONFIG_IGNORED_ELEMENTS" /* CONFIG_IGNORED_ELEMENTS */]: {
|
|
2185
2198
|
message: () => {
|
|
@@ -2192,7 +2205,7 @@ const deprecationData = {
|
|
|
2192
2205
|
}
|
|
2193
2206
|
return msg;
|
|
2194
2207
|
},
|
|
2195
|
-
link: `https://v3.vuejs.org/
|
|
2208
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/global-api.html#config-ignoredelements-is-now-config-iscustomelement`
|
|
2196
2209
|
},
|
|
2197
2210
|
["CONFIG_WHITESPACE" /* CONFIG_WHITESPACE */]: {
|
|
2198
2211
|
// this warning is only relevant in the full build when using runtime
|
|
@@ -2215,12 +2228,12 @@ const deprecationData = {
|
|
|
2215
2228
|
},
|
|
2216
2229
|
["INSTANCE_DESTROY" /* INSTANCE_DESTROY */]: {
|
|
2217
2230
|
message: `vm.$destroy() has been removed. Use app.unmount() instead.`,
|
|
2218
|
-
link: `https://
|
|
2231
|
+
link: `https://vuejs.org/api/application.html#app-unmount`
|
|
2219
2232
|
},
|
|
2220
2233
|
["INSTANCE_EVENT_EMITTER" /* INSTANCE_EVENT_EMITTER */]: {
|
|
2221
2234
|
message: `vm.$on/$once/$off() have been removed. ` +
|
|
2222
2235
|
`Use an external event emitter library instead.`,
|
|
2223
|
-
link: `https://v3.vuejs.org/
|
|
2236
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/events-api.html`
|
|
2224
2237
|
},
|
|
2225
2238
|
["INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */]: {
|
|
2226
2239
|
message: event => `"${event}" lifecycle events are no longer supported. From templates, ` +
|
|
@@ -2228,23 +2241,23 @@ const deprecationData = {
|
|
|
2228
2241
|
`should be changed to @vnode-${event.slice(5)}. ` +
|
|
2229
2242
|
`From JavaScript, use Composition API to dynamically register lifecycle ` +
|
|
2230
2243
|
`hooks.`,
|
|
2231
|
-
link: `https://v3.vuejs.org/
|
|
2244
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/vnode-lifecycle-events.html`
|
|
2232
2245
|
},
|
|
2233
2246
|
["INSTANCE_CHILDREN" /* INSTANCE_CHILDREN */]: {
|
|
2234
2247
|
message: `vm.$children has been removed. Consider refactoring your logic ` +
|
|
2235
2248
|
`to avoid relying on direct access to child components.`,
|
|
2236
|
-
link: `https://v3.vuejs.org/
|
|
2249
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/children.html`
|
|
2237
2250
|
},
|
|
2238
2251
|
["INSTANCE_LISTENERS" /* INSTANCE_LISTENERS */]: {
|
|
2239
2252
|
message: `vm.$listeners has been removed. In Vue 3, parent v-on listeners are ` +
|
|
2240
2253
|
`included in vm.$attrs and it is no longer necessary to separately use ` +
|
|
2241
2254
|
`v-on="$listeners" if you are already using v-bind="$attrs". ` +
|
|
2242
2255
|
`(Note: the Vue 3 behavior only applies if this compat config is disabled)`,
|
|
2243
|
-
link: `https://v3.vuejs.org/
|
|
2256
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/listeners-removed.html`
|
|
2244
2257
|
},
|
|
2245
2258
|
["INSTANCE_SCOPED_SLOTS" /* INSTANCE_SCOPED_SLOTS */]: {
|
|
2246
2259
|
message: `vm.$scopedSlots has been removed. Use vm.$slots instead.`,
|
|
2247
|
-
link: `https://v3.vuejs.org/
|
|
2260
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/slots-unification.html`
|
|
2248
2261
|
},
|
|
2249
2262
|
["INSTANCE_ATTRS_CLASS_STYLE" /* INSTANCE_ATTRS_CLASS_STYLE */]: {
|
|
2250
2263
|
message: componentName => `Component <${componentName || 'Anonymous'}> has \`inheritAttrs: false\` but is ` +
|
|
@@ -2255,17 +2268,17 @@ const deprecationData = {
|
|
|
2255
2268
|
`If you are binding $attrs to a non-root element and expecting ` +
|
|
2256
2269
|
`class/style to fallthrough on root, you will need to now manually bind ` +
|
|
2257
2270
|
`them on root via :class="$attrs.class".`,
|
|
2258
|
-
link: `https://v3.vuejs.org/
|
|
2271
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/attrs-includes-class-style.html`
|
|
2259
2272
|
},
|
|
2260
2273
|
["OPTIONS_DATA_FN" /* OPTIONS_DATA_FN */]: {
|
|
2261
2274
|
message: `The "data" option can no longer be a plain object. ` +
|
|
2262
2275
|
`Always use a function.`,
|
|
2263
|
-
link: `https://v3.vuejs.org/
|
|
2276
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/data-option.html`
|
|
2264
2277
|
},
|
|
2265
2278
|
["OPTIONS_DATA_MERGE" /* OPTIONS_DATA_MERGE */]: {
|
|
2266
2279
|
message: (key) => `Detected conflicting key "${key}" when merging data option values. ` +
|
|
2267
2280
|
`In Vue 3, data keys are merged shallowly and will override one another.`,
|
|
2268
|
-
link: `https://v3.vuejs.org/
|
|
2281
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/data-option.html#mixin-merge-behavior-change`
|
|
2269
2282
|
},
|
|
2270
2283
|
["OPTIONS_BEFORE_DESTROY" /* OPTIONS_BEFORE_DESTROY */]: {
|
|
2271
2284
|
message: `\`beforeDestroy\` has been renamed to \`beforeUnmount\`.`
|
|
@@ -2279,23 +2292,23 @@ const deprecationData = {
|
|
|
2279
2292
|
`If current usage is intended, you can disable the compat behavior and ` +
|
|
2280
2293
|
`suppress this warning with:` +
|
|
2281
2294
|
`\n\n configureCompat({ ${"WATCH_ARRAY" /* WATCH_ARRAY */}: false })\n`,
|
|
2282
|
-
link: `https://v3.vuejs.org/
|
|
2295
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/watch.html`
|
|
2283
2296
|
},
|
|
2284
2297
|
["PROPS_DEFAULT_THIS" /* PROPS_DEFAULT_THIS */]: {
|
|
2285
2298
|
message: (key) => `props default value function no longer has access to "this". The compat ` +
|
|
2286
2299
|
`build only offers access to this.$options.` +
|
|
2287
2300
|
`(found in prop "${key}")`,
|
|
2288
|
-
link: `https://v3.vuejs.org/
|
|
2301
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/props-default-this.html`
|
|
2289
2302
|
},
|
|
2290
2303
|
["CUSTOM_DIR" /* CUSTOM_DIR */]: {
|
|
2291
2304
|
message: (legacyHook, newHook) => `Custom directive hook "${legacyHook}" has been removed. ` +
|
|
2292
2305
|
`Use "${newHook}" instead.`,
|
|
2293
|
-
link: `https://v3.vuejs.org/
|
|
2306
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/custom-directives.html`
|
|
2294
2307
|
},
|
|
2295
2308
|
["V_ON_KEYCODE_MODIFIER" /* V_ON_KEYCODE_MODIFIER */]: {
|
|
2296
2309
|
message: `Using keyCode as v-on modifier is no longer supported. ` +
|
|
2297
2310
|
`Use kebab-case key name modifiers instead.`,
|
|
2298
|
-
link: `https://v3.vuejs.org/
|
|
2311
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/keycode-modifiers.html`
|
|
2299
2312
|
},
|
|
2300
2313
|
["ATTR_FALSE_VALUE" /* ATTR_FALSE_VALUE */]: {
|
|
2301
2314
|
message: (name) => `Attribute "${name}" with v-bind value \`false\` will render ` +
|
|
@@ -2303,7 +2316,7 @@ const deprecationData = {
|
|
|
2303
2316
|
`use \`null\` or \`undefined\` instead. If the usage is intended, ` +
|
|
2304
2317
|
`you can disable the compat behavior and suppress this warning with:` +
|
|
2305
2318
|
`\n\n configureCompat({ ${"ATTR_FALSE_VALUE" /* ATTR_FALSE_VALUE */}: false })\n`,
|
|
2306
|
-
link: `https://v3.vuejs.org/
|
|
2319
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/attribute-coercion.html`
|
|
2307
2320
|
},
|
|
2308
2321
|
["ATTR_ENUMERATED_COERCION" /* ATTR_ENUMERATED_COERCION */]: {
|
|
2309
2322
|
message: (name, value, coerced) => `Enumerated attribute "${name}" with v-bind value \`${value}\` will ` +
|
|
@@ -2312,7 +2325,7 @@ const deprecationData = {
|
|
|
2312
2325
|
`If the usage is intended, ` +
|
|
2313
2326
|
`you can disable the compat behavior and suppress this warning with:` +
|
|
2314
2327
|
`\n\n configureCompat({ ${"ATTR_ENUMERATED_COERCION" /* ATTR_ENUMERATED_COERCION */}: false })\n`,
|
|
2315
|
-
link: `https://v3.vuejs.org/
|
|
2328
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/attribute-coercion.html`
|
|
2316
2329
|
},
|
|
2317
2330
|
["TRANSITION_CLASSES" /* TRANSITION_CLASSES */]: {
|
|
2318
2331
|
message: `` // this feature cannot be runtime-detected
|
|
@@ -2323,7 +2336,7 @@ const deprecationData = {
|
|
|
2323
2336
|
`for styling, you can disable the compat behavior and suppress this ` +
|
|
2324
2337
|
`warning with:` +
|
|
2325
2338
|
`\n\n configureCompat({ ${"TRANSITION_GROUP_ROOT" /* TRANSITION_GROUP_ROOT */}: false })\n`,
|
|
2326
|
-
link: `https://v3.vuejs.org/
|
|
2339
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/transition-group.html`
|
|
2327
2340
|
},
|
|
2328
2341
|
["COMPONENT_ASYNC" /* COMPONENT_ASYNC */]: {
|
|
2329
2342
|
message: (comp) => {
|
|
@@ -2336,7 +2349,7 @@ const deprecationData = {
|
|
|
2336
2349
|
`warning with:` +
|
|
2337
2350
|
`\n\n configureCompat({ ${"COMPONENT_ASYNC" /* COMPONENT_ASYNC */}: false })\n`);
|
|
2338
2351
|
},
|
|
2339
|
-
link: `https://v3.vuejs.org/
|
|
2352
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/async-components.html`
|
|
2340
2353
|
},
|
|
2341
2354
|
["COMPONENT_FUNCTIONAL" /* COMPONENT_FUNCTIONAL */]: {
|
|
2342
2355
|
message: (comp) => {
|
|
@@ -2347,7 +2360,7 @@ const deprecationData = {
|
|
|
2347
2360
|
`components usage have been migrated and its compat behavior has ` +
|
|
2348
2361
|
`been disabled.`);
|
|
2349
2362
|
},
|
|
2350
|
-
link: `https://v3.vuejs.org/
|
|
2363
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/functional-components.html`
|
|
2351
2364
|
},
|
|
2352
2365
|
["COMPONENT_V_MODEL" /* COMPONENT_V_MODEL */]: {
|
|
2353
2366
|
message: (comp) => {
|
|
@@ -2364,20 +2377,20 @@ const deprecationData = {
|
|
|
2364
2377
|
`to work with v-model should now use the "modelValue" prop and emit the ` +
|
|
2365
2378
|
`"update:modelValue" event. You can update the usage and then ${configMsg}`);
|
|
2366
2379
|
},
|
|
2367
|
-
link: `https://v3.vuejs.org/
|
|
2380
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html`
|
|
2368
2381
|
},
|
|
2369
2382
|
["RENDER_FUNCTION" /* RENDER_FUNCTION */]: {
|
|
2370
2383
|
message: `Vue 3's render function API has changed. ` +
|
|
2371
2384
|
`You can opt-in to the new API with:` +
|
|
2372
2385
|
`\n\n configureCompat({ ${"RENDER_FUNCTION" /* RENDER_FUNCTION */}: false })\n` +
|
|
2373
2386
|
`\n (This can also be done per-component via the "compatConfig" option.)`,
|
|
2374
|
-
link: `https://v3.vuejs.org/
|
|
2387
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/render-function-api.html`
|
|
2375
2388
|
},
|
|
2376
2389
|
["FILTERS" /* FILTERS */]: {
|
|
2377
2390
|
message: `filters have been removed in Vue 3. ` +
|
|
2378
2391
|
`The "|" symbol will be treated as native JavaScript bitwise OR operator. ` +
|
|
2379
2392
|
`Use method calls or computed properties instead.`,
|
|
2380
|
-
link: `https://v3.vuejs.org/
|
|
2393
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/filters.html`
|
|
2381
2394
|
},
|
|
2382
2395
|
["PRIVATE_APIS" /* PRIVATE_APIS */]: {
|
|
2383
2396
|
message: name => `"${name}" is a Vue 2 private API that no longer exists in Vue 3. ` +
|
|
@@ -2448,7 +2461,7 @@ function validateCompatConfig(config, instance) {
|
|
|
2448
2461
|
warn$1(`Deprecation config "${key}" is compiler-specific and you are ` +
|
|
2449
2462
|
`running a runtime-only build of Vue. This deprecation should be ` +
|
|
2450
2463
|
`configured via compiler options in your build setup instead.\n` +
|
|
2451
|
-
`Details: https://v3.vuejs.org/
|
|
2464
|
+
`Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`);
|
|
2452
2465
|
}
|
|
2453
2466
|
}
|
|
2454
2467
|
else {
|
|
@@ -3664,13 +3677,11 @@ function watchEffect(effect, options) {
|
|
|
3664
3677
|
}
|
|
3665
3678
|
function watchPostEffect(effect, options) {
|
|
3666
3679
|
return doWatch(effect, null, ((process.env.NODE_ENV !== 'production')
|
|
3667
|
-
? Object.assign(options
|
|
3668
|
-
: { flush: 'post' }));
|
|
3680
|
+
? Object.assign(Object.assign({}, options), { flush: 'post' }) : { flush: 'post' }));
|
|
3669
3681
|
}
|
|
3670
3682
|
function watchSyncEffect(effect, options) {
|
|
3671
3683
|
return doWatch(effect, null, ((process.env.NODE_ENV !== 'production')
|
|
3672
|
-
? Object.assign(options
|
|
3673
|
-
: { flush: 'sync' }));
|
|
3684
|
+
? Object.assign(Object.assign({}, options), { flush: 'sync' }) : { flush: 'sync' }));
|
|
3674
3685
|
}
|
|
3675
3686
|
// initial value for watchers to trigger on undefined initial values
|
|
3676
3687
|
const INITIAL_WATCHER_VALUE = {};
|
|
@@ -3998,7 +4009,9 @@ const BaseTransitionImpl = {
|
|
|
3998
4009
|
// check mode
|
|
3999
4010
|
if ((process.env.NODE_ENV !== 'production') &&
|
|
4000
4011
|
mode &&
|
|
4001
|
-
mode !== 'in-out' &&
|
|
4012
|
+
mode !== 'in-out' &&
|
|
4013
|
+
mode !== 'out-in' &&
|
|
4014
|
+
mode !== 'default') {
|
|
4002
4015
|
warn$1(`invalid <transition> mode: ${mode}`);
|
|
4003
4016
|
}
|
|
4004
4017
|
// at this point children has a guaranteed length of 1.
|
|
@@ -4228,20 +4241,24 @@ function setTransitionHooks(vnode, hooks) {
|
|
|
4228
4241
|
vnode.transition = hooks;
|
|
4229
4242
|
}
|
|
4230
4243
|
}
|
|
4231
|
-
function getTransitionRawChildren(children, keepComment = false) {
|
|
4244
|
+
function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
4232
4245
|
let ret = [];
|
|
4233
4246
|
let keyedFragmentCount = 0;
|
|
4234
4247
|
for (let i = 0; i < children.length; i++) {
|
|
4235
|
-
|
|
4248
|
+
let child = children[i];
|
|
4249
|
+
// #5360 inherit parent key in case of <template v-for>
|
|
4250
|
+
const key = parentKey == null
|
|
4251
|
+
? child.key
|
|
4252
|
+
: String(parentKey) + String(child.key != null ? child.key : i);
|
|
4236
4253
|
// handle fragment children case, e.g. v-for
|
|
4237
4254
|
if (child.type === Fragment) {
|
|
4238
4255
|
if (child.patchFlag & 128 /* KEYED_FRAGMENT */)
|
|
4239
4256
|
keyedFragmentCount++;
|
|
4240
|
-
ret = ret.concat(getTransitionRawChildren(child.children, keepComment));
|
|
4257
|
+
ret = ret.concat(getTransitionRawChildren(child.children, keepComment, key));
|
|
4241
4258
|
}
|
|
4242
4259
|
// comment placeholders should be skipped, e.g. v-if
|
|
4243
4260
|
else if (keepComment || child.type !== Comment) {
|
|
4244
|
-
ret.push(child);
|
|
4261
|
+
ret.push(key != null ? cloneVNode(child, { key }) : child);
|
|
4245
4262
|
}
|
|
4246
4263
|
}
|
|
4247
4264
|
// #1126 if a transition children list contains multiple sub fragments, these
|
|
@@ -5306,6 +5323,10 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
|
|
|
5306
5323
|
const propsToUpdate = instance.vnode.dynamicProps;
|
|
5307
5324
|
for (let i = 0; i < propsToUpdate.length; i++) {
|
|
5308
5325
|
let key = propsToUpdate[i];
|
|
5326
|
+
// skip if the prop key is a declared emit event listener
|
|
5327
|
+
if (isEmitListener(instance.emitsOptions, key)) {
|
|
5328
|
+
continue;
|
|
5329
|
+
}
|
|
5309
5330
|
// PROPS flag guarantees rawProps to be non-null
|
|
5310
5331
|
const value = rawProps[key];
|
|
5311
5332
|
if (options) {
|
|
@@ -5879,7 +5900,6 @@ return withDirectives(h(comp), [
|
|
|
5879
5900
|
[bar, this.y]
|
|
5880
5901
|
])
|
|
5881
5902
|
*/
|
|
5882
|
-
const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo');
|
|
5883
5903
|
function validateDirectiveName(name) {
|
|
5884
5904
|
if (isBuiltInDirective(name)) {
|
|
5885
5905
|
warn$1('Do not use built-in directive ids as custom directive id: ' + name);
|
|
@@ -5894,7 +5914,8 @@ function withDirectives(vnode, directives) {
|
|
|
5894
5914
|
(process.env.NODE_ENV !== 'production') && warn$1(`withDirectives can only be used inside render functions.`);
|
|
5895
5915
|
return vnode;
|
|
5896
5916
|
}
|
|
5897
|
-
const instance = internalInstance
|
|
5917
|
+
const instance = getExposeProxy(internalInstance) ||
|
|
5918
|
+
internalInstance.proxy;
|
|
5898
5919
|
const bindings = vnode.dirs || (vnode.dirs = []);
|
|
5899
5920
|
for (let i = 0; i < directives.length; i++) {
|
|
5900
5921
|
let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];
|
|
@@ -6014,7 +6035,7 @@ function createCompatVue(createApp, createSingletonApp) {
|
|
|
6014
6035
|
return vm;
|
|
6015
6036
|
}
|
|
6016
6037
|
}
|
|
6017
|
-
Vue.version = `2.6.14-compat:${"3.2.
|
|
6038
|
+
Vue.version = `2.6.14-compat:${"3.2.32"}`;
|
|
6018
6039
|
Vue.config = singletonApp.config;
|
|
6019
6040
|
Vue.use = (p, ...options) => {
|
|
6020
6041
|
if (p && isFunction(p.install)) {
|
|
@@ -6443,6 +6464,9 @@ function createAppContext() {
|
|
|
6443
6464
|
let uid = 0;
|
|
6444
6465
|
function createAppAPI(render, hydrate) {
|
|
6445
6466
|
return function createApp(rootComponent, rootProps = null) {
|
|
6467
|
+
if (!isFunction(rootComponent)) {
|
|
6468
|
+
rootComponent = Object.assign({}, rootComponent);
|
|
6469
|
+
}
|
|
6446
6470
|
if (rootProps != null && !isObject(rootProps)) {
|
|
6447
6471
|
(process.env.NODE_ENV !== 'production') && warn$1(`root props passed to app.mount() must be an object.`);
|
|
6448
6472
|
rootProps = null;
|
|
@@ -6645,6 +6669,9 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
6645
6669
|
if (!isArray(existing)) {
|
|
6646
6670
|
if (_isString) {
|
|
6647
6671
|
refs[ref] = [refValue];
|
|
6672
|
+
if (hasOwn(setupState, ref)) {
|
|
6673
|
+
setupState[ref] = refs[ref];
|
|
6674
|
+
}
|
|
6648
6675
|
}
|
|
6649
6676
|
else {
|
|
6650
6677
|
ref.value = [refValue];
|
|
@@ -6845,7 +6872,8 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
6845
6872
|
// e.g. <option :value="obj">, <input type="checkbox" :true-value="1">
|
|
6846
6873
|
const forcePatchValue = (type === 'input' && dirs) || type === 'option';
|
|
6847
6874
|
// skip props & children if this is hoisted static nodes
|
|
6848
|
-
|
|
6875
|
+
// #5405 in dev, always hydrate children for HMR
|
|
6876
|
+
if ((process.env.NODE_ENV !== 'production') || forcePatchValue || patchFlag !== -1 /* HOISTED */) {
|
|
6849
6877
|
if (dirs) {
|
|
6850
6878
|
invokeDirectiveHook(vnode, null, parentComponent, 'created');
|
|
6851
6879
|
}
|
|
@@ -7020,7 +7048,7 @@ function startMeasure(instance, type) {
|
|
|
7020
7048
|
perf.mark(`vue-${type}-${instance.uid}`);
|
|
7021
7049
|
}
|
|
7022
7050
|
if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) {
|
|
7023
|
-
devtoolsPerfStart(instance, type,
|
|
7051
|
+
devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now());
|
|
7024
7052
|
}
|
|
7025
7053
|
}
|
|
7026
7054
|
function endMeasure(instance, type) {
|
|
@@ -7033,7 +7061,7 @@ function endMeasure(instance, type) {
|
|
|
7033
7061
|
perf.clearMarks(endTag);
|
|
7034
7062
|
}
|
|
7035
7063
|
if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) {
|
|
7036
|
-
devtoolsPerfEnd(instance, type,
|
|
7064
|
+
devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now());
|
|
7037
7065
|
}
|
|
7038
7066
|
}
|
|
7039
7067
|
function isSupported() {
|
|
@@ -10050,9 +10078,11 @@ const PublicInstanceProxyHandlers = {
|
|
|
10050
10078
|
const { data, setupState, ctx } = instance;
|
|
10051
10079
|
if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) {
|
|
10052
10080
|
setupState[key] = value;
|
|
10081
|
+
return true;
|
|
10053
10082
|
}
|
|
10054
10083
|
else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
|
|
10055
10084
|
data[key] = value;
|
|
10085
|
+
return true;
|
|
10056
10086
|
}
|
|
10057
10087
|
else if (hasOwn(instance.props, key)) {
|
|
10058
10088
|
(process.env.NODE_ENV !== 'production') &&
|
|
@@ -10088,6 +10118,16 @@ const PublicInstanceProxyHandlers = {
|
|
|
10088
10118
|
hasOwn(ctx, key) ||
|
|
10089
10119
|
hasOwn(publicPropertiesMap, key) ||
|
|
10090
10120
|
hasOwn(appContext.config.globalProperties, key));
|
|
10121
|
+
},
|
|
10122
|
+
defineProperty(target, key, descriptor) {
|
|
10123
|
+
if (descriptor.get != null) {
|
|
10124
|
+
// invalidate key cache of a getter based property #5417
|
|
10125
|
+
target.$.accessCache[key] = 0;
|
|
10126
|
+
}
|
|
10127
|
+
else if (hasOwn(descriptor, 'value')) {
|
|
10128
|
+
this.set(target, key, descriptor.value, null);
|
|
10129
|
+
}
|
|
10130
|
+
return Reflect.defineProperty(target, key, descriptor);
|
|
10091
10131
|
}
|
|
10092
10132
|
};
|
|
10093
10133
|
if ((process.env.NODE_ENV !== 'production') && !false) {
|
|
@@ -11002,7 +11042,7 @@ function isMemoSame(cached, memo) {
|
|
|
11002
11042
|
}
|
|
11003
11043
|
|
|
11004
11044
|
// Core API ------------------------------------------------------------------
|
|
11005
|
-
const version = "3.2.
|
|
11045
|
+
const version = "3.2.32";
|
|
11006
11046
|
const _ssrUtils = {
|
|
11007
11047
|
createComponentInstance,
|
|
11008
11048
|
setupComponent,
|