@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
|
@@ -135,7 +135,15 @@ var Vue = (function () {
|
|
|
135
135
|
'mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,' +
|
|
136
136
|
'polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,' +
|
|
137
137
|
'text,textPath,title,tspan,unknown,use,view';
|
|
138
|
+
/**
|
|
139
|
+
* Compiler only.
|
|
140
|
+
* Do NOT use in runtime code paths unless behind `true` flag.
|
|
141
|
+
*/
|
|
138
142
|
const isHTMLTag = /*#__PURE__*/ makeMap(HTML_TAGS);
|
|
143
|
+
/**
|
|
144
|
+
* Compiler only.
|
|
145
|
+
* Do NOT use in runtime code paths unless behind `true` flag.
|
|
146
|
+
*/
|
|
139
147
|
const isSVGTag = /*#__PURE__*/ makeMap(SVG_TAGS);
|
|
140
148
|
|
|
141
149
|
function looseCompareArrays(a, b) {
|
|
@@ -193,13 +201,15 @@ var Vue = (function () {
|
|
|
193
201
|
* @private
|
|
194
202
|
*/
|
|
195
203
|
const toDisplayString = (val) => {
|
|
196
|
-
return val
|
|
197
|
-
?
|
|
198
|
-
:
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
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);
|
|
203
213
|
};
|
|
204
214
|
const replacer = (_key, val) => {
|
|
205
215
|
// can't use isRef here since @vue/shared has no deps
|
|
@@ -273,6 +283,7 @@ var Vue = (function () {
|
|
|
273
283
|
'onVnodeBeforeMount,onVnodeMounted,' +
|
|
274
284
|
'onVnodeBeforeUpdate,onVnodeUpdated,' +
|
|
275
285
|
'onVnodeBeforeUnmount,onVnodeUnmounted');
|
|
286
|
+
const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo');
|
|
276
287
|
const cacheStringFunction = (fn) => {
|
|
277
288
|
const cache = Object.create(null);
|
|
278
289
|
return ((str) => {
|
|
@@ -338,7 +349,6 @@ var Vue = (function () {
|
|
|
338
349
|
}
|
|
339
350
|
|
|
340
351
|
let activeEffectScope;
|
|
341
|
-
const effectScopeStack = [];
|
|
342
352
|
class EffectScope {
|
|
343
353
|
constructor(detached = false) {
|
|
344
354
|
this.active = true;
|
|
@@ -353,11 +363,11 @@ var Vue = (function () {
|
|
|
353
363
|
run(fn) {
|
|
354
364
|
if (this.active) {
|
|
355
365
|
try {
|
|
356
|
-
this
|
|
366
|
+
activeEffectScope = this;
|
|
357
367
|
return fn();
|
|
358
368
|
}
|
|
359
369
|
finally {
|
|
360
|
-
this.
|
|
370
|
+
activeEffectScope = this.parent;
|
|
361
371
|
}
|
|
362
372
|
}
|
|
363
373
|
else {
|
|
@@ -365,23 +375,24 @@ var Vue = (function () {
|
|
|
365
375
|
}
|
|
366
376
|
}
|
|
367
377
|
on() {
|
|
368
|
-
|
|
369
|
-
effectScopeStack.push(this);
|
|
370
|
-
activeEffectScope = this;
|
|
371
|
-
}
|
|
378
|
+
activeEffectScope = this;
|
|
372
379
|
}
|
|
373
380
|
off() {
|
|
374
|
-
|
|
375
|
-
effectScopeStack.pop();
|
|
376
|
-
activeEffectScope = effectScopeStack[effectScopeStack.length - 1];
|
|
377
|
-
}
|
|
381
|
+
activeEffectScope = this.parent;
|
|
378
382
|
}
|
|
379
383
|
stop(fromParent) {
|
|
380
384
|
if (this.active) {
|
|
381
|
-
|
|
382
|
-
this.
|
|
385
|
+
let i, l;
|
|
386
|
+
for (i = 0, l = this.effects.length; i < l; i++) {
|
|
387
|
+
this.effects[i].stop();
|
|
388
|
+
}
|
|
389
|
+
for (i = 0, l = this.cleanups.length; i < l; i++) {
|
|
390
|
+
this.cleanups[i]();
|
|
391
|
+
}
|
|
383
392
|
if (this.scopes) {
|
|
384
|
-
this.scopes.
|
|
393
|
+
for (i = 0, l = this.scopes.length; i < l; i++) {
|
|
394
|
+
this.scopes[i].stop(true);
|
|
395
|
+
}
|
|
385
396
|
}
|
|
386
397
|
// nested scope, dereference from parent to avoid memory leaks
|
|
387
398
|
if (this.parent && !fromParent) {
|
|
@@ -399,8 +410,7 @@ var Vue = (function () {
|
|
|
399
410
|
function effectScope(detached) {
|
|
400
411
|
return new EffectScope(detached);
|
|
401
412
|
}
|
|
402
|
-
function recordEffectScope(effect, scope) {
|
|
403
|
-
scope = scope || activeEffectScope;
|
|
413
|
+
function recordEffectScope(effect, scope = activeEffectScope) {
|
|
404
414
|
if (scope && scope.active) {
|
|
405
415
|
scope.effects.push(effect);
|
|
406
416
|
}
|
|
@@ -463,7 +473,6 @@ var Vue = (function () {
|
|
|
463
473
|
* When recursion depth is greater, fall back to using a full cleanup.
|
|
464
474
|
*/
|
|
465
475
|
const maxMarkerBits = 30;
|
|
466
|
-
const effectStack = [];
|
|
467
476
|
let activeEffect;
|
|
468
477
|
const ITERATE_KEY = Symbol('iterate' );
|
|
469
478
|
const MAP_KEY_ITERATE_KEY = Symbol('Map key iterate' );
|
|
@@ -473,35 +482,42 @@ var Vue = (function () {
|
|
|
473
482
|
this.scheduler = scheduler;
|
|
474
483
|
this.active = true;
|
|
475
484
|
this.deps = [];
|
|
485
|
+
this.parent = undefined;
|
|
476
486
|
recordEffectScope(this, scope);
|
|
477
487
|
}
|
|
478
488
|
run() {
|
|
479
489
|
if (!this.active) {
|
|
480
490
|
return this.fn();
|
|
481
491
|
}
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
if (effectTrackDepth <= maxMarkerBits) {
|
|
488
|
-
initDepMarkers(this);
|
|
489
|
-
}
|
|
490
|
-
else {
|
|
491
|
-
cleanupEffect(this);
|
|
492
|
-
}
|
|
493
|
-
return this.fn();
|
|
492
|
+
let parent = activeEffect;
|
|
493
|
+
let lastShouldTrack = shouldTrack;
|
|
494
|
+
while (parent) {
|
|
495
|
+
if (parent === this) {
|
|
496
|
+
return;
|
|
494
497
|
}
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
498
|
+
parent = parent.parent;
|
|
499
|
+
}
|
|
500
|
+
try {
|
|
501
|
+
this.parent = activeEffect;
|
|
502
|
+
activeEffect = this;
|
|
503
|
+
shouldTrack = true;
|
|
504
|
+
trackOpBit = 1 << ++effectTrackDepth;
|
|
505
|
+
if (effectTrackDepth <= maxMarkerBits) {
|
|
506
|
+
initDepMarkers(this);
|
|
504
507
|
}
|
|
508
|
+
else {
|
|
509
|
+
cleanupEffect(this);
|
|
510
|
+
}
|
|
511
|
+
return this.fn();
|
|
512
|
+
}
|
|
513
|
+
finally {
|
|
514
|
+
if (effectTrackDepth <= maxMarkerBits) {
|
|
515
|
+
finalizeDepMarkers(this);
|
|
516
|
+
}
|
|
517
|
+
trackOpBit = 1 << --effectTrackDepth;
|
|
518
|
+
activeEffect = this.parent;
|
|
519
|
+
shouldTrack = lastShouldTrack;
|
|
520
|
+
this.parent = undefined;
|
|
505
521
|
}
|
|
506
522
|
}
|
|
507
523
|
stop() {
|
|
@@ -549,32 +565,24 @@ var Vue = (function () {
|
|
|
549
565
|
trackStack.push(shouldTrack);
|
|
550
566
|
shouldTrack = false;
|
|
551
567
|
}
|
|
552
|
-
function enableTracking() {
|
|
553
|
-
trackStack.push(shouldTrack);
|
|
554
|
-
shouldTrack = true;
|
|
555
|
-
}
|
|
556
568
|
function resetTracking() {
|
|
557
569
|
const last = trackStack.pop();
|
|
558
570
|
shouldTrack = last === undefined ? true : last;
|
|
559
571
|
}
|
|
560
572
|
function track(target, type, key) {
|
|
561
|
-
if (
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
573
|
+
if (shouldTrack && activeEffect) {
|
|
574
|
+
let depsMap = targetMap.get(target);
|
|
575
|
+
if (!depsMap) {
|
|
576
|
+
targetMap.set(target, (depsMap = new Map()));
|
|
577
|
+
}
|
|
578
|
+
let dep = depsMap.get(key);
|
|
579
|
+
if (!dep) {
|
|
580
|
+
depsMap.set(key, (dep = createDep()));
|
|
581
|
+
}
|
|
582
|
+
const eventInfo = { effect: activeEffect, target, type, key }
|
|
583
|
+
;
|
|
584
|
+
trackEffects(dep, eventInfo);
|
|
571
585
|
}
|
|
572
|
-
const eventInfo = { effect: activeEffect, target, type, key }
|
|
573
|
-
;
|
|
574
|
-
trackEffects(dep, eventInfo);
|
|
575
|
-
}
|
|
576
|
-
function isTracking() {
|
|
577
|
-
return shouldTrack && activeEffect !== undefined;
|
|
578
586
|
}
|
|
579
587
|
function trackEffects(dep, debuggerEventExtraInfo) {
|
|
580
588
|
let shouldTrack = false;
|
|
@@ -735,6 +743,9 @@ var Vue = (function () {
|
|
|
735
743
|
else if (key === "__v_isReadonly" /* IS_READONLY */) {
|
|
736
744
|
return isReadonly;
|
|
737
745
|
}
|
|
746
|
+
else if (key === "__v_isShallow" /* IS_SHALLOW */) {
|
|
747
|
+
return shallow;
|
|
748
|
+
}
|
|
738
749
|
else if (key === "__v_raw" /* RAW */ &&
|
|
739
750
|
receiver ===
|
|
740
751
|
(isReadonly
|
|
@@ -779,9 +790,14 @@ var Vue = (function () {
|
|
|
779
790
|
function createSetter(shallow = false) {
|
|
780
791
|
return function set(target, key, value, receiver) {
|
|
781
792
|
let oldValue = target[key];
|
|
793
|
+
if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) {
|
|
794
|
+
return false;
|
|
795
|
+
}
|
|
782
796
|
if (!shallow && !isReadonly(value)) {
|
|
783
|
-
|
|
784
|
-
|
|
797
|
+
if (!isShallow(value)) {
|
|
798
|
+
value = toRaw(value);
|
|
799
|
+
oldValue = toRaw(oldValue);
|
|
800
|
+
}
|
|
785
801
|
if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
|
|
786
802
|
oldValue.value = value;
|
|
787
803
|
return true;
|
|
@@ -1168,7 +1184,7 @@ var Vue = (function () {
|
|
|
1168
1184
|
}
|
|
1169
1185
|
function reactive(target) {
|
|
1170
1186
|
// if trying to observe a readonly proxy, return the readonly version.
|
|
1171
|
-
if (target
|
|
1187
|
+
if (isReadonly(target)) {
|
|
1172
1188
|
return target;
|
|
1173
1189
|
}
|
|
1174
1190
|
return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap);
|
|
@@ -1233,6 +1249,9 @@ var Vue = (function () {
|
|
|
1233
1249
|
function isReadonly(value) {
|
|
1234
1250
|
return !!(value && value["__v_isReadonly" /* IS_READONLY */]);
|
|
1235
1251
|
}
|
|
1252
|
+
function isShallow(value) {
|
|
1253
|
+
return !!(value && value["__v_isShallow" /* IS_SHALLOW */]);
|
|
1254
|
+
}
|
|
1236
1255
|
function isProxy(value) {
|
|
1237
1256
|
return isReactive(value) || isReadonly(value);
|
|
1238
1257
|
}
|
|
@@ -1248,13 +1267,10 @@ var Vue = (function () {
|
|
|
1248
1267
|
const toReadonly = (value) => isObject(value) ? readonly(value) : value;
|
|
1249
1268
|
|
|
1250
1269
|
function trackRefValue(ref) {
|
|
1251
|
-
if (
|
|
1270
|
+
if (shouldTrack && activeEffect) {
|
|
1252
1271
|
ref = toRaw(ref);
|
|
1253
|
-
if (!ref.dep) {
|
|
1254
|
-
ref.dep = createDep();
|
|
1255
|
-
}
|
|
1256
1272
|
{
|
|
1257
|
-
trackEffects(ref.dep, {
|
|
1273
|
+
trackEffects(ref.dep || (ref.dep = createDep()), {
|
|
1258
1274
|
target: ref,
|
|
1259
1275
|
type: "get" /* GET */,
|
|
1260
1276
|
key: 'value'
|
|
@@ -1276,7 +1292,7 @@ var Vue = (function () {
|
|
|
1276
1292
|
}
|
|
1277
1293
|
}
|
|
1278
1294
|
function isRef(r) {
|
|
1279
|
-
return
|
|
1295
|
+
return !!(r && r.__v_isRef === true);
|
|
1280
1296
|
}
|
|
1281
1297
|
function ref(value) {
|
|
1282
1298
|
return createRef(value, false);
|
|
@@ -1291,22 +1307,22 @@ var Vue = (function () {
|
|
|
1291
1307
|
return new RefImpl(rawValue, shallow);
|
|
1292
1308
|
}
|
|
1293
1309
|
class RefImpl {
|
|
1294
|
-
constructor(value,
|
|
1295
|
-
this.
|
|
1310
|
+
constructor(value, __v_isShallow) {
|
|
1311
|
+
this.__v_isShallow = __v_isShallow;
|
|
1296
1312
|
this.dep = undefined;
|
|
1297
1313
|
this.__v_isRef = true;
|
|
1298
|
-
this._rawValue =
|
|
1299
|
-
this._value =
|
|
1314
|
+
this._rawValue = __v_isShallow ? value : toRaw(value);
|
|
1315
|
+
this._value = __v_isShallow ? value : toReactive(value);
|
|
1300
1316
|
}
|
|
1301
1317
|
get value() {
|
|
1302
1318
|
trackRefValue(this);
|
|
1303
1319
|
return this._value;
|
|
1304
1320
|
}
|
|
1305
1321
|
set value(newVal) {
|
|
1306
|
-
newVal = this.
|
|
1322
|
+
newVal = this.__v_isShallow ? newVal : toRaw(newVal);
|
|
1307
1323
|
if (hasChanged(newVal, this._rawValue)) {
|
|
1308
1324
|
this._rawValue = newVal;
|
|
1309
|
-
this._value = this.
|
|
1325
|
+
this._value = this.__v_isShallow ? newVal : toReactive(newVal);
|
|
1310
1326
|
triggerRefValue(this, newVal);
|
|
1311
1327
|
}
|
|
1312
1328
|
}
|
|
@@ -1389,22 +1405,23 @@ var Vue = (function () {
|
|
|
1389
1405
|
constructor(getter, _setter, isReadonly, isSSR) {
|
|
1390
1406
|
this._setter = _setter;
|
|
1391
1407
|
this.dep = undefined;
|
|
1392
|
-
this._dirty = true;
|
|
1393
1408
|
this.__v_isRef = true;
|
|
1409
|
+
this._dirty = true;
|
|
1394
1410
|
this.effect = new ReactiveEffect(getter, () => {
|
|
1395
1411
|
if (!this._dirty) {
|
|
1396
1412
|
this._dirty = true;
|
|
1397
1413
|
triggerRefValue(this);
|
|
1398
1414
|
}
|
|
1399
1415
|
});
|
|
1400
|
-
this.effect.
|
|
1416
|
+
this.effect.computed = this;
|
|
1417
|
+
this.effect.active = this._cacheable = !isSSR;
|
|
1401
1418
|
this["__v_isReadonly" /* IS_READONLY */] = isReadonly;
|
|
1402
1419
|
}
|
|
1403
1420
|
get value() {
|
|
1404
1421
|
// the computed ref may get wrapped by other proxies e.g. readonly() #3376
|
|
1405
1422
|
const self = toRaw(this);
|
|
1406
1423
|
trackRefValue(self);
|
|
1407
|
-
if (self._dirty) {
|
|
1424
|
+
if (self._dirty || !self._cacheable) {
|
|
1408
1425
|
self._dirty = false;
|
|
1409
1426
|
self._value = self.effect.run();
|
|
1410
1427
|
}
|
|
@@ -1581,7 +1598,7 @@ var Vue = (function () {
|
|
|
1581
1598
|
[12 /* FUNCTION_REF */]: 'ref function',
|
|
1582
1599
|
[13 /* ASYNC_COMPONENT_LOADER */]: 'async component loader',
|
|
1583
1600
|
[14 /* SCHEDULER */]: 'scheduler flush. This is likely a Vue internals bug. ' +
|
|
1584
|
-
'Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/
|
|
1601
|
+
'Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core'
|
|
1585
1602
|
};
|
|
1586
1603
|
function callWithErrorHandling(fn, instance, type, args) {
|
|
1587
1604
|
let res;
|
|
@@ -2086,23 +2103,23 @@ var Vue = (function () {
|
|
|
2086
2103
|
["GLOBAL_MOUNT" /* GLOBAL_MOUNT */]: {
|
|
2087
2104
|
message: `The global app bootstrapping API has changed: vm.$mount() and the "el" ` +
|
|
2088
2105
|
`option have been removed. Use createApp(RootComponent).mount() instead.`,
|
|
2089
|
-
link: `https://v3.vuejs.org/
|
|
2106
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/global-api.html#mounting-app-instance`
|
|
2090
2107
|
},
|
|
2091
2108
|
["GLOBAL_MOUNT_CONTAINER" /* GLOBAL_MOUNT_CONTAINER */]: {
|
|
2092
2109
|
message: `Vue detected directives on the mount container. ` +
|
|
2093
2110
|
`In Vue 3, the container is no longer considered part of the template ` +
|
|
2094
2111
|
`and will not be processed/replaced.`,
|
|
2095
|
-
link: `https://v3.vuejs.org/
|
|
2112
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/mount-changes.html`
|
|
2096
2113
|
},
|
|
2097
2114
|
["GLOBAL_EXTEND" /* GLOBAL_EXTEND */]: {
|
|
2098
2115
|
message: `Vue.extend() has been removed in Vue 3. ` +
|
|
2099
2116
|
`Use defineComponent() instead.`,
|
|
2100
|
-
link: `https://
|
|
2117
|
+
link: `https://vuejs.org/api/general.html#definecomponent`
|
|
2101
2118
|
},
|
|
2102
2119
|
["GLOBAL_PROTOTYPE" /* GLOBAL_PROTOTYPE */]: {
|
|
2103
2120
|
message: `Vue.prototype is no longer available in Vue 3. ` +
|
|
2104
2121
|
`Use app.config.globalProperties instead.`,
|
|
2105
|
-
link: `https://v3.vuejs.org/
|
|
2122
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/global-api.html#vue-prototype-replaced-by-config-globalproperties`
|
|
2106
2123
|
},
|
|
2107
2124
|
["GLOBAL_SET" /* GLOBAL_SET */]: {
|
|
2108
2125
|
message: `Vue.set() has been removed as it is no longer needed in Vue 3. ` +
|
|
@@ -2115,7 +2132,7 @@ var Vue = (function () {
|
|
|
2115
2132
|
["GLOBAL_OBSERVABLE" /* GLOBAL_OBSERVABLE */]: {
|
|
2116
2133
|
message: `Vue.observable() has been removed. ` +
|
|
2117
2134
|
`Use \`import { reactive } from "vue"\` from Composition API instead.`,
|
|
2118
|
-
link: `https://
|
|
2135
|
+
link: `https://vuejs.org/api/reactivity-core.html#reactive`
|
|
2119
2136
|
},
|
|
2120
2137
|
["GLOBAL_PRIVATE_UTIL" /* GLOBAL_PRIVATE_UTIL */]: {
|
|
2121
2138
|
message: `Vue.util has been removed. Please refactor to avoid its usage ` +
|
|
@@ -2129,16 +2146,16 @@ var Vue = (function () {
|
|
|
2129
2146
|
["CONFIG_DEVTOOLS" /* CONFIG_DEVTOOLS */]: {
|
|
2130
2147
|
message: `config.devtools has been removed. To enable devtools for ` +
|
|
2131
2148
|
`production, configure the __VUE_PROD_DEVTOOLS__ compile-time flag.`,
|
|
2132
|
-
link: `https://github.com/vuejs/
|
|
2149
|
+
link: `https://github.com/vuejs/core/tree/main/packages/vue#bundler-build-feature-flags`
|
|
2133
2150
|
},
|
|
2134
2151
|
["CONFIG_KEY_CODES" /* CONFIG_KEY_CODES */]: {
|
|
2135
2152
|
message: `config.keyCodes has been removed. ` +
|
|
2136
2153
|
`In Vue 3, you can directly use the kebab-case key names as v-on modifiers.`,
|
|
2137
|
-
link: `https://v3.vuejs.org/
|
|
2154
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/keycode-modifiers.html`
|
|
2138
2155
|
},
|
|
2139
2156
|
["CONFIG_PRODUCTION_TIP" /* CONFIG_PRODUCTION_TIP */]: {
|
|
2140
2157
|
message: `config.productionTip has been removed.`,
|
|
2141
|
-
link: `https://v3.vuejs.org/
|
|
2158
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/global-api.html#config-productiontip-removed`
|
|
2142
2159
|
},
|
|
2143
2160
|
["CONFIG_IGNORED_ELEMENTS" /* CONFIG_IGNORED_ELEMENTS */]: {
|
|
2144
2161
|
message: () => {
|
|
@@ -2151,7 +2168,7 @@ var Vue = (function () {
|
|
|
2151
2168
|
}
|
|
2152
2169
|
return msg;
|
|
2153
2170
|
},
|
|
2154
|
-
link: `https://v3.vuejs.org/
|
|
2171
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/global-api.html#config-ignoredelements-is-now-config-iscustomelement`
|
|
2155
2172
|
},
|
|
2156
2173
|
["CONFIG_WHITESPACE" /* CONFIG_WHITESPACE */]: {
|
|
2157
2174
|
// this warning is only relevant in the full build when using runtime
|
|
@@ -2174,12 +2191,12 @@ var Vue = (function () {
|
|
|
2174
2191
|
},
|
|
2175
2192
|
["INSTANCE_DESTROY" /* INSTANCE_DESTROY */]: {
|
|
2176
2193
|
message: `vm.$destroy() has been removed. Use app.unmount() instead.`,
|
|
2177
|
-
link: `https://
|
|
2194
|
+
link: `https://vuejs.org/api/application.html#app-unmount`
|
|
2178
2195
|
},
|
|
2179
2196
|
["INSTANCE_EVENT_EMITTER" /* INSTANCE_EVENT_EMITTER */]: {
|
|
2180
2197
|
message: `vm.$on/$once/$off() have been removed. ` +
|
|
2181
2198
|
`Use an external event emitter library instead.`,
|
|
2182
|
-
link: `https://v3.vuejs.org/
|
|
2199
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/events-api.html`
|
|
2183
2200
|
},
|
|
2184
2201
|
["INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */]: {
|
|
2185
2202
|
message: event => `"${event}" lifecycle events are no longer supported. From templates, ` +
|
|
@@ -2187,23 +2204,23 @@ var Vue = (function () {
|
|
|
2187
2204
|
`should be changed to @vnode-${event.slice(5)}. ` +
|
|
2188
2205
|
`From JavaScript, use Composition API to dynamically register lifecycle ` +
|
|
2189
2206
|
`hooks.`,
|
|
2190
|
-
link: `https://v3.vuejs.org/
|
|
2207
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/vnode-lifecycle-events.html`
|
|
2191
2208
|
},
|
|
2192
2209
|
["INSTANCE_CHILDREN" /* INSTANCE_CHILDREN */]: {
|
|
2193
2210
|
message: `vm.$children has been removed. Consider refactoring your logic ` +
|
|
2194
2211
|
`to avoid relying on direct access to child components.`,
|
|
2195
|
-
link: `https://v3.vuejs.org/
|
|
2212
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/children.html`
|
|
2196
2213
|
},
|
|
2197
2214
|
["INSTANCE_LISTENERS" /* INSTANCE_LISTENERS */]: {
|
|
2198
2215
|
message: `vm.$listeners has been removed. In Vue 3, parent v-on listeners are ` +
|
|
2199
2216
|
`included in vm.$attrs and it is no longer necessary to separately use ` +
|
|
2200
2217
|
`v-on="$listeners" if you are already using v-bind="$attrs". ` +
|
|
2201
2218
|
`(Note: the Vue 3 behavior only applies if this compat config is disabled)`,
|
|
2202
|
-
link: `https://v3.vuejs.org/
|
|
2219
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/listeners-removed.html`
|
|
2203
2220
|
},
|
|
2204
2221
|
["INSTANCE_SCOPED_SLOTS" /* INSTANCE_SCOPED_SLOTS */]: {
|
|
2205
2222
|
message: `vm.$scopedSlots has been removed. Use vm.$slots instead.`,
|
|
2206
|
-
link: `https://v3.vuejs.org/
|
|
2223
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/slots-unification.html`
|
|
2207
2224
|
},
|
|
2208
2225
|
["INSTANCE_ATTRS_CLASS_STYLE" /* INSTANCE_ATTRS_CLASS_STYLE */]: {
|
|
2209
2226
|
message: componentName => `Component <${componentName || 'Anonymous'}> has \`inheritAttrs: false\` but is ` +
|
|
@@ -2214,17 +2231,17 @@ var Vue = (function () {
|
|
|
2214
2231
|
`If you are binding $attrs to a non-root element and expecting ` +
|
|
2215
2232
|
`class/style to fallthrough on root, you will need to now manually bind ` +
|
|
2216
2233
|
`them on root via :class="$attrs.class".`,
|
|
2217
|
-
link: `https://v3.vuejs.org/
|
|
2234
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/attrs-includes-class-style.html`
|
|
2218
2235
|
},
|
|
2219
2236
|
["OPTIONS_DATA_FN" /* OPTIONS_DATA_FN */]: {
|
|
2220
2237
|
message: `The "data" option can no longer be a plain object. ` +
|
|
2221
2238
|
`Always use a function.`,
|
|
2222
|
-
link: `https://v3.vuejs.org/
|
|
2239
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/data-option.html`
|
|
2223
2240
|
},
|
|
2224
2241
|
["OPTIONS_DATA_MERGE" /* OPTIONS_DATA_MERGE */]: {
|
|
2225
2242
|
message: (key) => `Detected conflicting key "${key}" when merging data option values. ` +
|
|
2226
2243
|
`In Vue 3, data keys are merged shallowly and will override one another.`,
|
|
2227
|
-
link: `https://v3.vuejs.org/
|
|
2244
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/data-option.html#mixin-merge-behavior-change`
|
|
2228
2245
|
},
|
|
2229
2246
|
["OPTIONS_BEFORE_DESTROY" /* OPTIONS_BEFORE_DESTROY */]: {
|
|
2230
2247
|
message: `\`beforeDestroy\` has been renamed to \`beforeUnmount\`.`
|
|
@@ -2238,23 +2255,23 @@ var Vue = (function () {
|
|
|
2238
2255
|
`If current usage is intended, you can disable the compat behavior and ` +
|
|
2239
2256
|
`suppress this warning with:` +
|
|
2240
2257
|
`\n\n configureCompat({ ${"WATCH_ARRAY" /* WATCH_ARRAY */}: false })\n`,
|
|
2241
|
-
link: `https://v3.vuejs.org/
|
|
2258
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/watch.html`
|
|
2242
2259
|
},
|
|
2243
2260
|
["PROPS_DEFAULT_THIS" /* PROPS_DEFAULT_THIS */]: {
|
|
2244
2261
|
message: (key) => `props default value function no longer has access to "this". The compat ` +
|
|
2245
2262
|
`build only offers access to this.$options.` +
|
|
2246
2263
|
`(found in prop "${key}")`,
|
|
2247
|
-
link: `https://v3.vuejs.org/
|
|
2264
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/props-default-this.html`
|
|
2248
2265
|
},
|
|
2249
2266
|
["CUSTOM_DIR" /* CUSTOM_DIR */]: {
|
|
2250
2267
|
message: (legacyHook, newHook) => `Custom directive hook "${legacyHook}" has been removed. ` +
|
|
2251
2268
|
`Use "${newHook}" instead.`,
|
|
2252
|
-
link: `https://v3.vuejs.org/
|
|
2269
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/custom-directives.html`
|
|
2253
2270
|
},
|
|
2254
2271
|
["V_ON_KEYCODE_MODIFIER" /* V_ON_KEYCODE_MODIFIER */]: {
|
|
2255
2272
|
message: `Using keyCode as v-on modifier is no longer supported. ` +
|
|
2256
2273
|
`Use kebab-case key name modifiers instead.`,
|
|
2257
|
-
link: `https://v3.vuejs.org/
|
|
2274
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/keycode-modifiers.html`
|
|
2258
2275
|
},
|
|
2259
2276
|
["ATTR_FALSE_VALUE" /* ATTR_FALSE_VALUE */]: {
|
|
2260
2277
|
message: (name) => `Attribute "${name}" with v-bind value \`false\` will render ` +
|
|
@@ -2262,7 +2279,7 @@ var Vue = (function () {
|
|
|
2262
2279
|
`use \`null\` or \`undefined\` instead. If the usage is intended, ` +
|
|
2263
2280
|
`you can disable the compat behavior and suppress this warning with:` +
|
|
2264
2281
|
`\n\n configureCompat({ ${"ATTR_FALSE_VALUE" /* ATTR_FALSE_VALUE */}: false })\n`,
|
|
2265
|
-
link: `https://v3.vuejs.org/
|
|
2282
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/attribute-coercion.html`
|
|
2266
2283
|
},
|
|
2267
2284
|
["ATTR_ENUMERATED_COERCION" /* ATTR_ENUMERATED_COERCION */]: {
|
|
2268
2285
|
message: (name, value, coerced) => `Enumerated attribute "${name}" with v-bind value \`${value}\` will ` +
|
|
@@ -2271,7 +2288,7 @@ var Vue = (function () {
|
|
|
2271
2288
|
`If the usage is intended, ` +
|
|
2272
2289
|
`you can disable the compat behavior and suppress this warning with:` +
|
|
2273
2290
|
`\n\n configureCompat({ ${"ATTR_ENUMERATED_COERCION" /* ATTR_ENUMERATED_COERCION */}: false })\n`,
|
|
2274
|
-
link: `https://v3.vuejs.org/
|
|
2291
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/attribute-coercion.html`
|
|
2275
2292
|
},
|
|
2276
2293
|
["TRANSITION_CLASSES" /* TRANSITION_CLASSES */]: {
|
|
2277
2294
|
message: `` // this feature cannot be runtime-detected
|
|
@@ -2282,7 +2299,7 @@ var Vue = (function () {
|
|
|
2282
2299
|
`for styling, you can disable the compat behavior and suppress this ` +
|
|
2283
2300
|
`warning with:` +
|
|
2284
2301
|
`\n\n configureCompat({ ${"TRANSITION_GROUP_ROOT" /* TRANSITION_GROUP_ROOT */}: false })\n`,
|
|
2285
|
-
link: `https://v3.vuejs.org/
|
|
2302
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/transition-group.html`
|
|
2286
2303
|
},
|
|
2287
2304
|
["COMPONENT_ASYNC" /* COMPONENT_ASYNC */]: {
|
|
2288
2305
|
message: (comp) => {
|
|
@@ -2295,7 +2312,7 @@ var Vue = (function () {
|
|
|
2295
2312
|
`warning with:` +
|
|
2296
2313
|
`\n\n configureCompat({ ${"COMPONENT_ASYNC" /* COMPONENT_ASYNC */}: false })\n`);
|
|
2297
2314
|
},
|
|
2298
|
-
link: `https://v3.vuejs.org/
|
|
2315
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/async-components.html`
|
|
2299
2316
|
},
|
|
2300
2317
|
["COMPONENT_FUNCTIONAL" /* COMPONENT_FUNCTIONAL */]: {
|
|
2301
2318
|
message: (comp) => {
|
|
@@ -2306,7 +2323,7 @@ var Vue = (function () {
|
|
|
2306
2323
|
`components usage have been migrated and its compat behavior has ` +
|
|
2307
2324
|
`been disabled.`);
|
|
2308
2325
|
},
|
|
2309
|
-
link: `https://v3.vuejs.org/
|
|
2326
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/functional-components.html`
|
|
2310
2327
|
},
|
|
2311
2328
|
["COMPONENT_V_MODEL" /* COMPONENT_V_MODEL */]: {
|
|
2312
2329
|
message: (comp) => {
|
|
@@ -2316,27 +2333,27 @@ var Vue = (function () {
|
|
|
2316
2333
|
(isArray(comp.props)
|
|
2317
2334
|
? comp.props.includes('modelValue')
|
|
2318
2335
|
: hasOwn(comp.props, 'modelValue'))) {
|
|
2319
|
-
return (`Component
|
|
2336
|
+
return (`Component declares "modelValue" prop, which is Vue 3 usage, but ` +
|
|
2320
2337
|
`is running under Vue 2 compat v-model behavior. You can ${configMsg}`);
|
|
2321
2338
|
}
|
|
2322
2339
|
return (`v-model usage on component has changed in Vue 3. Component that expects ` +
|
|
2323
2340
|
`to work with v-model should now use the "modelValue" prop and emit the ` +
|
|
2324
2341
|
`"update:modelValue" event. You can update the usage and then ${configMsg}`);
|
|
2325
2342
|
},
|
|
2326
|
-
link: `https://v3.vuejs.org/
|
|
2343
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html`
|
|
2327
2344
|
},
|
|
2328
2345
|
["RENDER_FUNCTION" /* RENDER_FUNCTION */]: {
|
|
2329
2346
|
message: `Vue 3's render function API has changed. ` +
|
|
2330
2347
|
`You can opt-in to the new API with:` +
|
|
2331
2348
|
`\n\n configureCompat({ ${"RENDER_FUNCTION" /* RENDER_FUNCTION */}: false })\n` +
|
|
2332
2349
|
`\n (This can also be done per-component via the "compatConfig" option.)`,
|
|
2333
|
-
link: `https://v3.vuejs.org/
|
|
2350
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/render-function-api.html`
|
|
2334
2351
|
},
|
|
2335
2352
|
["FILTERS" /* FILTERS */]: {
|
|
2336
2353
|
message: `filters have been removed in Vue 3. ` +
|
|
2337
2354
|
`The "|" symbol will be treated as native JavaScript bitwise OR operator. ` +
|
|
2338
2355
|
`Use method calls or computed properties instead.`,
|
|
2339
|
-
link: `https://v3.vuejs.org/
|
|
2356
|
+
link: `https://v3-migration.vuejs.org/breaking-changes/filters.html`
|
|
2340
2357
|
},
|
|
2341
2358
|
["PRIVATE_APIS" /* PRIVATE_APIS */]: {
|
|
2342
2359
|
message: name => `"${name}" is a Vue 2 private API that no longer exists in Vue 3. ` +
|
|
@@ -2404,7 +2421,7 @@ var Vue = (function () {
|
|
|
2404
2421
|
warn$1(`Deprecation config "${key}" is compiler-specific and you are ` +
|
|
2405
2422
|
`running a runtime-only build of Vue. This deprecation should be ` +
|
|
2406
2423
|
`configured via compiler options in your build setup instead.\n` +
|
|
2407
|
-
`Details: https://v3.vuejs.org/
|
|
2424
|
+
`Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`);
|
|
2408
2425
|
}
|
|
2409
2426
|
}
|
|
2410
2427
|
else {
|
|
@@ -2546,6 +2563,7 @@ var Vue = (function () {
|
|
|
2546
2563
|
const warnedTypes = new WeakSet();
|
|
2547
2564
|
function convertLegacyVModelProps(vnode) {
|
|
2548
2565
|
const { type, shapeFlag, props, dynamicProps } = vnode;
|
|
2566
|
+
const comp = type;
|
|
2549
2567
|
if (shapeFlag & 6 /* COMPONENT */ && props && 'modelValue' in props) {
|
|
2550
2568
|
if (!isCompatEnabled("COMPONENT_V_MODEL" /* COMPONENT_V_MODEL */,
|
|
2551
2569
|
// this is a special case where we want to use the vnode component's
|
|
@@ -2554,16 +2572,18 @@ var Vue = (function () {
|
|
|
2554
2572
|
{ type })) {
|
|
2555
2573
|
return;
|
|
2556
2574
|
}
|
|
2557
|
-
if (!warnedTypes.has(
|
|
2575
|
+
if (!warnedTypes.has(comp)) {
|
|
2558
2576
|
pushWarningContext(vnode);
|
|
2559
|
-
warnDeprecation("COMPONENT_V_MODEL" /* COMPONENT_V_MODEL */, { type },
|
|
2577
|
+
warnDeprecation("COMPONENT_V_MODEL" /* COMPONENT_V_MODEL */, { type }, comp);
|
|
2560
2578
|
popWarningContext();
|
|
2561
|
-
warnedTypes.add(
|
|
2579
|
+
warnedTypes.add(comp);
|
|
2562
2580
|
}
|
|
2563
2581
|
// v3 compiled model code -> v2 compat props
|
|
2564
2582
|
// modelValue -> value
|
|
2565
2583
|
// onUpdate:modelValue -> onModelCompat:input
|
|
2566
|
-
const
|
|
2584
|
+
const model = comp.model || {};
|
|
2585
|
+
applyModelFromMixins(model, comp.mixins);
|
|
2586
|
+
const { prop = 'value', event = 'input' } = model;
|
|
2567
2587
|
if (prop !== 'modelValue') {
|
|
2568
2588
|
props[prop] = props.modelValue;
|
|
2569
2589
|
delete props.modelValue;
|
|
@@ -2576,6 +2596,16 @@ var Vue = (function () {
|
|
|
2576
2596
|
delete props['onUpdate:modelValue'];
|
|
2577
2597
|
}
|
|
2578
2598
|
}
|
|
2599
|
+
function applyModelFromMixins(model, mixins) {
|
|
2600
|
+
if (mixins) {
|
|
2601
|
+
mixins.forEach(m => {
|
|
2602
|
+
if (m.model)
|
|
2603
|
+
extend(model, m.model);
|
|
2604
|
+
if (m.mixins)
|
|
2605
|
+
applyModelFromMixins(model, m.mixins);
|
|
2606
|
+
});
|
|
2607
|
+
}
|
|
2608
|
+
}
|
|
2579
2609
|
function compatModelEmit(instance, event, args) {
|
|
2580
2610
|
if (!isCompatEnabled("COMPONENT_V_MODEL" /* COMPONENT_V_MODEL */, instance)) {
|
|
2581
2611
|
return;
|
|
@@ -3578,7 +3608,7 @@ var Vue = (function () {
|
|
|
3578
3608
|
if (instance) {
|
|
3579
3609
|
// #2400
|
|
3580
3610
|
// to support `app.use` plugins,
|
|
3581
|
-
// fallback to appContext's `provides` if the
|
|
3611
|
+
// fallback to appContext's `provides` if the instance is at root
|
|
3582
3612
|
const provides = instance.parent == null
|
|
3583
3613
|
? instance.vnode.appContext && instance.vnode.appContext.provides
|
|
3584
3614
|
: instance.parent.provides;
|
|
@@ -3644,7 +3674,7 @@ var Vue = (function () {
|
|
|
3644
3674
|
let isMultiSource = false;
|
|
3645
3675
|
if (isRef(source)) {
|
|
3646
3676
|
getter = () => source.value;
|
|
3647
|
-
forceTrigger =
|
|
3677
|
+
forceTrigger = isShallow(source);
|
|
3648
3678
|
}
|
|
3649
3679
|
else if (isReactive(source)) {
|
|
3650
3680
|
getter = () => source;
|
|
@@ -4538,7 +4568,7 @@ var Vue = (function () {
|
|
|
4538
4568
|
return pattern.some((p) => matches(p, name));
|
|
4539
4569
|
}
|
|
4540
4570
|
else if (isString(pattern)) {
|
|
4541
|
-
return pattern.split(',').
|
|
4571
|
+
return pattern.split(',').includes(name);
|
|
4542
4572
|
}
|
|
4543
4573
|
else if (pattern.test) {
|
|
4544
4574
|
return pattern.test(name);
|
|
@@ -4806,7 +4836,7 @@ var Vue = (function () {
|
|
|
4806
4836
|
warn$1(`Write operation failed: computed property "${key}" is readonly.`);
|
|
4807
4837
|
}
|
|
4808
4838
|
;
|
|
4809
|
-
const c = computed({
|
|
4839
|
+
const c = computed$1({
|
|
4810
4840
|
get,
|
|
4811
4841
|
set
|
|
4812
4842
|
});
|
|
@@ -5287,7 +5317,9 @@ var Vue = (function () {
|
|
|
5287
5317
|
// attrs point to the same object so it should already have been updated.
|
|
5288
5318
|
if (attrs !== rawCurrentProps) {
|
|
5289
5319
|
for (const key in attrs) {
|
|
5290
|
-
if (!rawProps ||
|
|
5320
|
+
if (!rawProps ||
|
|
5321
|
+
(!hasOwn(rawProps, key) &&
|
|
5322
|
+
(!hasOwn(rawProps, key + 'Native')))) {
|
|
5291
5323
|
delete attrs[key];
|
|
5292
5324
|
hasAttrsChanged = true;
|
|
5293
5325
|
}
|
|
@@ -5790,7 +5822,6 @@ var Vue = (function () {
|
|
|
5790
5822
|
[bar, this.y]
|
|
5791
5823
|
])
|
|
5792
5824
|
*/
|
|
5793
|
-
const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo');
|
|
5794
5825
|
function validateDirectiveName(name) {
|
|
5795
5826
|
if (isBuiltInDirective(name)) {
|
|
5796
5827
|
warn$1('Do not use built-in directive ids as custom directive id: ' + name);
|
|
@@ -5925,7 +5956,7 @@ var Vue = (function () {
|
|
|
5925
5956
|
return vm;
|
|
5926
5957
|
}
|
|
5927
5958
|
}
|
|
5928
|
-
Vue.version = "3.2.
|
|
5959
|
+
Vue.version = `2.6.14-compat:${"3.2.31"}`;
|
|
5929
5960
|
Vue.config = singletonApp.config;
|
|
5930
5961
|
Vue.use = (p, ...options) => {
|
|
5931
5962
|
if (p && isFunction(p.install)) {
|
|
@@ -6749,7 +6780,8 @@ var Vue = (function () {
|
|
|
6749
6780
|
// e.g. <option :value="obj">, <input type="checkbox" :true-value="1">
|
|
6750
6781
|
const forcePatchValue = (type === 'input' && dirs) || type === 'option';
|
|
6751
6782
|
// skip props & children if this is hoisted static nodes
|
|
6752
|
-
|
|
6783
|
+
// #5405 in dev, always hydrate children for HMR
|
|
6784
|
+
{
|
|
6753
6785
|
if (dirs) {
|
|
6754
6786
|
invokeDirectiveHook(vnode, null, parentComponent, 'created');
|
|
6755
6787
|
}
|
|
@@ -6914,6 +6946,7 @@ var Vue = (function () {
|
|
|
6914
6946
|
return [hydrate, hydrateNode];
|
|
6915
6947
|
}
|
|
6916
6948
|
|
|
6949
|
+
/* eslint-disable no-restricted-globals */
|
|
6917
6950
|
let supported;
|
|
6918
6951
|
let perf;
|
|
6919
6952
|
function startMeasure(instance, type) {
|
|
@@ -6941,7 +6974,6 @@ var Vue = (function () {
|
|
|
6941
6974
|
if (supported !== undefined) {
|
|
6942
6975
|
return supported;
|
|
6943
6976
|
}
|
|
6944
|
-
/* eslint-disable no-restricted-globals */
|
|
6945
6977
|
if (typeof window !== 'undefined' && window.performance) {
|
|
6946
6978
|
supported = true;
|
|
6947
6979
|
perf = window.performance;
|
|
@@ -6949,7 +6981,6 @@ var Vue = (function () {
|
|
|
6949
6981
|
else {
|
|
6950
6982
|
supported = false;
|
|
6951
6983
|
}
|
|
6952
|
-
/* eslint-enable no-restricted-globals */
|
|
6953
6984
|
return supported;
|
|
6954
6985
|
}
|
|
6955
6986
|
|
|
@@ -9195,7 +9226,7 @@ var Vue = (function () {
|
|
|
9195
9226
|
shapeFlag: vnode.shapeFlag,
|
|
9196
9227
|
// if the vnode is cloned with extra props, we can no longer assume its
|
|
9197
9228
|
// existing patch flag to be reliable and need to add the FULL_PROPS flag.
|
|
9198
|
-
// note:
|
|
9229
|
+
// note: preserve flag for fragments since they use the flag for children
|
|
9199
9230
|
// fast paths only.
|
|
9200
9231
|
patchFlag: extraProps && vnode.type !== Fragment
|
|
9201
9232
|
? patchFlag === -1 // hoisted node
|
|
@@ -9360,7 +9391,8 @@ var Vue = (function () {
|
|
|
9360
9391
|
else if (isOn(key)) {
|
|
9361
9392
|
const existing = ret[key];
|
|
9362
9393
|
const incoming = toMerge[key];
|
|
9363
|
-
if (
|
|
9394
|
+
if (incoming &&
|
|
9395
|
+
existing !== incoming &&
|
|
9364
9396
|
!(isArray(existing) && existing.includes(incoming))) {
|
|
9365
9397
|
ret[key] = existing
|
|
9366
9398
|
? [].concat(existing, incoming)
|
|
@@ -9636,7 +9668,7 @@ var Vue = (function () {
|
|
|
9636
9668
|
}
|
|
9637
9669
|
function isKeyNotMatch(expect, actual) {
|
|
9638
9670
|
if (isArray(expect)) {
|
|
9639
|
-
return expect.
|
|
9671
|
+
return !expect.includes(actual);
|
|
9640
9672
|
}
|
|
9641
9673
|
else {
|
|
9642
9674
|
return expect !== actual;
|
|
@@ -9715,7 +9747,7 @@ var Vue = (function () {
|
|
|
9715
9747
|
extend(map, {
|
|
9716
9748
|
// needed by many libs / render fns
|
|
9717
9749
|
$vnode: i => i.vnode,
|
|
9718
|
-
// inject
|
|
9750
|
+
// inject additional properties into $options for compat
|
|
9719
9751
|
// e.g. vuex needs this.$options.parent
|
|
9720
9752
|
$options: i => {
|
|
9721
9753
|
const res = extend({}, resolveMergedOptions(i));
|
|
@@ -9903,9 +9935,11 @@ var Vue = (function () {
|
|
|
9903
9935
|
const { data, setupState, ctx } = instance;
|
|
9904
9936
|
if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) {
|
|
9905
9937
|
setupState[key] = value;
|
|
9938
|
+
return true;
|
|
9906
9939
|
}
|
|
9907
9940
|
else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
|
|
9908
9941
|
data[key] = value;
|
|
9942
|
+
return true;
|
|
9909
9943
|
}
|
|
9910
9944
|
else if (hasOwn(instance.props, key)) {
|
|
9911
9945
|
warn$1(`Attempting to mutate prop "${key}". Props are readonly.`, instance);
|
|
@@ -9939,6 +9973,15 @@ var Vue = (function () {
|
|
|
9939
9973
|
hasOwn(ctx, key) ||
|
|
9940
9974
|
hasOwn(publicPropertiesMap, key) ||
|
|
9941
9975
|
hasOwn(appContext.config.globalProperties, key));
|
|
9976
|
+
},
|
|
9977
|
+
defineProperty(target, key, descriptor) {
|
|
9978
|
+
if (descriptor.get != null) {
|
|
9979
|
+
this.set(target, key, descriptor.get(), null);
|
|
9980
|
+
}
|
|
9981
|
+
else if (descriptor.value != null) {
|
|
9982
|
+
this.set(target, key, descriptor.value, null);
|
|
9983
|
+
}
|
|
9984
|
+
return Reflect.defineProperty(target, key, descriptor);
|
|
9942
9985
|
}
|
|
9943
9986
|
};
|
|
9944
9987
|
{
|
|
@@ -10443,7 +10486,7 @@ var Vue = (function () {
|
|
|
10443
10486
|
* instance properties when it is accessed by a parent component via template
|
|
10444
10487
|
* refs.
|
|
10445
10488
|
*
|
|
10446
|
-
* `<script setup>` components are closed by default - i.e.
|
|
10489
|
+
* `<script setup>` components are closed by default - i.e. variables inside
|
|
10447
10490
|
* the `<script setup>` scope is not exposed to parent unless explicitly exposed
|
|
10448
10491
|
* via `defineExpose`.
|
|
10449
10492
|
*
|
|
@@ -10641,7 +10684,7 @@ var Vue = (function () {
|
|
|
10641
10684
|
return [
|
|
10642
10685
|
'div',
|
|
10643
10686
|
{},
|
|
10644
|
-
['span', vueStyle, 'Reactive'],
|
|
10687
|
+
['span', vueStyle, isShallow(obj) ? 'ShallowReactive' : 'Reactive'],
|
|
10645
10688
|
'<',
|
|
10646
10689
|
formatValue(obj),
|
|
10647
10690
|
`>${isReadonly(obj) ? ` (readonly)` : ``}`
|
|
@@ -10651,7 +10694,7 @@ var Vue = (function () {
|
|
|
10651
10694
|
return [
|
|
10652
10695
|
'div',
|
|
10653
10696
|
{},
|
|
10654
|
-
['span', vueStyle, 'Readonly'],
|
|
10697
|
+
['span', vueStyle, isShallow(obj) ? 'ShallowReadonly' : 'Readonly'],
|
|
10655
10698
|
'<',
|
|
10656
10699
|
formatValue(obj),
|
|
10657
10700
|
'>'
|
|
@@ -10780,7 +10823,7 @@ var Vue = (function () {
|
|
|
10780
10823
|
}
|
|
10781
10824
|
}
|
|
10782
10825
|
function genRefFlag(v) {
|
|
10783
|
-
if (v
|
|
10826
|
+
if (isShallow(v)) {
|
|
10784
10827
|
return `ShallowRef`;
|
|
10785
10828
|
}
|
|
10786
10829
|
if (v.effect) {
|
|
@@ -10824,7 +10867,7 @@ var Vue = (function () {
|
|
|
10824
10867
|
}
|
|
10825
10868
|
|
|
10826
10869
|
// Core API ------------------------------------------------------------------
|
|
10827
|
-
const version = "3.2.
|
|
10870
|
+
const version = "3.2.31";
|
|
10828
10871
|
/**
|
|
10829
10872
|
* SSR utils for \@vue/server-renderer. Only exposed in cjs builds.
|
|
10830
10873
|
* @internal
|
|
@@ -10905,7 +10948,10 @@ var Vue = (function () {
|
|
|
10905
10948
|
insertStaticContent(content, parent, anchor, isSVG, start, end) {
|
|
10906
10949
|
// <parent> before | first ... last | anchor </parent>
|
|
10907
10950
|
const before = anchor ? anchor.previousSibling : parent.lastChild;
|
|
10908
|
-
|
|
10951
|
+
// #5308 can only take cached path if:
|
|
10952
|
+
// - has a single root node
|
|
10953
|
+
// - nextSibling info is still available
|
|
10954
|
+
if (start && (start === end || start.nextSibling)) {
|
|
10909
10955
|
// cached
|
|
10910
10956
|
while (true) {
|
|
10911
10957
|
parent.insertBefore(start.cloneNode(true), anchor);
|
|
@@ -11255,7 +11301,7 @@ var Vue = (function () {
|
|
|
11255
11301
|
originalStop.call(e);
|
|
11256
11302
|
e._stopped = true;
|
|
11257
11303
|
};
|
|
11258
|
-
return value.map(fn => (e) => !e._stopped && fn(e));
|
|
11304
|
+
return value.map(fn => (e) => !e._stopped && fn && fn(e));
|
|
11259
11305
|
}
|
|
11260
11306
|
else {
|
|
11261
11307
|
return value;
|
|
@@ -12617,6 +12663,7 @@ var Vue = (function () {
|
|
|
12617
12663
|
isProxy: isProxy,
|
|
12618
12664
|
isReactive: isReactive,
|
|
12619
12665
|
isReadonly: isReadonly,
|
|
12666
|
+
isShallow: isShallow,
|
|
12620
12667
|
customRef: customRef,
|
|
12621
12668
|
triggerRef: triggerRef,
|
|
12622
12669
|
shallowRef: shallowRef,
|