@vue/compat 3.2.27 → 3.2.31
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 +43 -43
- package/dist/vue.cjs.js +215 -162
- package/dist/vue.cjs.prod.js +165 -110
- package/dist/vue.esm-browser.js +204 -153
- package/dist/vue.esm-browser.prod.js +1 -1
- package/dist/vue.esm-bundler.js +206 -155
- package/dist/vue.global.js +203 -152
- package/dist/vue.global.prod.js +1 -1
- package/dist/vue.runtime.esm-browser.js +189 -142
- package/dist/vue.runtime.esm-browser.prod.js +1 -1
- package/dist/vue.runtime.esm-bundler.js +191 -144
- package/dist/vue.runtime.global.js +188 -141
- package/dist/vue.runtime.global.prod.js +1 -1
- package/package.json +5 -5
|
@@ -132,7 +132,15 @@ const SVG_TAGS = 'svg,animate,animateMotion,animateTransform,circle,clipPath,col
|
|
|
132
132
|
'mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,' +
|
|
133
133
|
'polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,' +
|
|
134
134
|
'text,textPath,title,tspan,unknown,use,view';
|
|
135
|
+
/**
|
|
136
|
+
* Compiler only.
|
|
137
|
+
* Do NOT use in runtime code paths unless behind `true` flag.
|
|
138
|
+
*/
|
|
135
139
|
const isHTMLTag = /*#__PURE__*/ makeMap(HTML_TAGS);
|
|
140
|
+
/**
|
|
141
|
+
* Compiler only.
|
|
142
|
+
* Do NOT use in runtime code paths unless behind `true` flag.
|
|
143
|
+
*/
|
|
136
144
|
const isSVGTag = /*#__PURE__*/ makeMap(SVG_TAGS);
|
|
137
145
|
|
|
138
146
|
function looseCompareArrays(a, b) {
|
|
@@ -190,13 +198,15 @@ function looseIndexOf(arr, val) {
|
|
|
190
198
|
* @private
|
|
191
199
|
*/
|
|
192
200
|
const toDisplayString = (val) => {
|
|
193
|
-
return val
|
|
194
|
-
?
|
|
195
|
-
:
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
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);
|
|
200
210
|
};
|
|
201
211
|
const replacer = (_key, val) => {
|
|
202
212
|
// can't use isRef here since @vue/shared has no deps
|
|
@@ -270,6 +280,7 @@ const isReservedProp = /*#__PURE__*/ makeMap(
|
|
|
270
280
|
'onVnodeBeforeMount,onVnodeMounted,' +
|
|
271
281
|
'onVnodeBeforeUpdate,onVnodeUpdated,' +
|
|
272
282
|
'onVnodeBeforeUnmount,onVnodeUnmounted');
|
|
283
|
+
const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo');
|
|
273
284
|
const cacheStringFunction = (fn) => {
|
|
274
285
|
const cache = Object.create(null);
|
|
275
286
|
return ((str) => {
|
|
@@ -335,7 +346,6 @@ function warn(msg, ...args) {
|
|
|
335
346
|
}
|
|
336
347
|
|
|
337
348
|
let activeEffectScope;
|
|
338
|
-
const effectScopeStack = [];
|
|
339
349
|
class EffectScope {
|
|
340
350
|
constructor(detached = false) {
|
|
341
351
|
this.active = true;
|
|
@@ -350,11 +360,11 @@ class EffectScope {
|
|
|
350
360
|
run(fn) {
|
|
351
361
|
if (this.active) {
|
|
352
362
|
try {
|
|
353
|
-
this
|
|
363
|
+
activeEffectScope = this;
|
|
354
364
|
return fn();
|
|
355
365
|
}
|
|
356
366
|
finally {
|
|
357
|
-
this.
|
|
367
|
+
activeEffectScope = this.parent;
|
|
358
368
|
}
|
|
359
369
|
}
|
|
360
370
|
else {
|
|
@@ -362,23 +372,24 @@ class EffectScope {
|
|
|
362
372
|
}
|
|
363
373
|
}
|
|
364
374
|
on() {
|
|
365
|
-
|
|
366
|
-
effectScopeStack.push(this);
|
|
367
|
-
activeEffectScope = this;
|
|
368
|
-
}
|
|
375
|
+
activeEffectScope = this;
|
|
369
376
|
}
|
|
370
377
|
off() {
|
|
371
|
-
|
|
372
|
-
effectScopeStack.pop();
|
|
373
|
-
activeEffectScope = effectScopeStack[effectScopeStack.length - 1];
|
|
374
|
-
}
|
|
378
|
+
activeEffectScope = this.parent;
|
|
375
379
|
}
|
|
376
380
|
stop(fromParent) {
|
|
377
381
|
if (this.active) {
|
|
378
|
-
|
|
379
|
-
this.
|
|
382
|
+
let i, l;
|
|
383
|
+
for (i = 0, l = this.effects.length; i < l; i++) {
|
|
384
|
+
this.effects[i].stop();
|
|
385
|
+
}
|
|
386
|
+
for (i = 0, l = this.cleanups.length; i < l; i++) {
|
|
387
|
+
this.cleanups[i]();
|
|
388
|
+
}
|
|
380
389
|
if (this.scopes) {
|
|
381
|
-
this.scopes.
|
|
390
|
+
for (i = 0, l = this.scopes.length; i < l; i++) {
|
|
391
|
+
this.scopes[i].stop(true);
|
|
392
|
+
}
|
|
382
393
|
}
|
|
383
394
|
// nested scope, dereference from parent to avoid memory leaks
|
|
384
395
|
if (this.parent && !fromParent) {
|
|
@@ -396,8 +407,7 @@ class EffectScope {
|
|
|
396
407
|
function effectScope(detached) {
|
|
397
408
|
return new EffectScope(detached);
|
|
398
409
|
}
|
|
399
|
-
function recordEffectScope(effect, scope) {
|
|
400
|
-
scope = scope || activeEffectScope;
|
|
410
|
+
function recordEffectScope(effect, scope = activeEffectScope) {
|
|
401
411
|
if (scope && scope.active) {
|
|
402
412
|
scope.effects.push(effect);
|
|
403
413
|
}
|
|
@@ -460,7 +470,6 @@ let trackOpBit = 1;
|
|
|
460
470
|
* When recursion depth is greater, fall back to using a full cleanup.
|
|
461
471
|
*/
|
|
462
472
|
const maxMarkerBits = 30;
|
|
463
|
-
const effectStack = [];
|
|
464
473
|
let activeEffect;
|
|
465
474
|
const ITERATE_KEY = Symbol('iterate' );
|
|
466
475
|
const MAP_KEY_ITERATE_KEY = Symbol('Map key iterate' );
|
|
@@ -470,35 +479,42 @@ class ReactiveEffect {
|
|
|
470
479
|
this.scheduler = scheduler;
|
|
471
480
|
this.active = true;
|
|
472
481
|
this.deps = [];
|
|
482
|
+
this.parent = undefined;
|
|
473
483
|
recordEffectScope(this, scope);
|
|
474
484
|
}
|
|
475
485
|
run() {
|
|
476
486
|
if (!this.active) {
|
|
477
487
|
return this.fn();
|
|
478
488
|
}
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
if (effectTrackDepth <= maxMarkerBits) {
|
|
485
|
-
initDepMarkers(this);
|
|
486
|
-
}
|
|
487
|
-
else {
|
|
488
|
-
cleanupEffect(this);
|
|
489
|
-
}
|
|
490
|
-
return this.fn();
|
|
489
|
+
let parent = activeEffect;
|
|
490
|
+
let lastShouldTrack = shouldTrack;
|
|
491
|
+
while (parent) {
|
|
492
|
+
if (parent === this) {
|
|
493
|
+
return;
|
|
491
494
|
}
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
495
|
+
parent = parent.parent;
|
|
496
|
+
}
|
|
497
|
+
try {
|
|
498
|
+
this.parent = activeEffect;
|
|
499
|
+
activeEffect = this;
|
|
500
|
+
shouldTrack = true;
|
|
501
|
+
trackOpBit = 1 << ++effectTrackDepth;
|
|
502
|
+
if (effectTrackDepth <= maxMarkerBits) {
|
|
503
|
+
initDepMarkers(this);
|
|
501
504
|
}
|
|
505
|
+
else {
|
|
506
|
+
cleanupEffect(this);
|
|
507
|
+
}
|
|
508
|
+
return this.fn();
|
|
509
|
+
}
|
|
510
|
+
finally {
|
|
511
|
+
if (effectTrackDepth <= maxMarkerBits) {
|
|
512
|
+
finalizeDepMarkers(this);
|
|
513
|
+
}
|
|
514
|
+
trackOpBit = 1 << --effectTrackDepth;
|
|
515
|
+
activeEffect = this.parent;
|
|
516
|
+
shouldTrack = lastShouldTrack;
|
|
517
|
+
this.parent = undefined;
|
|
502
518
|
}
|
|
503
519
|
}
|
|
504
520
|
stop() {
|
|
@@ -546,32 +562,24 @@ function pauseTracking() {
|
|
|
546
562
|
trackStack.push(shouldTrack);
|
|
547
563
|
shouldTrack = false;
|
|
548
564
|
}
|
|
549
|
-
function enableTracking() {
|
|
550
|
-
trackStack.push(shouldTrack);
|
|
551
|
-
shouldTrack = true;
|
|
552
|
-
}
|
|
553
565
|
function resetTracking() {
|
|
554
566
|
const last = trackStack.pop();
|
|
555
567
|
shouldTrack = last === undefined ? true : last;
|
|
556
568
|
}
|
|
557
569
|
function track(target, type, key) {
|
|
558
|
-
if (
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
570
|
+
if (shouldTrack && activeEffect) {
|
|
571
|
+
let depsMap = targetMap.get(target);
|
|
572
|
+
if (!depsMap) {
|
|
573
|
+
targetMap.set(target, (depsMap = new Map()));
|
|
574
|
+
}
|
|
575
|
+
let dep = depsMap.get(key);
|
|
576
|
+
if (!dep) {
|
|
577
|
+
depsMap.set(key, (dep = createDep()));
|
|
578
|
+
}
|
|
579
|
+
const eventInfo = { effect: activeEffect, target, type, key }
|
|
580
|
+
;
|
|
581
|
+
trackEffects(dep, eventInfo);
|
|
568
582
|
}
|
|
569
|
-
const eventInfo = { effect: activeEffect, target, type, key }
|
|
570
|
-
;
|
|
571
|
-
trackEffects(dep, eventInfo);
|
|
572
|
-
}
|
|
573
|
-
function isTracking() {
|
|
574
|
-
return shouldTrack && activeEffect !== undefined;
|
|
575
583
|
}
|
|
576
584
|
function trackEffects(dep, debuggerEventExtraInfo) {
|
|
577
585
|
let shouldTrack = false;
|
|
@@ -732,6 +740,9 @@ function createGetter(isReadonly = false, shallow = false) {
|
|
|
732
740
|
else if (key === "__v_isReadonly" /* IS_READONLY */) {
|
|
733
741
|
return isReadonly;
|
|
734
742
|
}
|
|
743
|
+
else if (key === "__v_isShallow" /* IS_SHALLOW */) {
|
|
744
|
+
return shallow;
|
|
745
|
+
}
|
|
735
746
|
else if (key === "__v_raw" /* RAW */ &&
|
|
736
747
|
receiver ===
|
|
737
748
|
(isReadonly
|
|
@@ -776,9 +787,14 @@ const shallowSet = /*#__PURE__*/ createSetter(true);
|
|
|
776
787
|
function createSetter(shallow = false) {
|
|
777
788
|
return function set(target, key, value, receiver) {
|
|
778
789
|
let oldValue = target[key];
|
|
790
|
+
if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) {
|
|
791
|
+
return false;
|
|
792
|
+
}
|
|
779
793
|
if (!shallow && !isReadonly(value)) {
|
|
780
|
-
|
|
781
|
-
|
|
794
|
+
if (!isShallow(value)) {
|
|
795
|
+
value = toRaw(value);
|
|
796
|
+
oldValue = toRaw(oldValue);
|
|
797
|
+
}
|
|
782
798
|
if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
|
|
783
799
|
oldValue.value = value;
|
|
784
800
|
return true;
|
|
@@ -1165,7 +1181,7 @@ function getTargetType(value) {
|
|
|
1165
1181
|
}
|
|
1166
1182
|
function reactive(target) {
|
|
1167
1183
|
// if trying to observe a readonly proxy, return the readonly version.
|
|
1168
|
-
if (target
|
|
1184
|
+
if (isReadonly(target)) {
|
|
1169
1185
|
return target;
|
|
1170
1186
|
}
|
|
1171
1187
|
return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap);
|
|
@@ -1230,6 +1246,9 @@ function isReactive(value) {
|
|
|
1230
1246
|
function isReadonly(value) {
|
|
1231
1247
|
return !!(value && value["__v_isReadonly" /* IS_READONLY */]);
|
|
1232
1248
|
}
|
|
1249
|
+
function isShallow(value) {
|
|
1250
|
+
return !!(value && value["__v_isShallow" /* IS_SHALLOW */]);
|
|
1251
|
+
}
|
|
1233
1252
|
function isProxy(value) {
|
|
1234
1253
|
return isReactive(value) || isReadonly(value);
|
|
1235
1254
|
}
|
|
@@ -1245,13 +1264,10 @@ const toReactive = (value) => isObject(value) ? reactive(value) : value;
|
|
|
1245
1264
|
const toReadonly = (value) => isObject(value) ? readonly(value) : value;
|
|
1246
1265
|
|
|
1247
1266
|
function trackRefValue(ref) {
|
|
1248
|
-
if (
|
|
1267
|
+
if (shouldTrack && activeEffect) {
|
|
1249
1268
|
ref = toRaw(ref);
|
|
1250
|
-
if (!ref.dep) {
|
|
1251
|
-
ref.dep = createDep();
|
|
1252
|
-
}
|
|
1253
1269
|
{
|
|
1254
|
-
trackEffects(ref.dep, {
|
|
1270
|
+
trackEffects(ref.dep || (ref.dep = createDep()), {
|
|
1255
1271
|
target: ref,
|
|
1256
1272
|
type: "get" /* GET */,
|
|
1257
1273
|
key: 'value'
|
|
@@ -1273,7 +1289,7 @@ function triggerRefValue(ref, newVal) {
|
|
|
1273
1289
|
}
|
|
1274
1290
|
}
|
|
1275
1291
|
function isRef(r) {
|
|
1276
|
-
return
|
|
1292
|
+
return !!(r && r.__v_isRef === true);
|
|
1277
1293
|
}
|
|
1278
1294
|
function ref(value) {
|
|
1279
1295
|
return createRef(value, false);
|
|
@@ -1288,22 +1304,22 @@ function createRef(rawValue, shallow) {
|
|
|
1288
1304
|
return new RefImpl(rawValue, shallow);
|
|
1289
1305
|
}
|
|
1290
1306
|
class RefImpl {
|
|
1291
|
-
constructor(value,
|
|
1292
|
-
this.
|
|
1307
|
+
constructor(value, __v_isShallow) {
|
|
1308
|
+
this.__v_isShallow = __v_isShallow;
|
|
1293
1309
|
this.dep = undefined;
|
|
1294
1310
|
this.__v_isRef = true;
|
|
1295
|
-
this._rawValue =
|
|
1296
|
-
this._value =
|
|
1311
|
+
this._rawValue = __v_isShallow ? value : toRaw(value);
|
|
1312
|
+
this._value = __v_isShallow ? value : toReactive(value);
|
|
1297
1313
|
}
|
|
1298
1314
|
get value() {
|
|
1299
1315
|
trackRefValue(this);
|
|
1300
1316
|
return this._value;
|
|
1301
1317
|
}
|
|
1302
1318
|
set value(newVal) {
|
|
1303
|
-
newVal = this.
|
|
1319
|
+
newVal = this.__v_isShallow ? newVal : toRaw(newVal);
|
|
1304
1320
|
if (hasChanged(newVal, this._rawValue)) {
|
|
1305
1321
|
this._rawValue = newVal;
|
|
1306
|
-
this._value = this.
|
|
1322
|
+
this._value = this.__v_isShallow ? newVal : toReactive(newVal);
|
|
1307
1323
|
triggerRefValue(this, newVal);
|
|
1308
1324
|
}
|
|
1309
1325
|
}
|
|
@@ -1386,22 +1402,23 @@ class ComputedRefImpl {
|
|
|
1386
1402
|
constructor(getter, _setter, isReadonly, isSSR) {
|
|
1387
1403
|
this._setter = _setter;
|
|
1388
1404
|
this.dep = undefined;
|
|
1389
|
-
this._dirty = true;
|
|
1390
1405
|
this.__v_isRef = true;
|
|
1406
|
+
this._dirty = true;
|
|
1391
1407
|
this.effect = new ReactiveEffect(getter, () => {
|
|
1392
1408
|
if (!this._dirty) {
|
|
1393
1409
|
this._dirty = true;
|
|
1394
1410
|
triggerRefValue(this);
|
|
1395
1411
|
}
|
|
1396
1412
|
});
|
|
1397
|
-
this.effect.
|
|
1413
|
+
this.effect.computed = this;
|
|
1414
|
+
this.effect.active = this._cacheable = !isSSR;
|
|
1398
1415
|
this["__v_isReadonly" /* IS_READONLY */] = isReadonly;
|
|
1399
1416
|
}
|
|
1400
1417
|
get value() {
|
|
1401
1418
|
// the computed ref may get wrapped by other proxies e.g. readonly() #3376
|
|
1402
1419
|
const self = toRaw(this);
|
|
1403
1420
|
trackRefValue(self);
|
|
1404
|
-
if (self._dirty) {
|
|
1421
|
+
if (self._dirty || !self._cacheable) {
|
|
1405
1422
|
self._dirty = false;
|
|
1406
1423
|
self._value = self.effect.run();
|
|
1407
1424
|
}
|
|
@@ -1578,7 +1595,7 @@ const ErrorTypeStrings = {
|
|
|
1578
1595
|
[12 /* FUNCTION_REF */]: 'ref function',
|
|
1579
1596
|
[13 /* ASYNC_COMPONENT_LOADER */]: 'async component loader',
|
|
1580
1597
|
[14 /* SCHEDULER */]: 'scheduler flush. This is likely a Vue internals bug. ' +
|
|
1581
|
-
'Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/
|
|
1598
|
+
'Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core'
|
|
1582
1599
|
};
|
|
1583
1600
|
function callWithErrorHandling(fn, instance, type, args) {
|
|
1584
1601
|
let res;
|
|
@@ -2083,23 +2100,23 @@ const deprecationData = {
|
|
|
2083
2100
|
["GLOBAL_MOUNT" /* GLOBAL_MOUNT */]: {
|
|
2084
2101
|
message: `The global app bootstrapping API has changed: vm.$mount() and the "el" ` +
|
|
2085
2102
|
`option have been removed. Use createApp(RootComponent).mount() instead.`,
|
|
2086
|
-
link: `https://v3.vuejs.org/
|
|
2103
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/global-api.html#mounting-app-instance`
|
|
2087
2104
|
},
|
|
2088
2105
|
["GLOBAL_MOUNT_CONTAINER" /* GLOBAL_MOUNT_CONTAINER */]: {
|
|
2089
2106
|
message: `Vue detected directives on the mount container. ` +
|
|
2090
2107
|
`In Vue 3, the container is no longer considered part of the template ` +
|
|
2091
2108
|
`and will not be processed/replaced.`,
|
|
2092
|
-
link: `https://v3.vuejs.org/
|
|
2109
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/mount-changes.html`
|
|
2093
2110
|
},
|
|
2094
2111
|
["GLOBAL_EXTEND" /* GLOBAL_EXTEND */]: {
|
|
2095
2112
|
message: `Vue.extend() has been removed in Vue 3. ` +
|
|
2096
2113
|
`Use defineComponent() instead.`,
|
|
2097
|
-
link: `https://
|
|
2114
|
+
link: `https://vuejs.org/api/general.html#definecomponent`
|
|
2098
2115
|
},
|
|
2099
2116
|
["GLOBAL_PROTOTYPE" /* GLOBAL_PROTOTYPE */]: {
|
|
2100
2117
|
message: `Vue.prototype is no longer available in Vue 3. ` +
|
|
2101
2118
|
`Use app.config.globalProperties instead.`,
|
|
2102
|
-
link: `https://v3.vuejs.org/
|
|
2119
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/global-api.html#vue-prototype-replaced-by-config-globalproperties`
|
|
2103
2120
|
},
|
|
2104
2121
|
["GLOBAL_SET" /* GLOBAL_SET */]: {
|
|
2105
2122
|
message: `Vue.set() has been removed as it is no longer needed in Vue 3. ` +
|
|
@@ -2112,7 +2129,7 @@ const deprecationData = {
|
|
|
2112
2129
|
["GLOBAL_OBSERVABLE" /* GLOBAL_OBSERVABLE */]: {
|
|
2113
2130
|
message: `Vue.observable() has been removed. ` +
|
|
2114
2131
|
`Use \`import { reactive } from "vue"\` from Composition API instead.`,
|
|
2115
|
-
link: `https://
|
|
2132
|
+
link: `https://vuejs.org/api/reactivity-core.html#reactive`
|
|
2116
2133
|
},
|
|
2117
2134
|
["GLOBAL_PRIVATE_UTIL" /* GLOBAL_PRIVATE_UTIL */]: {
|
|
2118
2135
|
message: `Vue.util has been removed. Please refactor to avoid its usage ` +
|
|
@@ -2126,16 +2143,16 @@ const deprecationData = {
|
|
|
2126
2143
|
["CONFIG_DEVTOOLS" /* CONFIG_DEVTOOLS */]: {
|
|
2127
2144
|
message: `config.devtools has been removed. To enable devtools for ` +
|
|
2128
2145
|
`production, configure the __VUE_PROD_DEVTOOLS__ compile-time flag.`,
|
|
2129
|
-
link: `https://github.com/vuejs/
|
|
2146
|
+
link: `https://github.com/vuejs/core/tree/main/packages/vue#bundler-build-feature-flags`
|
|
2130
2147
|
},
|
|
2131
2148
|
["CONFIG_KEY_CODES" /* CONFIG_KEY_CODES */]: {
|
|
2132
2149
|
message: `config.keyCodes has been removed. ` +
|
|
2133
2150
|
`In Vue 3, you can directly use the kebab-case key names as v-on modifiers.`,
|
|
2134
|
-
link: `https://v3.vuejs.org/
|
|
2151
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/keycode-modifiers.html`
|
|
2135
2152
|
},
|
|
2136
2153
|
["CONFIG_PRODUCTION_TIP" /* CONFIG_PRODUCTION_TIP */]: {
|
|
2137
2154
|
message: `config.productionTip has been removed.`,
|
|
2138
|
-
link: `https://v3.vuejs.org/
|
|
2155
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/global-api.html#config-productiontip-removed`
|
|
2139
2156
|
},
|
|
2140
2157
|
["CONFIG_IGNORED_ELEMENTS" /* CONFIG_IGNORED_ELEMENTS */]: {
|
|
2141
2158
|
message: () => {
|
|
@@ -2148,7 +2165,7 @@ const deprecationData = {
|
|
|
2148
2165
|
}
|
|
2149
2166
|
return msg;
|
|
2150
2167
|
},
|
|
2151
|
-
link: `https://v3.vuejs.org/
|
|
2168
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/global-api.html#config-ignoredelements-is-now-config-iscustomelement`
|
|
2152
2169
|
},
|
|
2153
2170
|
["CONFIG_WHITESPACE" /* CONFIG_WHITESPACE */]: {
|
|
2154
2171
|
// this warning is only relevant in the full build when using runtime
|
|
@@ -2171,12 +2188,12 @@ const deprecationData = {
|
|
|
2171
2188
|
},
|
|
2172
2189
|
["INSTANCE_DESTROY" /* INSTANCE_DESTROY */]: {
|
|
2173
2190
|
message: `vm.$destroy() has been removed. Use app.unmount() instead.`,
|
|
2174
|
-
link: `https://
|
|
2191
|
+
link: `https://vuejs.org/api/application.html#app-unmount`
|
|
2175
2192
|
},
|
|
2176
2193
|
["INSTANCE_EVENT_EMITTER" /* INSTANCE_EVENT_EMITTER */]: {
|
|
2177
2194
|
message: `vm.$on/$once/$off() have been removed. ` +
|
|
2178
2195
|
`Use an external event emitter library instead.`,
|
|
2179
|
-
link: `https://v3.vuejs.org/
|
|
2196
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/events-api.html`
|
|
2180
2197
|
},
|
|
2181
2198
|
["INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */]: {
|
|
2182
2199
|
message: event => `"${event}" lifecycle events are no longer supported. From templates, ` +
|
|
@@ -2184,23 +2201,23 @@ const deprecationData = {
|
|
|
2184
2201
|
`should be changed to @vnode-${event.slice(5)}. ` +
|
|
2185
2202
|
`From JavaScript, use Composition API to dynamically register lifecycle ` +
|
|
2186
2203
|
`hooks.`,
|
|
2187
|
-
link: `https://v3.vuejs.org/
|
|
2204
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/vnode-lifecycle-events.html`
|
|
2188
2205
|
},
|
|
2189
2206
|
["INSTANCE_CHILDREN" /* INSTANCE_CHILDREN */]: {
|
|
2190
2207
|
message: `vm.$children has been removed. Consider refactoring your logic ` +
|
|
2191
2208
|
`to avoid relying on direct access to child components.`,
|
|
2192
|
-
link: `https://v3.vuejs.org/
|
|
2209
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/children.html`
|
|
2193
2210
|
},
|
|
2194
2211
|
["INSTANCE_LISTENERS" /* INSTANCE_LISTENERS */]: {
|
|
2195
2212
|
message: `vm.$listeners has been removed. In Vue 3, parent v-on listeners are ` +
|
|
2196
2213
|
`included in vm.$attrs and it is no longer necessary to separately use ` +
|
|
2197
2214
|
`v-on="$listeners" if you are already using v-bind="$attrs". ` +
|
|
2198
2215
|
`(Note: the Vue 3 behavior only applies if this compat config is disabled)`,
|
|
2199
|
-
link: `https://v3.vuejs.org/
|
|
2216
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/listeners-removed.html`
|
|
2200
2217
|
},
|
|
2201
2218
|
["INSTANCE_SCOPED_SLOTS" /* INSTANCE_SCOPED_SLOTS */]: {
|
|
2202
2219
|
message: `vm.$scopedSlots has been removed. Use vm.$slots instead.`,
|
|
2203
|
-
link: `https://v3.vuejs.org/
|
|
2220
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/slots-unification.html`
|
|
2204
2221
|
},
|
|
2205
2222
|
["INSTANCE_ATTRS_CLASS_STYLE" /* INSTANCE_ATTRS_CLASS_STYLE */]: {
|
|
2206
2223
|
message: componentName => `Component <${componentName || 'Anonymous'}> has \`inheritAttrs: false\` but is ` +
|
|
@@ -2211,17 +2228,17 @@ const deprecationData = {
|
|
|
2211
2228
|
`If you are binding $attrs to a non-root element and expecting ` +
|
|
2212
2229
|
`class/style to fallthrough on root, you will need to now manually bind ` +
|
|
2213
2230
|
`them on root via :class="$attrs.class".`,
|
|
2214
|
-
link: `https://v3.vuejs.org/
|
|
2231
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/attrs-includes-class-style.html`
|
|
2215
2232
|
},
|
|
2216
2233
|
["OPTIONS_DATA_FN" /* OPTIONS_DATA_FN */]: {
|
|
2217
2234
|
message: `The "data" option can no longer be a plain object. ` +
|
|
2218
2235
|
`Always use a function.`,
|
|
2219
|
-
link: `https://v3.vuejs.org/
|
|
2236
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/data-option.html`
|
|
2220
2237
|
},
|
|
2221
2238
|
["OPTIONS_DATA_MERGE" /* OPTIONS_DATA_MERGE */]: {
|
|
2222
2239
|
message: (key) => `Detected conflicting key "${key}" when merging data option values. ` +
|
|
2223
2240
|
`In Vue 3, data keys are merged shallowly and will override one another.`,
|
|
2224
|
-
link: `https://v3.vuejs.org/
|
|
2241
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/data-option.html#mixin-merge-behavior-change`
|
|
2225
2242
|
},
|
|
2226
2243
|
["OPTIONS_BEFORE_DESTROY" /* OPTIONS_BEFORE_DESTROY */]: {
|
|
2227
2244
|
message: `\`beforeDestroy\` has been renamed to \`beforeUnmount\`.`
|
|
@@ -2235,23 +2252,23 @@ const deprecationData = {
|
|
|
2235
2252
|
`If current usage is intended, you can disable the compat behavior and ` +
|
|
2236
2253
|
`suppress this warning with:` +
|
|
2237
2254
|
`\n\n configureCompat({ ${"WATCH_ARRAY" /* WATCH_ARRAY */}: false })\n`,
|
|
2238
|
-
link: `https://v3.vuejs.org/
|
|
2255
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/watch.html`
|
|
2239
2256
|
},
|
|
2240
2257
|
["PROPS_DEFAULT_THIS" /* PROPS_DEFAULT_THIS */]: {
|
|
2241
2258
|
message: (key) => `props default value function no longer has access to "this". The compat ` +
|
|
2242
2259
|
`build only offers access to this.$options.` +
|
|
2243
2260
|
`(found in prop "${key}")`,
|
|
2244
|
-
link: `https://v3.vuejs.org/
|
|
2261
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/props-default-this.html`
|
|
2245
2262
|
},
|
|
2246
2263
|
["CUSTOM_DIR" /* CUSTOM_DIR */]: {
|
|
2247
2264
|
message: (legacyHook, newHook) => `Custom directive hook "${legacyHook}" has been removed. ` +
|
|
2248
2265
|
`Use "${newHook}" instead.`,
|
|
2249
|
-
link: `https://v3.vuejs.org/
|
|
2266
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/custom-directives.html`
|
|
2250
2267
|
},
|
|
2251
2268
|
["V_ON_KEYCODE_MODIFIER" /* V_ON_KEYCODE_MODIFIER */]: {
|
|
2252
2269
|
message: `Using keyCode as v-on modifier is no longer supported. ` +
|
|
2253
2270
|
`Use kebab-case key name modifiers instead.`,
|
|
2254
|
-
link: `https://v3.vuejs.org/
|
|
2271
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/keycode-modifiers.html`
|
|
2255
2272
|
},
|
|
2256
2273
|
["ATTR_FALSE_VALUE" /* ATTR_FALSE_VALUE */]: {
|
|
2257
2274
|
message: (name) => `Attribute "${name}" with v-bind value \`false\` will render ` +
|
|
@@ -2259,7 +2276,7 @@ const deprecationData = {
|
|
|
2259
2276
|
`use \`null\` or \`undefined\` instead. If the usage is intended, ` +
|
|
2260
2277
|
`you can disable the compat behavior and suppress this warning with:` +
|
|
2261
2278
|
`\n\n configureCompat({ ${"ATTR_FALSE_VALUE" /* ATTR_FALSE_VALUE */}: false })\n`,
|
|
2262
|
-
link: `https://v3.vuejs.org/
|
|
2279
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/attribute-coercion.html`
|
|
2263
2280
|
},
|
|
2264
2281
|
["ATTR_ENUMERATED_COERCION" /* ATTR_ENUMERATED_COERCION */]: {
|
|
2265
2282
|
message: (name, value, coerced) => `Enumerated attribute "${name}" with v-bind value \`${value}\` will ` +
|
|
@@ -2268,7 +2285,7 @@ const deprecationData = {
|
|
|
2268
2285
|
`If the usage is intended, ` +
|
|
2269
2286
|
`you can disable the compat behavior and suppress this warning with:` +
|
|
2270
2287
|
`\n\n configureCompat({ ${"ATTR_ENUMERATED_COERCION" /* ATTR_ENUMERATED_COERCION */}: false })\n`,
|
|
2271
|
-
link: `https://v3.vuejs.org/
|
|
2288
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/attribute-coercion.html`
|
|
2272
2289
|
},
|
|
2273
2290
|
["TRANSITION_CLASSES" /* TRANSITION_CLASSES */]: {
|
|
2274
2291
|
message: `` // this feature cannot be runtime-detected
|
|
@@ -2279,7 +2296,7 @@ const deprecationData = {
|
|
|
2279
2296
|
`for styling, you can disable the compat behavior and suppress this ` +
|
|
2280
2297
|
`warning with:` +
|
|
2281
2298
|
`\n\n configureCompat({ ${"TRANSITION_GROUP_ROOT" /* TRANSITION_GROUP_ROOT */}: false })\n`,
|
|
2282
|
-
link: `https://v3.vuejs.org/
|
|
2299
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/transition-group.html`
|
|
2283
2300
|
},
|
|
2284
2301
|
["COMPONENT_ASYNC" /* COMPONENT_ASYNC */]: {
|
|
2285
2302
|
message: (comp) => {
|
|
@@ -2292,7 +2309,7 @@ const deprecationData = {
|
|
|
2292
2309
|
`warning with:` +
|
|
2293
2310
|
`\n\n configureCompat({ ${"COMPONENT_ASYNC" /* COMPONENT_ASYNC */}: false })\n`);
|
|
2294
2311
|
},
|
|
2295
|
-
link: `https://v3.vuejs.org/
|
|
2312
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/async-components.html`
|
|
2296
2313
|
},
|
|
2297
2314
|
["COMPONENT_FUNCTIONAL" /* COMPONENT_FUNCTIONAL */]: {
|
|
2298
2315
|
message: (comp) => {
|
|
@@ -2303,7 +2320,7 @@ const deprecationData = {
|
|
|
2303
2320
|
`components usage have been migrated and its compat behavior has ` +
|
|
2304
2321
|
`been disabled.`);
|
|
2305
2322
|
},
|
|
2306
|
-
link: `https://v3.vuejs.org/
|
|
2323
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/functional-components.html`
|
|
2307
2324
|
},
|
|
2308
2325
|
["COMPONENT_V_MODEL" /* COMPONENT_V_MODEL */]: {
|
|
2309
2326
|
message: (comp) => {
|
|
@@ -2313,27 +2330,27 @@ const deprecationData = {
|
|
|
2313
2330
|
(isArray(comp.props)
|
|
2314
2331
|
? comp.props.includes('modelValue')
|
|
2315
2332
|
: hasOwn(comp.props, 'modelValue'))) {
|
|
2316
|
-
return (`Component
|
|
2333
|
+
return (`Component declares "modelValue" prop, which is Vue 3 usage, but ` +
|
|
2317
2334
|
`is running under Vue 2 compat v-model behavior. You can ${configMsg}`);
|
|
2318
2335
|
}
|
|
2319
2336
|
return (`v-model usage on component has changed in Vue 3. Component that expects ` +
|
|
2320
2337
|
`to work with v-model should now use the "modelValue" prop and emit the ` +
|
|
2321
2338
|
`"update:modelValue" event. You can update the usage and then ${configMsg}`);
|
|
2322
2339
|
},
|
|
2323
|
-
link: `https://v3.vuejs.org/
|
|
2340
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html`
|
|
2324
2341
|
},
|
|
2325
2342
|
["RENDER_FUNCTION" /* RENDER_FUNCTION */]: {
|
|
2326
2343
|
message: `Vue 3's render function API has changed. ` +
|
|
2327
2344
|
`You can opt-in to the new API with:` +
|
|
2328
2345
|
`\n\n configureCompat({ ${"RENDER_FUNCTION" /* RENDER_FUNCTION */}: false })\n` +
|
|
2329
2346
|
`\n (This can also be done per-component via the "compatConfig" option.)`,
|
|
2330
|
-
link: `https://v3.vuejs.org/
|
|
2347
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/render-function-api.html`
|
|
2331
2348
|
},
|
|
2332
2349
|
["FILTERS" /* FILTERS */]: {
|
|
2333
2350
|
message: `filters have been removed in Vue 3. ` +
|
|
2334
2351
|
`The "|" symbol will be treated as native JavaScript bitwise OR operator. ` +
|
|
2335
2352
|
`Use method calls or computed properties instead.`,
|
|
2336
|
-
link: `https://v3.vuejs.org/
|
|
2353
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/filters.html`
|
|
2337
2354
|
},
|
|
2338
2355
|
["PRIVATE_APIS" /* PRIVATE_APIS */]: {
|
|
2339
2356
|
message: name => `"${name}" is a Vue 2 private API that no longer exists in Vue 3. ` +
|
|
@@ -2401,7 +2418,7 @@ function validateCompatConfig(config, instance) {
|
|
|
2401
2418
|
warn$1(`Deprecation config "${key}" is compiler-specific and you are ` +
|
|
2402
2419
|
`running a runtime-only build of Vue. This deprecation should be ` +
|
|
2403
2420
|
`configured via compiler options in your build setup instead.\n` +
|
|
2404
|
-
`Details: https://v3.vuejs.org/
|
|
2421
|
+
`Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`);
|
|
2405
2422
|
}
|
|
2406
2423
|
}
|
|
2407
2424
|
else {
|
|
@@ -2543,6 +2560,7 @@ const compatModelEventPrefix = `onModelCompat:`;
|
|
|
2543
2560
|
const warnedTypes = new WeakSet();
|
|
2544
2561
|
function convertLegacyVModelProps(vnode) {
|
|
2545
2562
|
const { type, shapeFlag, props, dynamicProps } = vnode;
|
|
2563
|
+
const comp = type;
|
|
2546
2564
|
if (shapeFlag & 6 /* COMPONENT */ && props && 'modelValue' in props) {
|
|
2547
2565
|
if (!isCompatEnabled("COMPONENT_V_MODEL" /* COMPONENT_V_MODEL */,
|
|
2548
2566
|
// this is a special case where we want to use the vnode component's
|
|
@@ -2551,16 +2569,18 @@ function convertLegacyVModelProps(vnode) {
|
|
|
2551
2569
|
{ type })) {
|
|
2552
2570
|
return;
|
|
2553
2571
|
}
|
|
2554
|
-
if (!warnedTypes.has(
|
|
2572
|
+
if (!warnedTypes.has(comp)) {
|
|
2555
2573
|
pushWarningContext(vnode);
|
|
2556
|
-
warnDeprecation("COMPONENT_V_MODEL" /* COMPONENT_V_MODEL */, { type },
|
|
2574
|
+
warnDeprecation("COMPONENT_V_MODEL" /* COMPONENT_V_MODEL */, { type }, comp);
|
|
2557
2575
|
popWarningContext();
|
|
2558
|
-
warnedTypes.add(
|
|
2576
|
+
warnedTypes.add(comp);
|
|
2559
2577
|
}
|
|
2560
2578
|
// v3 compiled model code -> v2 compat props
|
|
2561
2579
|
// modelValue -> value
|
|
2562
2580
|
// onUpdate:modelValue -> onModelCompat:input
|
|
2563
|
-
const
|
|
2581
|
+
const model = comp.model || {};
|
|
2582
|
+
applyModelFromMixins(model, comp.mixins);
|
|
2583
|
+
const { prop = 'value', event = 'input' } = model;
|
|
2564
2584
|
if (prop !== 'modelValue') {
|
|
2565
2585
|
props[prop] = props.modelValue;
|
|
2566
2586
|
delete props.modelValue;
|
|
@@ -2573,6 +2593,16 @@ function convertLegacyVModelProps(vnode) {
|
|
|
2573
2593
|
delete props['onUpdate:modelValue'];
|
|
2574
2594
|
}
|
|
2575
2595
|
}
|
|
2596
|
+
function applyModelFromMixins(model, mixins) {
|
|
2597
|
+
if (mixins) {
|
|
2598
|
+
mixins.forEach(m => {
|
|
2599
|
+
if (m.model)
|
|
2600
|
+
extend(model, m.model);
|
|
2601
|
+
if (m.mixins)
|
|
2602
|
+
applyModelFromMixins(model, m.mixins);
|
|
2603
|
+
});
|
|
2604
|
+
}
|
|
2605
|
+
}
|
|
2576
2606
|
function compatModelEmit(instance, event, args) {
|
|
2577
2607
|
if (!isCompatEnabled("COMPONENT_V_MODEL" /* COMPONENT_V_MODEL */, instance)) {
|
|
2578
2608
|
return;
|
|
@@ -3575,7 +3605,7 @@ function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
|
3575
3605
|
if (instance) {
|
|
3576
3606
|
// #2400
|
|
3577
3607
|
// to support `app.use` plugins,
|
|
3578
|
-
// fallback to appContext's `provides` if the
|
|
3608
|
+
// fallback to appContext's `provides` if the instance is at root
|
|
3579
3609
|
const provides = instance.parent == null
|
|
3580
3610
|
? instance.vnode.appContext && instance.vnode.appContext.provides
|
|
3581
3611
|
: instance.parent.provides;
|
|
@@ -3641,7 +3671,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
|
|
|
3641
3671
|
let isMultiSource = false;
|
|
3642
3672
|
if (isRef(source)) {
|
|
3643
3673
|
getter = () => source.value;
|
|
3644
|
-
forceTrigger =
|
|
3674
|
+
forceTrigger = isShallow(source);
|
|
3645
3675
|
}
|
|
3646
3676
|
else if (isReactive(source)) {
|
|
3647
3677
|
getter = () => source;
|
|
@@ -4535,7 +4565,7 @@ function matches(pattern, name) {
|
|
|
4535
4565
|
return pattern.some((p) => matches(p, name));
|
|
4536
4566
|
}
|
|
4537
4567
|
else if (isString(pattern)) {
|
|
4538
|
-
return pattern.split(',').
|
|
4568
|
+
return pattern.split(',').includes(name);
|
|
4539
4569
|
}
|
|
4540
4570
|
else if (pattern.test) {
|
|
4541
4571
|
return pattern.test(name);
|
|
@@ -4803,7 +4833,7 @@ function applyOptions(instance) {
|
|
|
4803
4833
|
warn$1(`Write operation failed: computed property "${key}" is readonly.`);
|
|
4804
4834
|
}
|
|
4805
4835
|
;
|
|
4806
|
-
const c = computed({
|
|
4836
|
+
const c = computed$1({
|
|
4807
4837
|
get,
|
|
4808
4838
|
set
|
|
4809
4839
|
});
|
|
@@ -5284,7 +5314,9 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
|
|
|
5284
5314
|
// attrs point to the same object so it should already have been updated.
|
|
5285
5315
|
if (attrs !== rawCurrentProps) {
|
|
5286
5316
|
for (const key in attrs) {
|
|
5287
|
-
if (!rawProps ||
|
|
5317
|
+
if (!rawProps ||
|
|
5318
|
+
(!hasOwn(rawProps, key) &&
|
|
5319
|
+
(!hasOwn(rawProps, key + 'Native')))) {
|
|
5288
5320
|
delete attrs[key];
|
|
5289
5321
|
hasAttrsChanged = true;
|
|
5290
5322
|
}
|
|
@@ -5787,7 +5819,6 @@ return withDirectives(h(comp), [
|
|
|
5787
5819
|
[bar, this.y]
|
|
5788
5820
|
])
|
|
5789
5821
|
*/
|
|
5790
|
-
const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo');
|
|
5791
5822
|
function validateDirectiveName(name) {
|
|
5792
5823
|
if (isBuiltInDirective(name)) {
|
|
5793
5824
|
warn$1('Do not use built-in directive ids as custom directive id: ' + name);
|
|
@@ -5922,7 +5953,7 @@ function createCompatVue(createApp, createSingletonApp) {
|
|
|
5922
5953
|
return vm;
|
|
5923
5954
|
}
|
|
5924
5955
|
}
|
|
5925
|
-
Vue.version = "3.2.
|
|
5956
|
+
Vue.version = `2.6.14-compat:${"3.2.31"}`;
|
|
5926
5957
|
Vue.config = singletonApp.config;
|
|
5927
5958
|
Vue.use = (p, ...options) => {
|
|
5928
5959
|
if (p && isFunction(p.install)) {
|
|
@@ -6746,7 +6777,8 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
6746
6777
|
// e.g. <option :value="obj">, <input type="checkbox" :true-value="1">
|
|
6747
6778
|
const forcePatchValue = (type === 'input' && dirs) || type === 'option';
|
|
6748
6779
|
// skip props & children if this is hoisted static nodes
|
|
6749
|
-
|
|
6780
|
+
// #5405 in dev, always hydrate children for HMR
|
|
6781
|
+
{
|
|
6750
6782
|
if (dirs) {
|
|
6751
6783
|
invokeDirectiveHook(vnode, null, parentComponent, 'created');
|
|
6752
6784
|
}
|
|
@@ -6911,6 +6943,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
6911
6943
|
return [hydrate, hydrateNode];
|
|
6912
6944
|
}
|
|
6913
6945
|
|
|
6946
|
+
/* eslint-disable no-restricted-globals */
|
|
6914
6947
|
let supported;
|
|
6915
6948
|
let perf;
|
|
6916
6949
|
function startMeasure(instance, type) {
|
|
@@ -6938,7 +6971,6 @@ function isSupported() {
|
|
|
6938
6971
|
if (supported !== undefined) {
|
|
6939
6972
|
return supported;
|
|
6940
6973
|
}
|
|
6941
|
-
/* eslint-disable no-restricted-globals */
|
|
6942
6974
|
if (typeof window !== 'undefined' && window.performance) {
|
|
6943
6975
|
supported = true;
|
|
6944
6976
|
perf = window.performance;
|
|
@@ -6946,7 +6978,6 @@ function isSupported() {
|
|
|
6946
6978
|
else {
|
|
6947
6979
|
supported = false;
|
|
6948
6980
|
}
|
|
6949
|
-
/* eslint-enable no-restricted-globals */
|
|
6950
6981
|
return supported;
|
|
6951
6982
|
}
|
|
6952
6983
|
|
|
@@ -9192,7 +9223,7 @@ function cloneVNode(vnode, extraProps, mergeRef = false) {
|
|
|
9192
9223
|
shapeFlag: vnode.shapeFlag,
|
|
9193
9224
|
// if the vnode is cloned with extra props, we can no longer assume its
|
|
9194
9225
|
// existing patch flag to be reliable and need to add the FULL_PROPS flag.
|
|
9195
|
-
// note:
|
|
9226
|
+
// note: preserve flag for fragments since they use the flag for children
|
|
9196
9227
|
// fast paths only.
|
|
9197
9228
|
patchFlag: extraProps && vnode.type !== Fragment
|
|
9198
9229
|
? patchFlag === -1 // hoisted node
|
|
@@ -9357,7 +9388,8 @@ function mergeProps(...args) {
|
|
|
9357
9388
|
else if (isOn(key)) {
|
|
9358
9389
|
const existing = ret[key];
|
|
9359
9390
|
const incoming = toMerge[key];
|
|
9360
|
-
if (
|
|
9391
|
+
if (incoming &&
|
|
9392
|
+
existing !== incoming &&
|
|
9361
9393
|
!(isArray(existing) && existing.includes(incoming))) {
|
|
9362
9394
|
ret[key] = existing
|
|
9363
9395
|
? [].concat(existing, incoming)
|
|
@@ -9633,7 +9665,7 @@ function legacyCheckKeyCodes(instance, eventKeyCode, key, builtInKeyCode, eventK
|
|
|
9633
9665
|
}
|
|
9634
9666
|
function isKeyNotMatch(expect, actual) {
|
|
9635
9667
|
if (isArray(expect)) {
|
|
9636
|
-
return expect.
|
|
9668
|
+
return !expect.includes(actual);
|
|
9637
9669
|
}
|
|
9638
9670
|
else {
|
|
9639
9671
|
return expect !== actual;
|
|
@@ -9712,7 +9744,7 @@ function installCompatInstanceProperties(map) {
|
|
|
9712
9744
|
extend(map, {
|
|
9713
9745
|
// needed by many libs / render fns
|
|
9714
9746
|
$vnode: i => i.vnode,
|
|
9715
|
-
// inject
|
|
9747
|
+
// inject additional properties into $options for compat
|
|
9716
9748
|
// e.g. vuex needs this.$options.parent
|
|
9717
9749
|
$options: i => {
|
|
9718
9750
|
const res = extend({}, resolveMergedOptions(i));
|
|
@@ -9900,9 +9932,11 @@ const PublicInstanceProxyHandlers = {
|
|
|
9900
9932
|
const { data, setupState, ctx } = instance;
|
|
9901
9933
|
if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) {
|
|
9902
9934
|
setupState[key] = value;
|
|
9935
|
+
return true;
|
|
9903
9936
|
}
|
|
9904
9937
|
else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
|
|
9905
9938
|
data[key] = value;
|
|
9939
|
+
return true;
|
|
9906
9940
|
}
|
|
9907
9941
|
else if (hasOwn(instance.props, key)) {
|
|
9908
9942
|
warn$1(`Attempting to mutate prop "${key}". Props are readonly.`, instance);
|
|
@@ -9936,6 +9970,15 @@ const PublicInstanceProxyHandlers = {
|
|
|
9936
9970
|
hasOwn(ctx, key) ||
|
|
9937
9971
|
hasOwn(publicPropertiesMap, key) ||
|
|
9938
9972
|
hasOwn(appContext.config.globalProperties, key));
|
|
9973
|
+
},
|
|
9974
|
+
defineProperty(target, key, descriptor) {
|
|
9975
|
+
if (descriptor.get != null) {
|
|
9976
|
+
this.set(target, key, descriptor.get(), null);
|
|
9977
|
+
}
|
|
9978
|
+
else if (descriptor.value != null) {
|
|
9979
|
+
this.set(target, key, descriptor.value, null);
|
|
9980
|
+
}
|
|
9981
|
+
return Reflect.defineProperty(target, key, descriptor);
|
|
9939
9982
|
}
|
|
9940
9983
|
};
|
|
9941
9984
|
{
|
|
@@ -10440,7 +10483,7 @@ function defineEmits() {
|
|
|
10440
10483
|
* instance properties when it is accessed by a parent component via template
|
|
10441
10484
|
* refs.
|
|
10442
10485
|
*
|
|
10443
|
-
* `<script setup>` components are closed by default - i.e.
|
|
10486
|
+
* `<script setup>` components are closed by default - i.e. variables inside
|
|
10444
10487
|
* the `<script setup>` scope is not exposed to parent unless explicitly exposed
|
|
10445
10488
|
* via `defineExpose`.
|
|
10446
10489
|
*
|
|
@@ -10643,7 +10686,7 @@ function initCustomFormatter() {
|
|
|
10643
10686
|
return [
|
|
10644
10687
|
'div',
|
|
10645
10688
|
{},
|
|
10646
|
-
['span', vueStyle, 'Reactive'],
|
|
10689
|
+
['span', vueStyle, isShallow(obj) ? 'ShallowReactive' : 'Reactive'],
|
|
10647
10690
|
'<',
|
|
10648
10691
|
formatValue(obj),
|
|
10649
10692
|
`>${isReadonly(obj) ? ` (readonly)` : ``}`
|
|
@@ -10653,7 +10696,7 @@ function initCustomFormatter() {
|
|
|
10653
10696
|
return [
|
|
10654
10697
|
'div',
|
|
10655
10698
|
{},
|
|
10656
|
-
['span', vueStyle, 'Readonly'],
|
|
10699
|
+
['span', vueStyle, isShallow(obj) ? 'ShallowReadonly' : 'Readonly'],
|
|
10657
10700
|
'<',
|
|
10658
10701
|
formatValue(obj),
|
|
10659
10702
|
'>'
|
|
@@ -10782,7 +10825,7 @@ function initCustomFormatter() {
|
|
|
10782
10825
|
}
|
|
10783
10826
|
}
|
|
10784
10827
|
function genRefFlag(v) {
|
|
10785
|
-
if (v
|
|
10828
|
+
if (isShallow(v)) {
|
|
10786
10829
|
return `ShallowRef`;
|
|
10787
10830
|
}
|
|
10788
10831
|
if (v.effect) {
|
|
@@ -10826,7 +10869,7 @@ function isMemoSame(cached, memo) {
|
|
|
10826
10869
|
}
|
|
10827
10870
|
|
|
10828
10871
|
// Core API ------------------------------------------------------------------
|
|
10829
|
-
const version = "3.2.
|
|
10872
|
+
const version = "3.2.31";
|
|
10830
10873
|
/**
|
|
10831
10874
|
* SSR utils for \@vue/server-renderer. Only exposed in cjs builds.
|
|
10832
10875
|
* @internal
|
|
@@ -10907,7 +10950,10 @@ const nodeOps = {
|
|
|
10907
10950
|
insertStaticContent(content, parent, anchor, isSVG, start, end) {
|
|
10908
10951
|
// <parent> before | first ... last | anchor </parent>
|
|
10909
10952
|
const before = anchor ? anchor.previousSibling : parent.lastChild;
|
|
10910
|
-
|
|
10953
|
+
// #5308 can only take cached path if:
|
|
10954
|
+
// - has a single root node
|
|
10955
|
+
// - nextSibling info is still available
|
|
10956
|
+
if (start && (start === end || start.nextSibling)) {
|
|
10911
10957
|
// cached
|
|
10912
10958
|
while (true) {
|
|
10913
10959
|
parent.insertBefore(start.cloneNode(true), anchor);
|
|
@@ -11257,7 +11303,7 @@ function patchStopImmediatePropagation(e, value) {
|
|
|
11257
11303
|
originalStop.call(e);
|
|
11258
11304
|
e._stopped = true;
|
|
11259
11305
|
};
|
|
11260
|
-
return value.map(fn => (e) => !e._stopped && fn(e));
|
|
11306
|
+
return value.map(fn => (e) => !e._stopped && fn && fn(e));
|
|
11261
11307
|
}
|
|
11262
11308
|
else {
|
|
11263
11309
|
return value;
|
|
@@ -12631,6 +12677,7 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
|
|
|
12631
12677
|
isProxy: isProxy,
|
|
12632
12678
|
isReactive: isReactive,
|
|
12633
12679
|
isReadonly: isReadonly,
|
|
12680
|
+
isShallow: isShallow,
|
|
12634
12681
|
customRef: customRef,
|
|
12635
12682
|
triggerRef: triggerRef,
|
|
12636
12683
|
shallowRef: shallowRef,
|
|
@@ -12795,4 +12842,4 @@ Vue.compile = (() => {
|
|
|
12795
12842
|
const { configureCompat: configureCompat$1 } = Vue;
|
|
12796
12843
|
|
|
12797
12844
|
export default Vue;
|
|
12798
|
-
export { BaseTransition, Comment, EffectScope, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, Transition, TransitionGroup, VueElement, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed$1 as computed, configureCompat$1 as configureCompat, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineProps, defineSSRCustomElement, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getTransitionRawChildren, guardReactiveProps, h, handleError, hydrate, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isVNode, markRaw, mergeDefaults, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter$1 as resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useSSRContext, useSlots, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn$1 as warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId };
|
|
12845
|
+
export { BaseTransition, Comment, EffectScope, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, Transition, TransitionGroup, VueElement, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed$1 as computed, configureCompat$1 as configureCompat, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineProps, defineSSRCustomElement, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getTransitionRawChildren, guardReactiveProps, h, handleError, hydrate, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isVNode, markRaw, mergeDefaults, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter$1 as resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useSSRContext, useSlots, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn$1 as warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId };
|