@vue/compat 3.2.36 → 3.2.39
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/dist/vue.cjs.js +1178 -1128
- package/dist/vue.cjs.prod.js +987 -943
- package/dist/vue.esm-browser.js +1120 -1070
- package/dist/vue.esm-browser.prod.js +1 -1
- package/dist/vue.esm-bundler.js +1124 -1076
- package/dist/vue.global.js +1120 -1070
- package/dist/vue.global.prod.js +1 -1
- package/dist/vue.runtime.esm-browser.js +545 -508
- package/dist/vue.runtime.esm-browser.prod.js +1 -1
- package/dist/vue.runtime.esm-bundler.js +549 -514
- package/dist/vue.runtime.global.js +545 -508
- package/dist/vue.runtime.global.prod.js +1 -1
- package/package.json +2 -2
|
@@ -641,7 +641,7 @@ var Vue = (function () {
|
|
|
641
641
|
return;
|
|
642
642
|
}
|
|
643
643
|
let deps = [];
|
|
644
|
-
if (type === "clear" /* CLEAR */) {
|
|
644
|
+
if (type === "clear" /* TriggerOpTypes.CLEAR */) {
|
|
645
645
|
// collection being cleared
|
|
646
646
|
// trigger all effects for target
|
|
647
647
|
deps = [...depsMap.values()];
|
|
@@ -660,7 +660,7 @@ var Vue = (function () {
|
|
|
660
660
|
}
|
|
661
661
|
// also run for iteration key on ADD | DELETE | Map.SET
|
|
662
662
|
switch (type) {
|
|
663
|
-
case "add" /* ADD */:
|
|
663
|
+
case "add" /* TriggerOpTypes.ADD */:
|
|
664
664
|
if (!isArray(target)) {
|
|
665
665
|
deps.push(depsMap.get(ITERATE_KEY));
|
|
666
666
|
if (isMap(target)) {
|
|
@@ -672,7 +672,7 @@ var Vue = (function () {
|
|
|
672
672
|
deps.push(depsMap.get('length'));
|
|
673
673
|
}
|
|
674
674
|
break;
|
|
675
|
-
case "delete" /* DELETE */:
|
|
675
|
+
case "delete" /* TriggerOpTypes.DELETE */:
|
|
676
676
|
if (!isArray(target)) {
|
|
677
677
|
deps.push(depsMap.get(ITERATE_KEY));
|
|
678
678
|
if (isMap(target)) {
|
|
@@ -680,7 +680,7 @@ var Vue = (function () {
|
|
|
680
680
|
}
|
|
681
681
|
}
|
|
682
682
|
break;
|
|
683
|
-
case "set" /* SET */:
|
|
683
|
+
case "set" /* TriggerOpTypes.SET */:
|
|
684
684
|
if (isMap(target)) {
|
|
685
685
|
deps.push(depsMap.get(ITERATE_KEY));
|
|
686
686
|
}
|
|
@@ -757,7 +757,7 @@ var Vue = (function () {
|
|
|
757
757
|
instrumentations[key] = function (...args) {
|
|
758
758
|
const arr = toRaw(this);
|
|
759
759
|
for (let i = 0, l = this.length; i < l; i++) {
|
|
760
|
-
track(arr, "get" /* GET */, i + '');
|
|
760
|
+
track(arr, "get" /* TrackOpTypes.GET */, i + '');
|
|
761
761
|
}
|
|
762
762
|
// we run the method using the original args first (which may be reactive)
|
|
763
763
|
const res = arr[key](...args);
|
|
@@ -782,16 +782,16 @@ var Vue = (function () {
|
|
|
782
782
|
}
|
|
783
783
|
function createGetter(isReadonly = false, shallow = false) {
|
|
784
784
|
return function get(target, key, receiver) {
|
|
785
|
-
if (key === "__v_isReactive" /* IS_REACTIVE */) {
|
|
785
|
+
if (key === "__v_isReactive" /* ReactiveFlags.IS_REACTIVE */) {
|
|
786
786
|
return !isReadonly;
|
|
787
787
|
}
|
|
788
|
-
else if (key === "__v_isReadonly" /* IS_READONLY */) {
|
|
788
|
+
else if (key === "__v_isReadonly" /* ReactiveFlags.IS_READONLY */) {
|
|
789
789
|
return isReadonly;
|
|
790
790
|
}
|
|
791
|
-
else if (key === "__v_isShallow" /* IS_SHALLOW */) {
|
|
791
|
+
else if (key === "__v_isShallow" /* ReactiveFlags.IS_SHALLOW */) {
|
|
792
792
|
return shallow;
|
|
793
793
|
}
|
|
794
|
-
else if (key === "__v_raw" /* RAW */ &&
|
|
794
|
+
else if (key === "__v_raw" /* ReactiveFlags.RAW */ &&
|
|
795
795
|
receiver ===
|
|
796
796
|
(isReadonly
|
|
797
797
|
? shallow
|
|
@@ -811,7 +811,7 @@ var Vue = (function () {
|
|
|
811
811
|
return res;
|
|
812
812
|
}
|
|
813
813
|
if (!isReadonly) {
|
|
814
|
-
track(target, "get" /* GET */, key);
|
|
814
|
+
track(target, "get" /* TrackOpTypes.GET */, key);
|
|
815
815
|
}
|
|
816
816
|
if (shallow) {
|
|
817
817
|
return res;
|
|
@@ -837,10 +837,10 @@ var Vue = (function () {
|
|
|
837
837
|
if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) {
|
|
838
838
|
return false;
|
|
839
839
|
}
|
|
840
|
-
if (!shallow
|
|
841
|
-
if (!isShallow(value)) {
|
|
842
|
-
value = toRaw(value);
|
|
840
|
+
if (!shallow) {
|
|
841
|
+
if (!isShallow(value) && !isReadonly(value)) {
|
|
843
842
|
oldValue = toRaw(oldValue);
|
|
843
|
+
value = toRaw(value);
|
|
844
844
|
}
|
|
845
845
|
if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
|
|
846
846
|
oldValue.value = value;
|
|
@@ -854,10 +854,10 @@ var Vue = (function () {
|
|
|
854
854
|
// don't trigger if target is something up in the prototype chain of original
|
|
855
855
|
if (target === toRaw(receiver)) {
|
|
856
856
|
if (!hadKey) {
|
|
857
|
-
trigger(target, "add" /* ADD */, key, value);
|
|
857
|
+
trigger(target, "add" /* TriggerOpTypes.ADD */, key, value);
|
|
858
858
|
}
|
|
859
859
|
else if (hasChanged(value, oldValue)) {
|
|
860
|
-
trigger(target, "set" /* SET */, key, value, oldValue);
|
|
860
|
+
trigger(target, "set" /* TriggerOpTypes.SET */, key, value, oldValue);
|
|
861
861
|
}
|
|
862
862
|
}
|
|
863
863
|
return result;
|
|
@@ -868,19 +868,19 @@ var Vue = (function () {
|
|
|
868
868
|
const oldValue = target[key];
|
|
869
869
|
const result = Reflect.deleteProperty(target, key);
|
|
870
870
|
if (result && hadKey) {
|
|
871
|
-
trigger(target, "delete" /* DELETE */, key, undefined, oldValue);
|
|
871
|
+
trigger(target, "delete" /* TriggerOpTypes.DELETE */, key, undefined, oldValue);
|
|
872
872
|
}
|
|
873
873
|
return result;
|
|
874
874
|
}
|
|
875
875
|
function has(target, key) {
|
|
876
876
|
const result = Reflect.has(target, key);
|
|
877
877
|
if (!isSymbol(key) || !builtInSymbols.has(key)) {
|
|
878
|
-
track(target, "has" /* HAS */, key);
|
|
878
|
+
track(target, "has" /* TrackOpTypes.HAS */, key);
|
|
879
879
|
}
|
|
880
880
|
return result;
|
|
881
881
|
}
|
|
882
882
|
function ownKeys(target) {
|
|
883
|
-
track(target, "iterate" /* ITERATE */, isArray(target) ? 'length' : ITERATE_KEY);
|
|
883
|
+
track(target, "iterate" /* TrackOpTypes.ITERATE */, isArray(target) ? 'length' : ITERATE_KEY);
|
|
884
884
|
return Reflect.ownKeys(target);
|
|
885
885
|
}
|
|
886
886
|
const mutableHandlers = {
|
|
@@ -921,14 +921,14 @@ var Vue = (function () {
|
|
|
921
921
|
function get$1(target, key, isReadonly = false, isShallow = false) {
|
|
922
922
|
// #1772: readonly(reactive(Map)) should return readonly + reactive version
|
|
923
923
|
// of the value
|
|
924
|
-
target = target["__v_raw" /* RAW */];
|
|
924
|
+
target = target["__v_raw" /* ReactiveFlags.RAW */];
|
|
925
925
|
const rawTarget = toRaw(target);
|
|
926
926
|
const rawKey = toRaw(key);
|
|
927
927
|
if (!isReadonly) {
|
|
928
928
|
if (key !== rawKey) {
|
|
929
|
-
track(rawTarget, "get" /* GET */, key);
|
|
929
|
+
track(rawTarget, "get" /* TrackOpTypes.GET */, key);
|
|
930
930
|
}
|
|
931
|
-
track(rawTarget, "get" /* GET */, rawKey);
|
|
931
|
+
track(rawTarget, "get" /* TrackOpTypes.GET */, rawKey);
|
|
932
932
|
}
|
|
933
933
|
const { has } = getProto(rawTarget);
|
|
934
934
|
const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;
|
|
@@ -945,22 +945,22 @@ var Vue = (function () {
|
|
|
945
945
|
}
|
|
946
946
|
}
|
|
947
947
|
function has$1(key, isReadonly = false) {
|
|
948
|
-
const target = this["__v_raw" /* RAW */];
|
|
948
|
+
const target = this["__v_raw" /* ReactiveFlags.RAW */];
|
|
949
949
|
const rawTarget = toRaw(target);
|
|
950
950
|
const rawKey = toRaw(key);
|
|
951
951
|
if (!isReadonly) {
|
|
952
952
|
if (key !== rawKey) {
|
|
953
|
-
track(rawTarget, "has" /* HAS */, key);
|
|
953
|
+
track(rawTarget, "has" /* TrackOpTypes.HAS */, key);
|
|
954
954
|
}
|
|
955
|
-
track(rawTarget, "has" /* HAS */, rawKey);
|
|
955
|
+
track(rawTarget, "has" /* TrackOpTypes.HAS */, rawKey);
|
|
956
956
|
}
|
|
957
957
|
return key === rawKey
|
|
958
958
|
? target.has(key)
|
|
959
959
|
: target.has(key) || target.has(rawKey);
|
|
960
960
|
}
|
|
961
961
|
function size(target, isReadonly = false) {
|
|
962
|
-
target = target["__v_raw" /* RAW */];
|
|
963
|
-
!isReadonly && track(toRaw(target), "iterate" /* ITERATE */, ITERATE_KEY);
|
|
962
|
+
target = target["__v_raw" /* ReactiveFlags.RAW */];
|
|
963
|
+
!isReadonly && track(toRaw(target), "iterate" /* TrackOpTypes.ITERATE */, ITERATE_KEY);
|
|
964
964
|
return Reflect.get(target, 'size', target);
|
|
965
965
|
}
|
|
966
966
|
function add(value) {
|
|
@@ -970,7 +970,7 @@ var Vue = (function () {
|
|
|
970
970
|
const hadKey = proto.has.call(target, value);
|
|
971
971
|
if (!hadKey) {
|
|
972
972
|
target.add(value);
|
|
973
|
-
trigger(target, "add" /* ADD */, value, value);
|
|
973
|
+
trigger(target, "add" /* TriggerOpTypes.ADD */, value, value);
|
|
974
974
|
}
|
|
975
975
|
return this;
|
|
976
976
|
}
|
|
@@ -989,10 +989,10 @@ var Vue = (function () {
|
|
|
989
989
|
const oldValue = get.call(target, key);
|
|
990
990
|
target.set(key, value);
|
|
991
991
|
if (!hadKey) {
|
|
992
|
-
trigger(target, "add" /* ADD */, key, value);
|
|
992
|
+
trigger(target, "add" /* TriggerOpTypes.ADD */, key, value);
|
|
993
993
|
}
|
|
994
994
|
else if (hasChanged(value, oldValue)) {
|
|
995
|
-
trigger(target, "set" /* SET */, key, value, oldValue);
|
|
995
|
+
trigger(target, "set" /* TriggerOpTypes.SET */, key, value, oldValue);
|
|
996
996
|
}
|
|
997
997
|
return this;
|
|
998
998
|
}
|
|
@@ -1011,7 +1011,7 @@ var Vue = (function () {
|
|
|
1011
1011
|
// forward the operation before queueing reactions
|
|
1012
1012
|
const result = target.delete(key);
|
|
1013
1013
|
if (hadKey) {
|
|
1014
|
-
trigger(target, "delete" /* DELETE */, key, undefined, oldValue);
|
|
1014
|
+
trigger(target, "delete" /* TriggerOpTypes.DELETE */, key, undefined, oldValue);
|
|
1015
1015
|
}
|
|
1016
1016
|
return result;
|
|
1017
1017
|
}
|
|
@@ -1025,17 +1025,17 @@ var Vue = (function () {
|
|
|
1025
1025
|
// forward the operation before queueing reactions
|
|
1026
1026
|
const result = target.clear();
|
|
1027
1027
|
if (hadItems) {
|
|
1028
|
-
trigger(target, "clear" /* CLEAR */, undefined, undefined, oldTarget);
|
|
1028
|
+
trigger(target, "clear" /* TriggerOpTypes.CLEAR */, undefined, undefined, oldTarget);
|
|
1029
1029
|
}
|
|
1030
1030
|
return result;
|
|
1031
1031
|
}
|
|
1032
1032
|
function createForEach(isReadonly, isShallow) {
|
|
1033
1033
|
return function forEach(callback, thisArg) {
|
|
1034
1034
|
const observed = this;
|
|
1035
|
-
const target = observed["__v_raw" /* RAW */];
|
|
1035
|
+
const target = observed["__v_raw" /* ReactiveFlags.RAW */];
|
|
1036
1036
|
const rawTarget = toRaw(target);
|
|
1037
1037
|
const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;
|
|
1038
|
-
!isReadonly && track(rawTarget, "iterate" /* ITERATE */, ITERATE_KEY);
|
|
1038
|
+
!isReadonly && track(rawTarget, "iterate" /* TrackOpTypes.ITERATE */, ITERATE_KEY);
|
|
1039
1039
|
return target.forEach((value, key) => {
|
|
1040
1040
|
// important: make sure the callback is
|
|
1041
1041
|
// 1. invoked with the reactive map as `this` and 3rd arg
|
|
@@ -1046,7 +1046,7 @@ var Vue = (function () {
|
|
|
1046
1046
|
}
|
|
1047
1047
|
function createIterableMethod(method, isReadonly, isShallow) {
|
|
1048
1048
|
return function (...args) {
|
|
1049
|
-
const target = this["__v_raw" /* RAW */];
|
|
1049
|
+
const target = this["__v_raw" /* ReactiveFlags.RAW */];
|
|
1050
1050
|
const rawTarget = toRaw(target);
|
|
1051
1051
|
const targetIsMap = isMap(rawTarget);
|
|
1052
1052
|
const isPair = method === 'entries' || (method === Symbol.iterator && targetIsMap);
|
|
@@ -1054,7 +1054,7 @@ var Vue = (function () {
|
|
|
1054
1054
|
const innerIterator = target[method](...args);
|
|
1055
1055
|
const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;
|
|
1056
1056
|
!isReadonly &&
|
|
1057
|
-
track(rawTarget, "iterate" /* ITERATE */, isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY);
|
|
1057
|
+
track(rawTarget, "iterate" /* TrackOpTypes.ITERATE */, isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY);
|
|
1058
1058
|
// return a wrapped iterator which returns observed versions of the
|
|
1059
1059
|
// values emitted from the real iterator
|
|
1060
1060
|
return {
|
|
@@ -1081,7 +1081,7 @@ var Vue = (function () {
|
|
|
1081
1081
|
const key = args[0] ? `on key "${args[0]}" ` : ``;
|
|
1082
1082
|
console.warn(`${capitalize(type)} operation ${key}failed: target is readonly.`, toRaw(this));
|
|
1083
1083
|
}
|
|
1084
|
-
return type === "delete" /* DELETE */ ? false : this;
|
|
1084
|
+
return type === "delete" /* TriggerOpTypes.DELETE */ ? false : this;
|
|
1085
1085
|
};
|
|
1086
1086
|
}
|
|
1087
1087
|
function createInstrumentations() {
|
|
@@ -1123,10 +1123,10 @@ var Vue = (function () {
|
|
|
1123
1123
|
has(key) {
|
|
1124
1124
|
return has$1.call(this, key, true);
|
|
1125
1125
|
},
|
|
1126
|
-
add: createReadonlyMethod("add" /* ADD */),
|
|
1127
|
-
set: createReadonlyMethod("set" /* SET */),
|
|
1128
|
-
delete: createReadonlyMethod("delete" /* DELETE */),
|
|
1129
|
-
clear: createReadonlyMethod("clear" /* CLEAR */),
|
|
1126
|
+
add: createReadonlyMethod("add" /* TriggerOpTypes.ADD */),
|
|
1127
|
+
set: createReadonlyMethod("set" /* TriggerOpTypes.SET */),
|
|
1128
|
+
delete: createReadonlyMethod("delete" /* TriggerOpTypes.DELETE */),
|
|
1129
|
+
clear: createReadonlyMethod("clear" /* TriggerOpTypes.CLEAR */),
|
|
1130
1130
|
forEach: createForEach(true, false)
|
|
1131
1131
|
};
|
|
1132
1132
|
const shallowReadonlyInstrumentations = {
|
|
@@ -1139,10 +1139,10 @@ var Vue = (function () {
|
|
|
1139
1139
|
has(key) {
|
|
1140
1140
|
return has$1.call(this, key, true);
|
|
1141
1141
|
},
|
|
1142
|
-
add: createReadonlyMethod("add" /* ADD */),
|
|
1143
|
-
set: createReadonlyMethod("set" /* SET */),
|
|
1144
|
-
delete: createReadonlyMethod("delete" /* DELETE */),
|
|
1145
|
-
clear: createReadonlyMethod("clear" /* CLEAR */),
|
|
1142
|
+
add: createReadonlyMethod("add" /* TriggerOpTypes.ADD */),
|
|
1143
|
+
set: createReadonlyMethod("set" /* TriggerOpTypes.SET */),
|
|
1144
|
+
delete: createReadonlyMethod("delete" /* TriggerOpTypes.DELETE */),
|
|
1145
|
+
clear: createReadonlyMethod("clear" /* TriggerOpTypes.CLEAR */),
|
|
1146
1146
|
forEach: createForEach(true, true)
|
|
1147
1147
|
};
|
|
1148
1148
|
const iteratorMethods = ['keys', 'values', 'entries', Symbol.iterator];
|
|
@@ -1169,13 +1169,13 @@ var Vue = (function () {
|
|
|
1169
1169
|
? readonlyInstrumentations
|
|
1170
1170
|
: mutableInstrumentations;
|
|
1171
1171
|
return (target, key, receiver) => {
|
|
1172
|
-
if (key === "__v_isReactive" /* IS_REACTIVE */) {
|
|
1172
|
+
if (key === "__v_isReactive" /* ReactiveFlags.IS_REACTIVE */) {
|
|
1173
1173
|
return !isReadonly;
|
|
1174
1174
|
}
|
|
1175
|
-
else if (key === "__v_isReadonly" /* IS_READONLY */) {
|
|
1175
|
+
else if (key === "__v_isReadonly" /* ReactiveFlags.IS_READONLY */) {
|
|
1176
1176
|
return isReadonly;
|
|
1177
1177
|
}
|
|
1178
|
-
else if (key === "__v_raw" /* RAW */) {
|
|
1178
|
+
else if (key === "__v_raw" /* ReactiveFlags.RAW */) {
|
|
1179
1179
|
return target;
|
|
1180
1180
|
}
|
|
1181
1181
|
return Reflect.get(hasOwn(instrumentations, key) && key in target
|
|
@@ -1215,19 +1215,19 @@ var Vue = (function () {
|
|
|
1215
1215
|
switch (rawType) {
|
|
1216
1216
|
case 'Object':
|
|
1217
1217
|
case 'Array':
|
|
1218
|
-
return 1 /* COMMON */;
|
|
1218
|
+
return 1 /* TargetType.COMMON */;
|
|
1219
1219
|
case 'Map':
|
|
1220
1220
|
case 'Set':
|
|
1221
1221
|
case 'WeakMap':
|
|
1222
1222
|
case 'WeakSet':
|
|
1223
|
-
return 2 /* COLLECTION */;
|
|
1223
|
+
return 2 /* TargetType.COLLECTION */;
|
|
1224
1224
|
default:
|
|
1225
|
-
return 0 /* INVALID */;
|
|
1225
|
+
return 0 /* TargetType.INVALID */;
|
|
1226
1226
|
}
|
|
1227
1227
|
}
|
|
1228
1228
|
function getTargetType(value) {
|
|
1229
|
-
return value["__v_skip" /* SKIP */] || !Object.isExtensible(value)
|
|
1230
|
-
? 0 /* INVALID */
|
|
1229
|
+
return value["__v_skip" /* ReactiveFlags.SKIP */] || !Object.isExtensible(value)
|
|
1230
|
+
? 0 /* TargetType.INVALID */
|
|
1231
1231
|
: targetTypeMap(toRawType(value));
|
|
1232
1232
|
}
|
|
1233
1233
|
function reactive(target) {
|
|
@@ -1270,8 +1270,8 @@ var Vue = (function () {
|
|
|
1270
1270
|
}
|
|
1271
1271
|
// target is already a Proxy, return it.
|
|
1272
1272
|
// exception: calling readonly() on a reactive object
|
|
1273
|
-
if (target["__v_raw" /* RAW */] &&
|
|
1274
|
-
!(isReadonly && target["__v_isReactive" /* IS_REACTIVE */])) {
|
|
1273
|
+
if (target["__v_raw" /* ReactiveFlags.RAW */] &&
|
|
1274
|
+
!(isReadonly && target["__v_isReactive" /* ReactiveFlags.IS_REACTIVE */])) {
|
|
1275
1275
|
return target;
|
|
1276
1276
|
}
|
|
1277
1277
|
// target already has corresponding Proxy
|
|
@@ -1281,34 +1281,34 @@ var Vue = (function () {
|
|
|
1281
1281
|
}
|
|
1282
1282
|
// only specific value types can be observed.
|
|
1283
1283
|
const targetType = getTargetType(target);
|
|
1284
|
-
if (targetType === 0 /* INVALID */) {
|
|
1284
|
+
if (targetType === 0 /* TargetType.INVALID */) {
|
|
1285
1285
|
return target;
|
|
1286
1286
|
}
|
|
1287
|
-
const proxy = new Proxy(target, targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers);
|
|
1287
|
+
const proxy = new Proxy(target, targetType === 2 /* TargetType.COLLECTION */ ? collectionHandlers : baseHandlers);
|
|
1288
1288
|
proxyMap.set(target, proxy);
|
|
1289
1289
|
return proxy;
|
|
1290
1290
|
}
|
|
1291
1291
|
function isReactive(value) {
|
|
1292
1292
|
if (isReadonly(value)) {
|
|
1293
|
-
return isReactive(value["__v_raw" /* RAW */]);
|
|
1293
|
+
return isReactive(value["__v_raw" /* ReactiveFlags.RAW */]);
|
|
1294
1294
|
}
|
|
1295
|
-
return !!(value && value["__v_isReactive" /* IS_REACTIVE */]);
|
|
1295
|
+
return !!(value && value["__v_isReactive" /* ReactiveFlags.IS_REACTIVE */]);
|
|
1296
1296
|
}
|
|
1297
1297
|
function isReadonly(value) {
|
|
1298
|
-
return !!(value && value["__v_isReadonly" /* IS_READONLY */]);
|
|
1298
|
+
return !!(value && value["__v_isReadonly" /* ReactiveFlags.IS_READONLY */]);
|
|
1299
1299
|
}
|
|
1300
1300
|
function isShallow(value) {
|
|
1301
|
-
return !!(value && value["__v_isShallow" /* IS_SHALLOW */]);
|
|
1301
|
+
return !!(value && value["__v_isShallow" /* ReactiveFlags.IS_SHALLOW */]);
|
|
1302
1302
|
}
|
|
1303
1303
|
function isProxy(value) {
|
|
1304
1304
|
return isReactive(value) || isReadonly(value);
|
|
1305
1305
|
}
|
|
1306
1306
|
function toRaw(observed) {
|
|
1307
|
-
const raw = observed && observed["__v_raw" /* RAW */];
|
|
1307
|
+
const raw = observed && observed["__v_raw" /* ReactiveFlags.RAW */];
|
|
1308
1308
|
return raw ? toRaw(raw) : observed;
|
|
1309
1309
|
}
|
|
1310
1310
|
function markRaw(value) {
|
|
1311
|
-
def(value, "__v_skip" /* SKIP */, true);
|
|
1311
|
+
def(value, "__v_skip" /* ReactiveFlags.SKIP */, true);
|
|
1312
1312
|
return value;
|
|
1313
1313
|
}
|
|
1314
1314
|
const toReactive = (value) => isObject(value) ? reactive(value) : value;
|
|
@@ -1320,7 +1320,7 @@ var Vue = (function () {
|
|
|
1320
1320
|
{
|
|
1321
1321
|
trackEffects(ref.dep || (ref.dep = createDep()), {
|
|
1322
1322
|
target: ref,
|
|
1323
|
-
type: "get" /* GET */,
|
|
1323
|
+
type: "get" /* TrackOpTypes.GET */,
|
|
1324
1324
|
key: 'value'
|
|
1325
1325
|
});
|
|
1326
1326
|
}
|
|
@@ -1332,7 +1332,7 @@ var Vue = (function () {
|
|
|
1332
1332
|
{
|
|
1333
1333
|
triggerEffects(ref.dep, {
|
|
1334
1334
|
target: ref,
|
|
1335
|
-
type: "set" /* SET */,
|
|
1335
|
+
type: "set" /* TriggerOpTypes.SET */,
|
|
1336
1336
|
key: 'value',
|
|
1337
1337
|
newValue: newVal
|
|
1338
1338
|
});
|
|
@@ -1367,10 +1367,11 @@ var Vue = (function () {
|
|
|
1367
1367
|
return this._value;
|
|
1368
1368
|
}
|
|
1369
1369
|
set value(newVal) {
|
|
1370
|
-
|
|
1370
|
+
const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal);
|
|
1371
|
+
newVal = useDirectValue ? newVal : toRaw(newVal);
|
|
1371
1372
|
if (hasChanged(newVal, this._rawValue)) {
|
|
1372
1373
|
this._rawValue = newVal;
|
|
1373
|
-
this._value =
|
|
1374
|
+
this._value = useDirectValue ? newVal : toReactive(newVal);
|
|
1374
1375
|
triggerRefValue(this, newVal);
|
|
1375
1376
|
}
|
|
1376
1377
|
}
|
|
@@ -1449,11 +1450,13 @@ var Vue = (function () {
|
|
|
1449
1450
|
: new ObjectRefImpl(object, key, defaultValue);
|
|
1450
1451
|
}
|
|
1451
1452
|
|
|
1453
|
+
var _a;
|
|
1452
1454
|
class ComputedRefImpl {
|
|
1453
1455
|
constructor(getter, _setter, isReadonly, isSSR) {
|
|
1454
1456
|
this._setter = _setter;
|
|
1455
1457
|
this.dep = undefined;
|
|
1456
1458
|
this.__v_isRef = true;
|
|
1459
|
+
this[_a] = false;
|
|
1457
1460
|
this._dirty = true;
|
|
1458
1461
|
this.effect = new ReactiveEffect(getter, () => {
|
|
1459
1462
|
if (!this._dirty) {
|
|
@@ -1463,7 +1466,7 @@ var Vue = (function () {
|
|
|
1463
1466
|
});
|
|
1464
1467
|
this.effect.computed = this;
|
|
1465
1468
|
this.effect.active = this._cacheable = !isSSR;
|
|
1466
|
-
this["__v_isReadonly" /* IS_READONLY */] = isReadonly;
|
|
1469
|
+
this["__v_isReadonly" /* ReactiveFlags.IS_READONLY */] = isReadonly;
|
|
1467
1470
|
}
|
|
1468
1471
|
get value() {
|
|
1469
1472
|
// the computed ref may get wrapped by other proxies e.g. readonly() #3376
|
|
@@ -1479,6 +1482,7 @@ var Vue = (function () {
|
|
|
1479
1482
|
this._setter(newValue);
|
|
1480
1483
|
}
|
|
1481
1484
|
}
|
|
1485
|
+
_a = "__v_isReadonly" /* ReactiveFlags.IS_READONLY */;
|
|
1482
1486
|
function computed(getterOrOptions, debugOptions, isSSR = false) {
|
|
1483
1487
|
let getter;
|
|
1484
1488
|
let setter;
|
|
@@ -1517,7 +1521,7 @@ var Vue = (function () {
|
|
|
1517
1521
|
const appWarnHandler = instance && instance.appContext.config.warnHandler;
|
|
1518
1522
|
const trace = getComponentTrace();
|
|
1519
1523
|
if (appWarnHandler) {
|
|
1520
|
-
callWithErrorHandling(appWarnHandler, instance, 11 /* APP_WARN_HANDLER */, [
|
|
1524
|
+
callWithErrorHandling(appWarnHandler, instance, 11 /* ErrorCodes.APP_WARN_HANDLER */, [
|
|
1521
1525
|
msg + args.join(''),
|
|
1522
1526
|
instance && instance.proxy,
|
|
1523
1527
|
trace
|
|
@@ -1617,35 +1621,35 @@ var Vue = (function () {
|
|
|
1617
1621
|
}
|
|
1618
1622
|
|
|
1619
1623
|
const ErrorTypeStrings = {
|
|
1620
|
-
["sp" /* SERVER_PREFETCH */]: 'serverPrefetch hook',
|
|
1621
|
-
["bc" /* BEFORE_CREATE */]: 'beforeCreate hook',
|
|
1622
|
-
["c" /* CREATED */]: 'created hook',
|
|
1623
|
-
["bm" /* BEFORE_MOUNT */]: 'beforeMount hook',
|
|
1624
|
-
["m" /* MOUNTED */]: 'mounted hook',
|
|
1625
|
-
["bu" /* BEFORE_UPDATE */]: 'beforeUpdate hook',
|
|
1626
|
-
["u" /* UPDATED */]: 'updated',
|
|
1627
|
-
["bum" /* BEFORE_UNMOUNT */]: 'beforeUnmount hook',
|
|
1628
|
-
["um" /* UNMOUNTED */]: 'unmounted hook',
|
|
1629
|
-
["a" /* ACTIVATED */]: 'activated hook',
|
|
1630
|
-
["da" /* DEACTIVATED */]: 'deactivated hook',
|
|
1631
|
-
["ec" /* ERROR_CAPTURED */]: 'errorCaptured hook',
|
|
1632
|
-
["rtc" /* RENDER_TRACKED */]: 'renderTracked hook',
|
|
1633
|
-
["rtg" /* RENDER_TRIGGERED */]: 'renderTriggered hook',
|
|
1634
|
-
[0 /* SETUP_FUNCTION */]: 'setup function',
|
|
1635
|
-
[1 /* RENDER_FUNCTION */]: 'render function',
|
|
1636
|
-
[2 /* WATCH_GETTER */]: 'watcher getter',
|
|
1637
|
-
[3 /* WATCH_CALLBACK */]: 'watcher callback',
|
|
1638
|
-
[4 /* WATCH_CLEANUP */]: 'watcher cleanup function',
|
|
1639
|
-
[5 /* NATIVE_EVENT_HANDLER */]: 'native event handler',
|
|
1640
|
-
[6 /* COMPONENT_EVENT_HANDLER */]: 'component event handler',
|
|
1641
|
-
[7 /* VNODE_HOOK */]: 'vnode hook',
|
|
1642
|
-
[8 /* DIRECTIVE_HOOK */]: 'directive hook',
|
|
1643
|
-
[9 /* TRANSITION_HOOK */]: 'transition hook',
|
|
1644
|
-
[10 /* APP_ERROR_HANDLER */]: 'app errorHandler',
|
|
1645
|
-
[11 /* APP_WARN_HANDLER */]: 'app warnHandler',
|
|
1646
|
-
[12 /* FUNCTION_REF */]: 'ref function',
|
|
1647
|
-
[13 /* ASYNC_COMPONENT_LOADER */]: 'async component loader',
|
|
1648
|
-
[14 /* SCHEDULER */]: 'scheduler flush. This is likely a Vue internals bug. ' +
|
|
1624
|
+
["sp" /* LifecycleHooks.SERVER_PREFETCH */]: 'serverPrefetch hook',
|
|
1625
|
+
["bc" /* LifecycleHooks.BEFORE_CREATE */]: 'beforeCreate hook',
|
|
1626
|
+
["c" /* LifecycleHooks.CREATED */]: 'created hook',
|
|
1627
|
+
["bm" /* LifecycleHooks.BEFORE_MOUNT */]: 'beforeMount hook',
|
|
1628
|
+
["m" /* LifecycleHooks.MOUNTED */]: 'mounted hook',
|
|
1629
|
+
["bu" /* LifecycleHooks.BEFORE_UPDATE */]: 'beforeUpdate hook',
|
|
1630
|
+
["u" /* LifecycleHooks.UPDATED */]: 'updated',
|
|
1631
|
+
["bum" /* LifecycleHooks.BEFORE_UNMOUNT */]: 'beforeUnmount hook',
|
|
1632
|
+
["um" /* LifecycleHooks.UNMOUNTED */]: 'unmounted hook',
|
|
1633
|
+
["a" /* LifecycleHooks.ACTIVATED */]: 'activated hook',
|
|
1634
|
+
["da" /* LifecycleHooks.DEACTIVATED */]: 'deactivated hook',
|
|
1635
|
+
["ec" /* LifecycleHooks.ERROR_CAPTURED */]: 'errorCaptured hook',
|
|
1636
|
+
["rtc" /* LifecycleHooks.RENDER_TRACKED */]: 'renderTracked hook',
|
|
1637
|
+
["rtg" /* LifecycleHooks.RENDER_TRIGGERED */]: 'renderTriggered hook',
|
|
1638
|
+
[0 /* ErrorCodes.SETUP_FUNCTION */]: 'setup function',
|
|
1639
|
+
[1 /* ErrorCodes.RENDER_FUNCTION */]: 'render function',
|
|
1640
|
+
[2 /* ErrorCodes.WATCH_GETTER */]: 'watcher getter',
|
|
1641
|
+
[3 /* ErrorCodes.WATCH_CALLBACK */]: 'watcher callback',
|
|
1642
|
+
[4 /* ErrorCodes.WATCH_CLEANUP */]: 'watcher cleanup function',
|
|
1643
|
+
[5 /* ErrorCodes.NATIVE_EVENT_HANDLER */]: 'native event handler',
|
|
1644
|
+
[6 /* ErrorCodes.COMPONENT_EVENT_HANDLER */]: 'component event handler',
|
|
1645
|
+
[7 /* ErrorCodes.VNODE_HOOK */]: 'vnode hook',
|
|
1646
|
+
[8 /* ErrorCodes.DIRECTIVE_HOOK */]: 'directive hook',
|
|
1647
|
+
[9 /* ErrorCodes.TRANSITION_HOOK */]: 'transition hook',
|
|
1648
|
+
[10 /* ErrorCodes.APP_ERROR_HANDLER */]: 'app errorHandler',
|
|
1649
|
+
[11 /* ErrorCodes.APP_WARN_HANDLER */]: 'app warnHandler',
|
|
1650
|
+
[12 /* ErrorCodes.FUNCTION_REF */]: 'ref function',
|
|
1651
|
+
[13 /* ErrorCodes.ASYNC_COMPONENT_LOADER */]: 'async component loader',
|
|
1652
|
+
[14 /* ErrorCodes.SCHEDULER */]: 'scheduler flush. This is likely a Vue internals bug. ' +
|
|
1649
1653
|
'Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core'
|
|
1650
1654
|
};
|
|
1651
1655
|
function callWithErrorHandling(fn, instance, type, args) {
|
|
@@ -1696,7 +1700,7 @@ var Vue = (function () {
|
|
|
1696
1700
|
// app-level handling
|
|
1697
1701
|
const appErrorHandler = instance.appContext.config.errorHandler;
|
|
1698
1702
|
if (appErrorHandler) {
|
|
1699
|
-
callWithErrorHandling(appErrorHandler, null, 10 /* APP_ERROR_HANDLER */, [err, exposedInstance, errorInfo]);
|
|
1703
|
+
callWithErrorHandling(appErrorHandler, null, 10 /* ErrorCodes.APP_ERROR_HANDLER */, [err, exposedInstance, errorInfo]);
|
|
1700
1704
|
return;
|
|
1701
1705
|
}
|
|
1702
1706
|
}
|
|
@@ -1726,15 +1730,11 @@ var Vue = (function () {
|
|
|
1726
1730
|
let isFlushPending = false;
|
|
1727
1731
|
const queue = [];
|
|
1728
1732
|
let flushIndex = 0;
|
|
1729
|
-
const pendingPreFlushCbs = [];
|
|
1730
|
-
let activePreFlushCbs = null;
|
|
1731
|
-
let preFlushIndex = 0;
|
|
1732
1733
|
const pendingPostFlushCbs = [];
|
|
1733
1734
|
let activePostFlushCbs = null;
|
|
1734
1735
|
let postFlushIndex = 0;
|
|
1735
1736
|
const resolvedPromise = /*#__PURE__*/ Promise.resolve();
|
|
1736
1737
|
let currentFlushPromise = null;
|
|
1737
|
-
let currentPreFlushParentJob = null;
|
|
1738
1738
|
const RECURSION_LIMIT = 100;
|
|
1739
1739
|
function nextTick(fn) {
|
|
1740
1740
|
const p = currentFlushPromise || resolvedPromise;
|
|
@@ -1762,9 +1762,8 @@ var Vue = (function () {
|
|
|
1762
1762
|
// if the job is a watch() callback, the search will start with a +1 index to
|
|
1763
1763
|
// allow it recursively trigger itself - it is the user's responsibility to
|
|
1764
1764
|
// ensure it doesn't end up in an infinite loop.
|
|
1765
|
-
if (
|
|
1766
|
-
!queue.includes(job, isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex))
|
|
1767
|
-
job !== currentPreFlushParentJob) {
|
|
1765
|
+
if (!queue.length ||
|
|
1766
|
+
!queue.includes(job, isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex)) {
|
|
1768
1767
|
if (job.id == null) {
|
|
1769
1768
|
queue.push(job);
|
|
1770
1769
|
}
|
|
@@ -1786,51 +1785,40 @@ var Vue = (function () {
|
|
|
1786
1785
|
queue.splice(i, 1);
|
|
1787
1786
|
}
|
|
1788
1787
|
}
|
|
1789
|
-
function
|
|
1788
|
+
function queuePostFlushCb(cb) {
|
|
1790
1789
|
if (!isArray(cb)) {
|
|
1791
|
-
if (!
|
|
1792
|
-
!
|
|
1793
|
-
|
|
1790
|
+
if (!activePostFlushCbs ||
|
|
1791
|
+
!activePostFlushCbs.includes(cb, cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex)) {
|
|
1792
|
+
pendingPostFlushCbs.push(cb);
|
|
1794
1793
|
}
|
|
1795
1794
|
}
|
|
1796
1795
|
else {
|
|
1797
1796
|
// if cb is an array, it is a component lifecycle hook which can only be
|
|
1798
1797
|
// triggered by a job, which is already deduped in the main queue, so
|
|
1799
1798
|
// we can skip duplicate check here to improve perf
|
|
1800
|
-
|
|
1799
|
+
pendingPostFlushCbs.push(...cb);
|
|
1801
1800
|
}
|
|
1802
1801
|
queueFlush();
|
|
1803
1802
|
}
|
|
1804
|
-
function
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
pendingPreFlushCbs.length = 0;
|
|
1815
|
-
{
|
|
1816
|
-
seen = seen || new Map();
|
|
1817
|
-
}
|
|
1818
|
-
for (preFlushIndex = 0; preFlushIndex < activePreFlushCbs.length; preFlushIndex++) {
|
|
1819
|
-
if (checkRecursiveUpdates(seen, activePreFlushCbs[preFlushIndex])) {
|
|
1803
|
+
function flushPreFlushCbs(seen,
|
|
1804
|
+
// if currently flushing, skip the current job itself
|
|
1805
|
+
i = isFlushing ? flushIndex + 1 : 0) {
|
|
1806
|
+
{
|
|
1807
|
+
seen = seen || new Map();
|
|
1808
|
+
}
|
|
1809
|
+
for (; i < queue.length; i++) {
|
|
1810
|
+
const cb = queue[i];
|
|
1811
|
+
if (cb && cb.pre) {
|
|
1812
|
+
if (checkRecursiveUpdates(seen, cb)) {
|
|
1820
1813
|
continue;
|
|
1821
1814
|
}
|
|
1822
|
-
|
|
1815
|
+
queue.splice(i, 1);
|
|
1816
|
+
i--;
|
|
1817
|
+
cb();
|
|
1823
1818
|
}
|
|
1824
|
-
activePreFlushCbs = null;
|
|
1825
|
-
preFlushIndex = 0;
|
|
1826
|
-
currentPreFlushParentJob = null;
|
|
1827
|
-
// recursively flush until it drains
|
|
1828
|
-
flushPreFlushCbs(seen, parentJob);
|
|
1829
1819
|
}
|
|
1830
1820
|
}
|
|
1831
1821
|
function flushPostFlushCbs(seen) {
|
|
1832
|
-
// flush any pre cbs queued during the flush (e.g. pre watchers)
|
|
1833
|
-
flushPreFlushCbs();
|
|
1834
1822
|
if (pendingPostFlushCbs.length) {
|
|
1835
1823
|
const deduped = [...new Set(pendingPostFlushCbs)];
|
|
1836
1824
|
pendingPostFlushCbs.length = 0;
|
|
@@ -1855,13 +1843,22 @@ var Vue = (function () {
|
|
|
1855
1843
|
}
|
|
1856
1844
|
}
|
|
1857
1845
|
const getId = (job) => job.id == null ? Infinity : job.id;
|
|
1846
|
+
const comparator = (a, b) => {
|
|
1847
|
+
const diff = getId(a) - getId(b);
|
|
1848
|
+
if (diff === 0) {
|
|
1849
|
+
if (a.pre && !b.pre)
|
|
1850
|
+
return -1;
|
|
1851
|
+
if (b.pre && !a.pre)
|
|
1852
|
+
return 1;
|
|
1853
|
+
}
|
|
1854
|
+
return diff;
|
|
1855
|
+
};
|
|
1858
1856
|
function flushJobs(seen) {
|
|
1859
1857
|
isFlushPending = false;
|
|
1860
1858
|
isFlushing = true;
|
|
1861
1859
|
{
|
|
1862
1860
|
seen = seen || new Map();
|
|
1863
1861
|
}
|
|
1864
|
-
flushPreFlushCbs(seen);
|
|
1865
1862
|
// Sort queue before flush.
|
|
1866
1863
|
// This ensures that:
|
|
1867
1864
|
// 1. Components are updated from parent to child. (because parent is always
|
|
@@ -1869,7 +1866,7 @@ var Vue = (function () {
|
|
|
1869
1866
|
// priority number)
|
|
1870
1867
|
// 2. If a component is unmounted during a parent component's update,
|
|
1871
1868
|
// its update can be skipped.
|
|
1872
|
-
queue.sort(
|
|
1869
|
+
queue.sort(comparator);
|
|
1873
1870
|
// conditional usage of checkRecursiveUpdate must be determined out of
|
|
1874
1871
|
// try ... catch block since Rollup by default de-optimizes treeshaking
|
|
1875
1872
|
// inside try-catch. This can leave all warning code unshaked. Although
|
|
@@ -1885,7 +1882,7 @@ var Vue = (function () {
|
|
|
1885
1882
|
continue;
|
|
1886
1883
|
}
|
|
1887
1884
|
// console.log(`running:`, job.id)
|
|
1888
|
-
callWithErrorHandling(job, null, 14 /* SCHEDULER */);
|
|
1885
|
+
callWithErrorHandling(job, null, 14 /* ErrorCodes.SCHEDULER */);
|
|
1889
1886
|
}
|
|
1890
1887
|
}
|
|
1891
1888
|
}
|
|
@@ -1897,9 +1894,7 @@ var Vue = (function () {
|
|
|
1897
1894
|
currentFlushPromise = null;
|
|
1898
1895
|
// some postFlushCb queued jobs!
|
|
1899
1896
|
// keep flushing until it drains.
|
|
1900
|
-
if (queue.length ||
|
|
1901
|
-
pendingPreFlushCbs.length ||
|
|
1902
|
-
pendingPostFlushCbs.length) {
|
|
1897
|
+
if (queue.length || pendingPostFlushCbs.length) {
|
|
1903
1898
|
flushJobs(seen);
|
|
1904
1899
|
}
|
|
1905
1900
|
}
|
|
@@ -2117,7 +2112,7 @@ var Vue = (function () {
|
|
|
2117
2112
|
}
|
|
2118
2113
|
}
|
|
2119
2114
|
function devtoolsInitApp(app, version) {
|
|
2120
|
-
emit("app:init" /* APP_INIT */, app, version, {
|
|
2115
|
+
emit("app:init" /* DevtoolsHooks.APP_INIT */, app, version, {
|
|
2121
2116
|
Fragment,
|
|
2122
2117
|
Text,
|
|
2123
2118
|
Comment,
|
|
@@ -2125,88 +2120,88 @@ var Vue = (function () {
|
|
|
2125
2120
|
});
|
|
2126
2121
|
}
|
|
2127
2122
|
function devtoolsUnmountApp(app) {
|
|
2128
|
-
emit("app:unmount" /* APP_UNMOUNT */, app);
|
|
2123
|
+
emit("app:unmount" /* DevtoolsHooks.APP_UNMOUNT */, app);
|
|
2129
2124
|
}
|
|
2130
|
-
const devtoolsComponentAdded = /*#__PURE__*/ createDevtoolsComponentHook("component:added" /* COMPONENT_ADDED */);
|
|
2125
|
+
const devtoolsComponentAdded = /*#__PURE__*/ createDevtoolsComponentHook("component:added" /* DevtoolsHooks.COMPONENT_ADDED */);
|
|
2131
2126
|
const devtoolsComponentUpdated =
|
|
2132
|
-
/*#__PURE__*/ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */);
|
|
2127
|
+
/*#__PURE__*/ createDevtoolsComponentHook("component:updated" /* DevtoolsHooks.COMPONENT_UPDATED */);
|
|
2133
2128
|
const devtoolsComponentRemoved =
|
|
2134
|
-
/*#__PURE__*/ createDevtoolsComponentHook("component:removed" /* COMPONENT_REMOVED */);
|
|
2129
|
+
/*#__PURE__*/ createDevtoolsComponentHook("component:removed" /* DevtoolsHooks.COMPONENT_REMOVED */);
|
|
2135
2130
|
function createDevtoolsComponentHook(hook) {
|
|
2136
2131
|
return (component) => {
|
|
2137
2132
|
emit(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : undefined, component);
|
|
2138
2133
|
};
|
|
2139
2134
|
}
|
|
2140
|
-
const devtoolsPerfStart = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:start" /* PERFORMANCE_START */);
|
|
2141
|
-
const devtoolsPerfEnd = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:end" /* PERFORMANCE_END */);
|
|
2135
|
+
const devtoolsPerfStart = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:start" /* DevtoolsHooks.PERFORMANCE_START */);
|
|
2136
|
+
const devtoolsPerfEnd = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:end" /* DevtoolsHooks.PERFORMANCE_END */);
|
|
2142
2137
|
function createDevtoolsPerformanceHook(hook) {
|
|
2143
2138
|
return (component, type, time) => {
|
|
2144
2139
|
emit(hook, component.appContext.app, component.uid, component, type, time);
|
|
2145
2140
|
};
|
|
2146
2141
|
}
|
|
2147
2142
|
function devtoolsComponentEmit(component, event, params) {
|
|
2148
|
-
emit("component:emit" /* COMPONENT_EMIT */, component.appContext.app, component, event, params);
|
|
2143
|
+
emit("component:emit" /* DevtoolsHooks.COMPONENT_EMIT */, component.appContext.app, component, event, params);
|
|
2149
2144
|
}
|
|
2150
2145
|
|
|
2151
2146
|
const deprecationData = {
|
|
2152
|
-
["GLOBAL_MOUNT" /* GLOBAL_MOUNT */]: {
|
|
2147
|
+
["GLOBAL_MOUNT" /* DeprecationTypes.GLOBAL_MOUNT */]: {
|
|
2153
2148
|
message: `The global app bootstrapping API has changed: vm.$mount() and the "el" ` +
|
|
2154
2149
|
`option have been removed. Use createApp(RootComponent).mount() instead.`,
|
|
2155
2150
|
link: `https://v3-migration.vuejs.org/breaking-changes/global-api.html#mounting-app-instance`
|
|
2156
2151
|
},
|
|
2157
|
-
["GLOBAL_MOUNT_CONTAINER" /* GLOBAL_MOUNT_CONTAINER */]: {
|
|
2152
|
+
["GLOBAL_MOUNT_CONTAINER" /* DeprecationTypes.GLOBAL_MOUNT_CONTAINER */]: {
|
|
2158
2153
|
message: `Vue detected directives on the mount container. ` +
|
|
2159
2154
|
`In Vue 3, the container is no longer considered part of the template ` +
|
|
2160
2155
|
`and will not be processed/replaced.`,
|
|
2161
2156
|
link: `https://v3-migration.vuejs.org/breaking-changes/mount-changes.html`
|
|
2162
2157
|
},
|
|
2163
|
-
["GLOBAL_EXTEND" /* GLOBAL_EXTEND */]: {
|
|
2158
|
+
["GLOBAL_EXTEND" /* DeprecationTypes.GLOBAL_EXTEND */]: {
|
|
2164
2159
|
message: `Vue.extend() has been removed in Vue 3. ` +
|
|
2165
2160
|
`Use defineComponent() instead.`,
|
|
2166
2161
|
link: `https://vuejs.org/api/general.html#definecomponent`
|
|
2167
2162
|
},
|
|
2168
|
-
["GLOBAL_PROTOTYPE" /* GLOBAL_PROTOTYPE */]: {
|
|
2163
|
+
["GLOBAL_PROTOTYPE" /* DeprecationTypes.GLOBAL_PROTOTYPE */]: {
|
|
2169
2164
|
message: `Vue.prototype is no longer available in Vue 3. ` +
|
|
2170
2165
|
`Use app.config.globalProperties instead.`,
|
|
2171
2166
|
link: `https://v3-migration.vuejs.org/breaking-changes/global-api.html#vue-prototype-replaced-by-config-globalproperties`
|
|
2172
2167
|
},
|
|
2173
|
-
["GLOBAL_SET" /* GLOBAL_SET */]: {
|
|
2168
|
+
["GLOBAL_SET" /* DeprecationTypes.GLOBAL_SET */]: {
|
|
2174
2169
|
message: `Vue.set() has been removed as it is no longer needed in Vue 3. ` +
|
|
2175
2170
|
`Simply use native JavaScript mutations.`
|
|
2176
2171
|
},
|
|
2177
|
-
["GLOBAL_DELETE" /* GLOBAL_DELETE */]: {
|
|
2172
|
+
["GLOBAL_DELETE" /* DeprecationTypes.GLOBAL_DELETE */]: {
|
|
2178
2173
|
message: `Vue.delete() has been removed as it is no longer needed in Vue 3. ` +
|
|
2179
2174
|
`Simply use native JavaScript mutations.`
|
|
2180
2175
|
},
|
|
2181
|
-
["GLOBAL_OBSERVABLE" /* GLOBAL_OBSERVABLE */]: {
|
|
2176
|
+
["GLOBAL_OBSERVABLE" /* DeprecationTypes.GLOBAL_OBSERVABLE */]: {
|
|
2182
2177
|
message: `Vue.observable() has been removed. ` +
|
|
2183
2178
|
`Use \`import { reactive } from "vue"\` from Composition API instead.`,
|
|
2184
2179
|
link: `https://vuejs.org/api/reactivity-core.html#reactive`
|
|
2185
2180
|
},
|
|
2186
|
-
["GLOBAL_PRIVATE_UTIL" /* GLOBAL_PRIVATE_UTIL */]: {
|
|
2181
|
+
["GLOBAL_PRIVATE_UTIL" /* DeprecationTypes.GLOBAL_PRIVATE_UTIL */]: {
|
|
2187
2182
|
message: `Vue.util has been removed. Please refactor to avoid its usage ` +
|
|
2188
2183
|
`since it was an internal API even in Vue 2.`
|
|
2189
2184
|
},
|
|
2190
|
-
["CONFIG_SILENT" /* CONFIG_SILENT */]: {
|
|
2185
|
+
["CONFIG_SILENT" /* DeprecationTypes.CONFIG_SILENT */]: {
|
|
2191
2186
|
message: `config.silent has been removed because it is not good practice to ` +
|
|
2192
2187
|
`intentionally suppress warnings. You can use your browser console's ` +
|
|
2193
2188
|
`filter features to focus on relevant messages.`
|
|
2194
2189
|
},
|
|
2195
|
-
["CONFIG_DEVTOOLS" /* CONFIG_DEVTOOLS */]: {
|
|
2190
|
+
["CONFIG_DEVTOOLS" /* DeprecationTypes.CONFIG_DEVTOOLS */]: {
|
|
2196
2191
|
message: `config.devtools has been removed. To enable devtools for ` +
|
|
2197
2192
|
`production, configure the __VUE_PROD_DEVTOOLS__ compile-time flag.`,
|
|
2198
2193
|
link: `https://github.com/vuejs/core/tree/main/packages/vue#bundler-build-feature-flags`
|
|
2199
2194
|
},
|
|
2200
|
-
["CONFIG_KEY_CODES" /* CONFIG_KEY_CODES */]: {
|
|
2195
|
+
["CONFIG_KEY_CODES" /* DeprecationTypes.CONFIG_KEY_CODES */]: {
|
|
2201
2196
|
message: `config.keyCodes has been removed. ` +
|
|
2202
2197
|
`In Vue 3, you can directly use the kebab-case key names as v-on modifiers.`,
|
|
2203
2198
|
link: `https://v3-migration.vuejs.org/breaking-changes/keycode-modifiers.html`
|
|
2204
2199
|
},
|
|
2205
|
-
["CONFIG_PRODUCTION_TIP" /* CONFIG_PRODUCTION_TIP */]: {
|
|
2200
|
+
["CONFIG_PRODUCTION_TIP" /* DeprecationTypes.CONFIG_PRODUCTION_TIP */]: {
|
|
2206
2201
|
message: `config.productionTip has been removed.`,
|
|
2207
2202
|
link: `https://v3-migration.vuejs.org/breaking-changes/global-api.html#config-productiontip-removed`
|
|
2208
2203
|
},
|
|
2209
|
-
["CONFIG_IGNORED_ELEMENTS" /* CONFIG_IGNORED_ELEMENTS */]: {
|
|
2204
|
+
["CONFIG_IGNORED_ELEMENTS" /* DeprecationTypes.CONFIG_IGNORED_ELEMENTS */]: {
|
|
2210
2205
|
message: () => {
|
|
2211
2206
|
let msg = `config.ignoredElements has been removed.`;
|
|
2212
2207
|
if (isRuntimeOnly()) {
|
|
@@ -2219,35 +2214,35 @@ var Vue = (function () {
|
|
|
2219
2214
|
},
|
|
2220
2215
|
link: `https://v3-migration.vuejs.org/breaking-changes/global-api.html#config-ignoredelements-is-now-config-iscustomelement`
|
|
2221
2216
|
},
|
|
2222
|
-
["CONFIG_WHITESPACE" /* CONFIG_WHITESPACE */]: {
|
|
2217
|
+
["CONFIG_WHITESPACE" /* DeprecationTypes.CONFIG_WHITESPACE */]: {
|
|
2223
2218
|
// this warning is only relevant in the full build when using runtime
|
|
2224
2219
|
// compilation, so it's put in the runtime compatConfig list.
|
|
2225
2220
|
message: `Vue 3 compiler's whitespace option will default to "condense" instead of ` +
|
|
2226
2221
|
`"preserve". To suppress this warning, provide an explicit value for ` +
|
|
2227
2222
|
`\`config.compilerOptions.whitespace\`.`
|
|
2228
2223
|
},
|
|
2229
|
-
["CONFIG_OPTION_MERGE_STRATS" /* CONFIG_OPTION_MERGE_STRATS */]: {
|
|
2224
|
+
["CONFIG_OPTION_MERGE_STRATS" /* DeprecationTypes.CONFIG_OPTION_MERGE_STRATS */]: {
|
|
2230
2225
|
message: `config.optionMergeStrategies no longer exposes internal strategies. ` +
|
|
2231
2226
|
`Use custom merge functions instead.`
|
|
2232
2227
|
},
|
|
2233
|
-
["INSTANCE_SET" /* INSTANCE_SET */]: {
|
|
2228
|
+
["INSTANCE_SET" /* DeprecationTypes.INSTANCE_SET */]: {
|
|
2234
2229
|
message: `vm.$set() has been removed as it is no longer needed in Vue 3. ` +
|
|
2235
2230
|
`Simply use native JavaScript mutations.`
|
|
2236
2231
|
},
|
|
2237
|
-
["INSTANCE_DELETE" /* INSTANCE_DELETE */]: {
|
|
2232
|
+
["INSTANCE_DELETE" /* DeprecationTypes.INSTANCE_DELETE */]: {
|
|
2238
2233
|
message: `vm.$delete() has been removed as it is no longer needed in Vue 3. ` +
|
|
2239
2234
|
`Simply use native JavaScript mutations.`
|
|
2240
2235
|
},
|
|
2241
|
-
["INSTANCE_DESTROY" /* INSTANCE_DESTROY */]: {
|
|
2236
|
+
["INSTANCE_DESTROY" /* DeprecationTypes.INSTANCE_DESTROY */]: {
|
|
2242
2237
|
message: `vm.$destroy() has been removed. Use app.unmount() instead.`,
|
|
2243
2238
|
link: `https://vuejs.org/api/application.html#app-unmount`
|
|
2244
2239
|
},
|
|
2245
|
-
["INSTANCE_EVENT_EMITTER" /* INSTANCE_EVENT_EMITTER */]: {
|
|
2240
|
+
["INSTANCE_EVENT_EMITTER" /* DeprecationTypes.INSTANCE_EVENT_EMITTER */]: {
|
|
2246
2241
|
message: `vm.$on/$once/$off() have been removed. ` +
|
|
2247
2242
|
`Use an external event emitter library instead.`,
|
|
2248
2243
|
link: `https://v3-migration.vuejs.org/breaking-changes/events-api.html`
|
|
2249
2244
|
},
|
|
2250
|
-
["INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */]: {
|
|
2245
|
+
["INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */]: {
|
|
2251
2246
|
message: event => `"${event}" lifecycle events are no longer supported. From templates, ` +
|
|
2252
2247
|
`use the "vnode" prefix instead of "hook:". For example, @${event} ` +
|
|
2253
2248
|
`should be changed to @vnode-${event.slice(5)}. ` +
|
|
@@ -2255,23 +2250,23 @@ var Vue = (function () {
|
|
|
2255
2250
|
`hooks.`,
|
|
2256
2251
|
link: `https://v3-migration.vuejs.org/breaking-changes/vnode-lifecycle-events.html`
|
|
2257
2252
|
},
|
|
2258
|
-
["INSTANCE_CHILDREN" /* INSTANCE_CHILDREN */]: {
|
|
2253
|
+
["INSTANCE_CHILDREN" /* DeprecationTypes.INSTANCE_CHILDREN */]: {
|
|
2259
2254
|
message: `vm.$children has been removed. Consider refactoring your logic ` +
|
|
2260
2255
|
`to avoid relying on direct access to child components.`,
|
|
2261
2256
|
link: `https://v3-migration.vuejs.org/breaking-changes/children.html`
|
|
2262
2257
|
},
|
|
2263
|
-
["INSTANCE_LISTENERS" /* INSTANCE_LISTENERS */]: {
|
|
2258
|
+
["INSTANCE_LISTENERS" /* DeprecationTypes.INSTANCE_LISTENERS */]: {
|
|
2264
2259
|
message: `vm.$listeners has been removed. In Vue 3, parent v-on listeners are ` +
|
|
2265
2260
|
`included in vm.$attrs and it is no longer necessary to separately use ` +
|
|
2266
2261
|
`v-on="$listeners" if you are already using v-bind="$attrs". ` +
|
|
2267
2262
|
`(Note: the Vue 3 behavior only applies if this compat config is disabled)`,
|
|
2268
2263
|
link: `https://v3-migration.vuejs.org/breaking-changes/listeners-removed.html`
|
|
2269
2264
|
},
|
|
2270
|
-
["INSTANCE_SCOPED_SLOTS" /* INSTANCE_SCOPED_SLOTS */]: {
|
|
2265
|
+
["INSTANCE_SCOPED_SLOTS" /* DeprecationTypes.INSTANCE_SCOPED_SLOTS */]: {
|
|
2271
2266
|
message: `vm.$scopedSlots has been removed. Use vm.$slots instead.`,
|
|
2272
2267
|
link: `https://v3-migration.vuejs.org/breaking-changes/slots-unification.html`
|
|
2273
2268
|
},
|
|
2274
|
-
["INSTANCE_ATTRS_CLASS_STYLE" /* INSTANCE_ATTRS_CLASS_STYLE */]: {
|
|
2269
|
+
["INSTANCE_ATTRS_CLASS_STYLE" /* DeprecationTypes.INSTANCE_ATTRS_CLASS_STYLE */]: {
|
|
2275
2270
|
message: componentName => `Component <${componentName || 'Anonymous'}> has \`inheritAttrs: false\` but is ` +
|
|
2276
2271
|
`relying on class/style fallthrough from parent. In Vue 3, class/style ` +
|
|
2277
2272
|
`are now included in $attrs and will no longer fallthrough when ` +
|
|
@@ -2282,75 +2277,75 @@ var Vue = (function () {
|
|
|
2282
2277
|
`them on root via :class="$attrs.class".`,
|
|
2283
2278
|
link: `https://v3-migration.vuejs.org/breaking-changes/attrs-includes-class-style.html`
|
|
2284
2279
|
},
|
|
2285
|
-
["OPTIONS_DATA_FN" /* OPTIONS_DATA_FN */]: {
|
|
2280
|
+
["OPTIONS_DATA_FN" /* DeprecationTypes.OPTIONS_DATA_FN */]: {
|
|
2286
2281
|
message: `The "data" option can no longer be a plain object. ` +
|
|
2287
2282
|
`Always use a function.`,
|
|
2288
2283
|
link: `https://v3-migration.vuejs.org/breaking-changes/data-option.html`
|
|
2289
2284
|
},
|
|
2290
|
-
["OPTIONS_DATA_MERGE" /* OPTIONS_DATA_MERGE */]: {
|
|
2285
|
+
["OPTIONS_DATA_MERGE" /* DeprecationTypes.OPTIONS_DATA_MERGE */]: {
|
|
2291
2286
|
message: (key) => `Detected conflicting key "${key}" when merging data option values. ` +
|
|
2292
2287
|
`In Vue 3, data keys are merged shallowly and will override one another.`,
|
|
2293
2288
|
link: `https://v3-migration.vuejs.org/breaking-changes/data-option.html#mixin-merge-behavior-change`
|
|
2294
2289
|
},
|
|
2295
|
-
["OPTIONS_BEFORE_DESTROY" /* OPTIONS_BEFORE_DESTROY */]: {
|
|
2290
|
+
["OPTIONS_BEFORE_DESTROY" /* DeprecationTypes.OPTIONS_BEFORE_DESTROY */]: {
|
|
2296
2291
|
message: `\`beforeDestroy\` has been renamed to \`beforeUnmount\`.`
|
|
2297
2292
|
},
|
|
2298
|
-
["OPTIONS_DESTROYED" /* OPTIONS_DESTROYED */]: {
|
|
2293
|
+
["OPTIONS_DESTROYED" /* DeprecationTypes.OPTIONS_DESTROYED */]: {
|
|
2299
2294
|
message: `\`destroyed\` has been renamed to \`unmounted\`.`
|
|
2300
2295
|
},
|
|
2301
|
-
["WATCH_ARRAY" /* WATCH_ARRAY */]: {
|
|
2296
|
+
["WATCH_ARRAY" /* DeprecationTypes.WATCH_ARRAY */]: {
|
|
2302
2297
|
message: `"watch" option or vm.$watch on an array value will no longer ` +
|
|
2303
2298
|
`trigger on array mutation unless the "deep" option is specified. ` +
|
|
2304
2299
|
`If current usage is intended, you can disable the compat behavior and ` +
|
|
2305
2300
|
`suppress this warning with:` +
|
|
2306
|
-
`\n\n configureCompat({ ${"WATCH_ARRAY" /* WATCH_ARRAY */}: false })\n`,
|
|
2301
|
+
`\n\n configureCompat({ ${"WATCH_ARRAY" /* DeprecationTypes.WATCH_ARRAY */}: false })\n`,
|
|
2307
2302
|
link: `https://v3-migration.vuejs.org/breaking-changes/watch.html`
|
|
2308
2303
|
},
|
|
2309
|
-
["PROPS_DEFAULT_THIS" /* PROPS_DEFAULT_THIS */]: {
|
|
2304
|
+
["PROPS_DEFAULT_THIS" /* DeprecationTypes.PROPS_DEFAULT_THIS */]: {
|
|
2310
2305
|
message: (key) => `props default value function no longer has access to "this". The compat ` +
|
|
2311
2306
|
`build only offers access to this.$options.` +
|
|
2312
2307
|
`(found in prop "${key}")`,
|
|
2313
2308
|
link: `https://v3-migration.vuejs.org/breaking-changes/props-default-this.html`
|
|
2314
2309
|
},
|
|
2315
|
-
["CUSTOM_DIR" /* CUSTOM_DIR */]: {
|
|
2310
|
+
["CUSTOM_DIR" /* DeprecationTypes.CUSTOM_DIR */]: {
|
|
2316
2311
|
message: (legacyHook, newHook) => `Custom directive hook "${legacyHook}" has been removed. ` +
|
|
2317
2312
|
`Use "${newHook}" instead.`,
|
|
2318
2313
|
link: `https://v3-migration.vuejs.org/breaking-changes/custom-directives.html`
|
|
2319
2314
|
},
|
|
2320
|
-
["V_ON_KEYCODE_MODIFIER" /* V_ON_KEYCODE_MODIFIER */]: {
|
|
2315
|
+
["V_ON_KEYCODE_MODIFIER" /* DeprecationTypes.V_ON_KEYCODE_MODIFIER */]: {
|
|
2321
2316
|
message: `Using keyCode as v-on modifier is no longer supported. ` +
|
|
2322
2317
|
`Use kebab-case key name modifiers instead.`,
|
|
2323
2318
|
link: `https://v3-migration.vuejs.org/breaking-changes/keycode-modifiers.html`
|
|
2324
2319
|
},
|
|
2325
|
-
["ATTR_FALSE_VALUE" /* ATTR_FALSE_VALUE */]: {
|
|
2320
|
+
["ATTR_FALSE_VALUE" /* DeprecationTypes.ATTR_FALSE_VALUE */]: {
|
|
2326
2321
|
message: (name) => `Attribute "${name}" with v-bind value \`false\` will render ` +
|
|
2327
2322
|
`${name}="false" instead of removing it in Vue 3. To remove the attribute, ` +
|
|
2328
2323
|
`use \`null\` or \`undefined\` instead. If the usage is intended, ` +
|
|
2329
2324
|
`you can disable the compat behavior and suppress this warning with:` +
|
|
2330
|
-
`\n\n configureCompat({ ${"ATTR_FALSE_VALUE" /* ATTR_FALSE_VALUE */}: false })\n`,
|
|
2325
|
+
`\n\n configureCompat({ ${"ATTR_FALSE_VALUE" /* DeprecationTypes.ATTR_FALSE_VALUE */}: false })\n`,
|
|
2331
2326
|
link: `https://v3-migration.vuejs.org/breaking-changes/attribute-coercion.html`
|
|
2332
2327
|
},
|
|
2333
|
-
["ATTR_ENUMERATED_COERCION" /* ATTR_ENUMERATED_COERCION */]: {
|
|
2328
|
+
["ATTR_ENUMERATED_COERCION" /* DeprecationTypes.ATTR_ENUMERATED_COERCION */]: {
|
|
2334
2329
|
message: (name, value, coerced) => `Enumerated attribute "${name}" with v-bind value \`${value}\` will ` +
|
|
2335
2330
|
`${value === null ? `be removed` : `render the value as-is`} instead of coercing the value to "${coerced}" in Vue 3. ` +
|
|
2336
2331
|
`Always use explicit "true" or "false" values for enumerated attributes. ` +
|
|
2337
2332
|
`If the usage is intended, ` +
|
|
2338
2333
|
`you can disable the compat behavior and suppress this warning with:` +
|
|
2339
|
-
`\n\n configureCompat({ ${"ATTR_ENUMERATED_COERCION" /* ATTR_ENUMERATED_COERCION */}: false })\n`,
|
|
2334
|
+
`\n\n configureCompat({ ${"ATTR_ENUMERATED_COERCION" /* DeprecationTypes.ATTR_ENUMERATED_COERCION */}: false })\n`,
|
|
2340
2335
|
link: `https://v3-migration.vuejs.org/breaking-changes/attribute-coercion.html`
|
|
2341
2336
|
},
|
|
2342
|
-
["TRANSITION_CLASSES" /* TRANSITION_CLASSES */]: {
|
|
2337
|
+
["TRANSITION_CLASSES" /* DeprecationTypes.TRANSITION_CLASSES */]: {
|
|
2343
2338
|
message: `` // this feature cannot be runtime-detected
|
|
2344
2339
|
},
|
|
2345
|
-
["TRANSITION_GROUP_ROOT" /* TRANSITION_GROUP_ROOT */]: {
|
|
2340
|
+
["TRANSITION_GROUP_ROOT" /* DeprecationTypes.TRANSITION_GROUP_ROOT */]: {
|
|
2346
2341
|
message: `<TransitionGroup> no longer renders a root <span> element by ` +
|
|
2347
2342
|
`default if no "tag" prop is specified. If you do not rely on the span ` +
|
|
2348
2343
|
`for styling, you can disable the compat behavior and suppress this ` +
|
|
2349
2344
|
`warning with:` +
|
|
2350
|
-
`\n\n configureCompat({ ${"TRANSITION_GROUP_ROOT" /* TRANSITION_GROUP_ROOT */}: false })\n`,
|
|
2345
|
+
`\n\n configureCompat({ ${"TRANSITION_GROUP_ROOT" /* DeprecationTypes.TRANSITION_GROUP_ROOT */}: false })\n`,
|
|
2351
2346
|
link: `https://v3-migration.vuejs.org/breaking-changes/transition-group.html`
|
|
2352
2347
|
},
|
|
2353
|
-
["COMPONENT_ASYNC" /* COMPONENT_ASYNC */]: {
|
|
2348
|
+
["COMPONENT_ASYNC" /* DeprecationTypes.COMPONENT_ASYNC */]: {
|
|
2354
2349
|
message: (comp) => {
|
|
2355
2350
|
const name = getComponentName(comp);
|
|
2356
2351
|
return (`Async component${name ? ` <${name}>` : `s`} should be explicitly created via \`defineAsyncComponent()\` ` +
|
|
@@ -2359,11 +2354,11 @@ var Vue = (function () {
|
|
|
2359
2354
|
`usage and intend to use plain functions for functional components, ` +
|
|
2360
2355
|
`you can disable the compat behavior and suppress this ` +
|
|
2361
2356
|
`warning with:` +
|
|
2362
|
-
`\n\n configureCompat({ ${"COMPONENT_ASYNC" /* COMPONENT_ASYNC */}: false })\n`);
|
|
2357
|
+
`\n\n configureCompat({ ${"COMPONENT_ASYNC" /* DeprecationTypes.COMPONENT_ASYNC */}: false })\n`);
|
|
2363
2358
|
},
|
|
2364
2359
|
link: `https://v3-migration.vuejs.org/breaking-changes/async-components.html`
|
|
2365
2360
|
},
|
|
2366
|
-
["COMPONENT_FUNCTIONAL" /* COMPONENT_FUNCTIONAL */]: {
|
|
2361
|
+
["COMPONENT_FUNCTIONAL" /* DeprecationTypes.COMPONENT_FUNCTIONAL */]: {
|
|
2367
2362
|
message: (comp) => {
|
|
2368
2363
|
const name = getComponentName(comp);
|
|
2369
2364
|
return (`Functional component${name ? ` <${name}>` : `s`} should be defined as a plain function in Vue 3. The "functional" ` +
|
|
@@ -2374,10 +2369,10 @@ var Vue = (function () {
|
|
|
2374
2369
|
},
|
|
2375
2370
|
link: `https://v3-migration.vuejs.org/breaking-changes/functional-components.html`
|
|
2376
2371
|
},
|
|
2377
|
-
["COMPONENT_V_MODEL" /* COMPONENT_V_MODEL */]: {
|
|
2372
|
+
["COMPONENT_V_MODEL" /* DeprecationTypes.COMPONENT_V_MODEL */]: {
|
|
2378
2373
|
message: (comp) => {
|
|
2379
2374
|
const configMsg = `opt-in to ` +
|
|
2380
|
-
`Vue 3 behavior on a per-component basis with \`compatConfig: { ${"COMPONENT_V_MODEL" /* COMPONENT_V_MODEL */}: false }\`.`;
|
|
2375
|
+
`Vue 3 behavior on a per-component basis with \`compatConfig: { ${"COMPONENT_V_MODEL" /* DeprecationTypes.COMPONENT_V_MODEL */}: false }\`.`;
|
|
2381
2376
|
if (comp.props &&
|
|
2382
2377
|
(isArray(comp.props)
|
|
2383
2378
|
? comp.props.includes('modelValue')
|
|
@@ -2391,20 +2386,20 @@ var Vue = (function () {
|
|
|
2391
2386
|
},
|
|
2392
2387
|
link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html`
|
|
2393
2388
|
},
|
|
2394
|
-
["RENDER_FUNCTION" /* RENDER_FUNCTION */]: {
|
|
2389
|
+
["RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */]: {
|
|
2395
2390
|
message: `Vue 3's render function API has changed. ` +
|
|
2396
2391
|
`You can opt-in to the new API with:` +
|
|
2397
|
-
`\n\n configureCompat({ ${"RENDER_FUNCTION" /* RENDER_FUNCTION */}: false })\n` +
|
|
2392
|
+
`\n\n configureCompat({ ${"RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */}: false })\n` +
|
|
2398
2393
|
`\n (This can also be done per-component via the "compatConfig" option.)`,
|
|
2399
2394
|
link: `https://v3-migration.vuejs.org/breaking-changes/render-function-api.html`
|
|
2400
2395
|
},
|
|
2401
|
-
["FILTERS" /* FILTERS */]: {
|
|
2396
|
+
["FILTERS" /* DeprecationTypes.FILTERS */]: {
|
|
2402
2397
|
message: `filters have been removed in Vue 3. ` +
|
|
2403
2398
|
`The "|" symbol will be treated as native JavaScript bitwise OR operator. ` +
|
|
2404
2399
|
`Use method calls or computed properties instead.`,
|
|
2405
2400
|
link: `https://v3-migration.vuejs.org/breaking-changes/filters.html`
|
|
2406
2401
|
},
|
|
2407
|
-
["PRIVATE_APIS" /* PRIVATE_APIS */]: {
|
|
2402
|
+
["PRIVATE_APIS" /* DeprecationTypes.PRIVATE_APIS */]: {
|
|
2408
2403
|
message: name => `"${name}" is a Vue 2 private API that no longer exists in Vue 3. ` +
|
|
2409
2404
|
`If you are seeing this warning only due to a dependency, you can ` +
|
|
2410
2405
|
`suppress this warning via { PRIVATE_APIS: 'suppress-warning' }.`
|
|
@@ -2479,8 +2474,8 @@ var Vue = (function () {
|
|
|
2479
2474
|
warnedInvalidKeys[key] = true;
|
|
2480
2475
|
}
|
|
2481
2476
|
}
|
|
2482
|
-
if (instance && config["OPTIONS_DATA_MERGE" /* OPTIONS_DATA_MERGE */] != null) {
|
|
2483
|
-
warn$1(`Deprecation config "${"OPTIONS_DATA_MERGE" /* OPTIONS_DATA_MERGE */}" can only be configured globally.`);
|
|
2477
|
+
if (instance && config["OPTIONS_DATA_MERGE" /* DeprecationTypes.OPTIONS_DATA_MERGE */] != null) {
|
|
2478
|
+
warn$1(`Deprecation config "${"OPTIONS_DATA_MERGE" /* DeprecationTypes.OPTIONS_DATA_MERGE */}" can only be configured globally.`);
|
|
2484
2479
|
}
|
|
2485
2480
|
}
|
|
2486
2481
|
function getCompatConfigForKey(key, instance) {
|
|
@@ -2555,10 +2550,10 @@ var Vue = (function () {
|
|
|
2555
2550
|
}
|
|
2556
2551
|
else {
|
|
2557
2552
|
if (event.startsWith('hook:')) {
|
|
2558
|
-
assertCompatEnabled("INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */, instance, event);
|
|
2553
|
+
assertCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance, event);
|
|
2559
2554
|
}
|
|
2560
2555
|
else {
|
|
2561
|
-
assertCompatEnabled("INSTANCE_EVENT_EMITTER" /* INSTANCE_EVENT_EMITTER */, instance);
|
|
2556
|
+
assertCompatEnabled("INSTANCE_EVENT_EMITTER" /* DeprecationTypes.INSTANCE_EVENT_EMITTER */, instance);
|
|
2562
2557
|
}
|
|
2563
2558
|
const events = getRegistry(instance);
|
|
2564
2559
|
(events[event] || (events[event] = [])).push(fn);
|
|
@@ -2575,7 +2570,7 @@ var Vue = (function () {
|
|
|
2575
2570
|
return instance.proxy;
|
|
2576
2571
|
}
|
|
2577
2572
|
function off(instance, event, fn) {
|
|
2578
|
-
assertCompatEnabled("INSTANCE_EVENT_EMITTER" /* INSTANCE_EVENT_EMITTER */, instance);
|
|
2573
|
+
assertCompatEnabled("INSTANCE_EVENT_EMITTER" /* DeprecationTypes.INSTANCE_EVENT_EMITTER */, instance);
|
|
2579
2574
|
const vm = instance.proxy;
|
|
2580
2575
|
// all
|
|
2581
2576
|
if (!event) {
|
|
@@ -2603,7 +2598,7 @@ var Vue = (function () {
|
|
|
2603
2598
|
function emit$1(instance, event, args) {
|
|
2604
2599
|
const cbs = getRegistry(instance)[event];
|
|
2605
2600
|
if (cbs) {
|
|
2606
|
-
callWithAsyncErrorHandling(cbs.map(cb => cb.bind(instance.proxy)), instance, 6 /* COMPONENT_EVENT_HANDLER */, args);
|
|
2601
|
+
callWithAsyncErrorHandling(cbs.map(cb => cb.bind(instance.proxy)), instance, 6 /* ErrorCodes.COMPONENT_EVENT_HANDLER */, args);
|
|
2607
2602
|
}
|
|
2608
2603
|
return instance.proxy;
|
|
2609
2604
|
}
|
|
@@ -2613,8 +2608,8 @@ var Vue = (function () {
|
|
|
2613
2608
|
function convertLegacyVModelProps(vnode) {
|
|
2614
2609
|
const { type, shapeFlag, props, dynamicProps } = vnode;
|
|
2615
2610
|
const comp = type;
|
|
2616
|
-
if (shapeFlag & 6 /* COMPONENT */ && props && 'modelValue' in props) {
|
|
2617
|
-
if (!isCompatEnabled("COMPONENT_V_MODEL" /* COMPONENT_V_MODEL */,
|
|
2611
|
+
if (shapeFlag & 6 /* ShapeFlags.COMPONENT */ && props && 'modelValue' in props) {
|
|
2612
|
+
if (!isCompatEnabled("COMPONENT_V_MODEL" /* DeprecationTypes.COMPONENT_V_MODEL */,
|
|
2618
2613
|
// this is a special case where we want to use the vnode component's
|
|
2619
2614
|
// compat config instead of the current rendering instance (which is the
|
|
2620
2615
|
// parent of the component that exposes v-model)
|
|
@@ -2623,7 +2618,7 @@ var Vue = (function () {
|
|
|
2623
2618
|
}
|
|
2624
2619
|
if (!warnedTypes.has(comp)) {
|
|
2625
2620
|
pushWarningContext(vnode);
|
|
2626
|
-
warnDeprecation("COMPONENT_V_MODEL" /* COMPONENT_V_MODEL */, { type }, comp);
|
|
2621
|
+
warnDeprecation("COMPONENT_V_MODEL" /* DeprecationTypes.COMPONENT_V_MODEL */, { type }, comp);
|
|
2627
2622
|
popWarningContext();
|
|
2628
2623
|
warnedTypes.add(comp);
|
|
2629
2624
|
}
|
|
@@ -2656,13 +2651,13 @@ var Vue = (function () {
|
|
|
2656
2651
|
}
|
|
2657
2652
|
}
|
|
2658
2653
|
function compatModelEmit(instance, event, args) {
|
|
2659
|
-
if (!isCompatEnabled("COMPONENT_V_MODEL" /* COMPONENT_V_MODEL */, instance)) {
|
|
2654
|
+
if (!isCompatEnabled("COMPONENT_V_MODEL" /* DeprecationTypes.COMPONENT_V_MODEL */, instance)) {
|
|
2660
2655
|
return;
|
|
2661
2656
|
}
|
|
2662
2657
|
const props = instance.vnode.props;
|
|
2663
2658
|
const modelHandler = props && props[compatModelEventPrefix + event];
|
|
2664
2659
|
if (modelHandler) {
|
|
2665
|
-
callWithErrorHandling(modelHandler, instance, 6 /* COMPONENT_EVENT_HANDLER */, args);
|
|
2660
|
+
callWithErrorHandling(modelHandler, instance, 6 /* ErrorCodes.COMPONENT_EVENT_HANDLER */, args);
|
|
2666
2661
|
}
|
|
2667
2662
|
}
|
|
2668
2663
|
|
|
@@ -2729,7 +2724,7 @@ var Vue = (function () {
|
|
|
2729
2724
|
handler = props[(handlerName = toHandlerKey(hyphenate(event)))];
|
|
2730
2725
|
}
|
|
2731
2726
|
if (handler) {
|
|
2732
|
-
callWithAsyncErrorHandling(handler, instance, 6 /* COMPONENT_EVENT_HANDLER */, args);
|
|
2727
|
+
callWithAsyncErrorHandling(handler, instance, 6 /* ErrorCodes.COMPONENT_EVENT_HANDLER */, args);
|
|
2733
2728
|
}
|
|
2734
2729
|
const onceHandler = props[handlerName + `Once`];
|
|
2735
2730
|
if (onceHandler) {
|
|
@@ -2740,7 +2735,7 @@ var Vue = (function () {
|
|
|
2740
2735
|
return;
|
|
2741
2736
|
}
|
|
2742
2737
|
instance.emitted[handlerName] = true;
|
|
2743
|
-
callWithAsyncErrorHandling(onceHandler, instance, 6 /* COMPONENT_EVENT_HANDLER */, args);
|
|
2738
|
+
callWithAsyncErrorHandling(onceHandler, instance, 6 /* ErrorCodes.COMPONENT_EVENT_HANDLER */, args);
|
|
2744
2739
|
}
|
|
2745
2740
|
{
|
|
2746
2741
|
compatModelEmit(instance, event, args);
|
|
@@ -2776,7 +2771,9 @@ var Vue = (function () {
|
|
|
2776
2771
|
}
|
|
2777
2772
|
}
|
|
2778
2773
|
if (!raw && !hasExtends) {
|
|
2779
|
-
|
|
2774
|
+
if (isObject(comp)) {
|
|
2775
|
+
cache.set(comp, null);
|
|
2776
|
+
}
|
|
2780
2777
|
return null;
|
|
2781
2778
|
}
|
|
2782
2779
|
if (isArray(raw)) {
|
|
@@ -2785,7 +2782,9 @@ var Vue = (function () {
|
|
|
2785
2782
|
else {
|
|
2786
2783
|
extend(normalized, raw);
|
|
2787
2784
|
}
|
|
2788
|
-
|
|
2785
|
+
if (isObject(comp)) {
|
|
2786
|
+
cache.set(comp, normalized);
|
|
2787
|
+
}
|
|
2789
2788
|
return normalized;
|
|
2790
2789
|
}
|
|
2791
2790
|
// Check if an incoming prop key is a declared emit event listener.
|
|
@@ -2915,7 +2914,7 @@ var Vue = (function () {
|
|
|
2915
2914
|
accessedAttrs = false;
|
|
2916
2915
|
}
|
|
2917
2916
|
try {
|
|
2918
|
-
if (vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */) {
|
|
2917
|
+
if (vnode.shapeFlag & 4 /* ShapeFlags.STATEFUL_COMPONENT */) {
|
|
2919
2918
|
// withProxy is a proxy with a different `has` trap only for
|
|
2920
2919
|
// runtime-compiled render functions using `with` block.
|
|
2921
2920
|
const proxyToUse = withProxy || proxy;
|
|
@@ -2948,7 +2947,7 @@ var Vue = (function () {
|
|
|
2948
2947
|
}
|
|
2949
2948
|
catch (err) {
|
|
2950
2949
|
blockStack.length = 0;
|
|
2951
|
-
handleError(err, instance, 1 /* RENDER_FUNCTION */);
|
|
2950
|
+
handleError(err, instance, 1 /* ErrorCodes.RENDER_FUNCTION */);
|
|
2952
2951
|
result = createVNode(Comment);
|
|
2953
2952
|
}
|
|
2954
2953
|
// attr merging
|
|
@@ -2957,14 +2956,14 @@ var Vue = (function () {
|
|
|
2957
2956
|
let root = result;
|
|
2958
2957
|
let setRoot = undefined;
|
|
2959
2958
|
if (result.patchFlag > 0 &&
|
|
2960
|
-
result.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */) {
|
|
2959
|
+
result.patchFlag & 2048 /* PatchFlags.DEV_ROOT_FRAGMENT */) {
|
|
2961
2960
|
[root, setRoot] = getChildRoot(result);
|
|
2962
2961
|
}
|
|
2963
2962
|
if (fallthroughAttrs && inheritAttrs !== false) {
|
|
2964
2963
|
const keys = Object.keys(fallthroughAttrs);
|
|
2965
2964
|
const { shapeFlag } = root;
|
|
2966
2965
|
if (keys.length) {
|
|
2967
|
-
if (shapeFlag & (1 /* ELEMENT */ | 6 /* COMPONENT */)) {
|
|
2966
|
+
if (shapeFlag & (1 /* ShapeFlags.ELEMENT */ | 6 /* ShapeFlags.COMPONENT */)) {
|
|
2968
2967
|
if (propsOptions && keys.some(isModelListener)) {
|
|
2969
2968
|
// If a v-model listener (onUpdate:xxx) has a corresponding declared
|
|
2970
2969
|
// prop, it indicates this component expects to handle v-model and
|
|
@@ -3009,13 +3008,13 @@ var Vue = (function () {
|
|
|
3009
3008
|
}
|
|
3010
3009
|
}
|
|
3011
3010
|
}
|
|
3012
|
-
if (isCompatEnabled("INSTANCE_ATTRS_CLASS_STYLE" /* INSTANCE_ATTRS_CLASS_STYLE */, instance) &&
|
|
3013
|
-
vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */ &&
|
|
3014
|
-
root.shapeFlag & (1 /* ELEMENT */ | 6 /* COMPONENT */)) {
|
|
3011
|
+
if (isCompatEnabled("INSTANCE_ATTRS_CLASS_STYLE" /* DeprecationTypes.INSTANCE_ATTRS_CLASS_STYLE */, instance) &&
|
|
3012
|
+
vnode.shapeFlag & 4 /* ShapeFlags.STATEFUL_COMPONENT */ &&
|
|
3013
|
+
root.shapeFlag & (1 /* ShapeFlags.ELEMENT */ | 6 /* ShapeFlags.COMPONENT */)) {
|
|
3015
3014
|
const { class: cls, style } = vnode.props || {};
|
|
3016
3015
|
if (cls || style) {
|
|
3017
3016
|
if (inheritAttrs === false) {
|
|
3018
|
-
warnDeprecation("INSTANCE_ATTRS_CLASS_STYLE" /* INSTANCE_ATTRS_CLASS_STYLE */, instance, getComponentName(instance.type));
|
|
3017
|
+
warnDeprecation("INSTANCE_ATTRS_CLASS_STYLE" /* DeprecationTypes.INSTANCE_ATTRS_CLASS_STYLE */, instance, getComponentName(instance.type));
|
|
3019
3018
|
}
|
|
3020
3019
|
root = cloneVNode(root, {
|
|
3021
3020
|
class: cls,
|
|
@@ -3119,7 +3118,7 @@ var Vue = (function () {
|
|
|
3119
3118
|
return res;
|
|
3120
3119
|
};
|
|
3121
3120
|
const isElementRoot = (vnode) => {
|
|
3122
|
-
return (vnode.shapeFlag & (6 /* COMPONENT */ | 1 /* ELEMENT */) ||
|
|
3121
|
+
return (vnode.shapeFlag & (6 /* ShapeFlags.COMPONENT */ | 1 /* ShapeFlags.ELEMENT */) ||
|
|
3123
3122
|
vnode.type === Comment // potential v-if branch switch
|
|
3124
3123
|
);
|
|
3125
3124
|
};
|
|
@@ -3138,19 +3137,19 @@ var Vue = (function () {
|
|
|
3138
3137
|
return true;
|
|
3139
3138
|
}
|
|
3140
3139
|
if (optimized && patchFlag >= 0) {
|
|
3141
|
-
if (patchFlag & 1024 /* DYNAMIC_SLOTS */) {
|
|
3140
|
+
if (patchFlag & 1024 /* PatchFlags.DYNAMIC_SLOTS */) {
|
|
3142
3141
|
// slot content that references values that might have changed,
|
|
3143
3142
|
// e.g. in a v-for
|
|
3144
3143
|
return true;
|
|
3145
3144
|
}
|
|
3146
|
-
if (patchFlag & 16 /* FULL_PROPS */) {
|
|
3145
|
+
if (patchFlag & 16 /* PatchFlags.FULL_PROPS */) {
|
|
3147
3146
|
if (!prevProps) {
|
|
3148
3147
|
return !!nextProps;
|
|
3149
3148
|
}
|
|
3150
3149
|
// presence of this flag indicates props are always non-null
|
|
3151
3150
|
return hasPropsChanged(prevProps, nextProps, emits);
|
|
3152
3151
|
}
|
|
3153
|
-
else if (patchFlag & 8 /* PROPS */) {
|
|
3152
|
+
else if (patchFlag & 8 /* PatchFlags.PROPS */) {
|
|
3154
3153
|
const dynamicProps = nextVNode.dynamicProps;
|
|
3155
3154
|
for (let i = 0; i < dynamicProps.length; i++) {
|
|
3156
3155
|
const key = dynamicProps[i];
|
|
@@ -3408,7 +3407,7 @@ var Vue = (function () {
|
|
|
3408
3407
|
if (delayEnter) {
|
|
3409
3408
|
activeBranch.transition.afterLeave = () => {
|
|
3410
3409
|
if (pendingId === suspense.pendingId) {
|
|
3411
|
-
move(pendingBranch, container, anchor, 0 /* ENTER */);
|
|
3410
|
+
move(pendingBranch, container, anchor, 0 /* MoveType.ENTER */);
|
|
3412
3411
|
}
|
|
3413
3412
|
};
|
|
3414
3413
|
}
|
|
@@ -3423,7 +3422,7 @@ var Vue = (function () {
|
|
|
3423
3422
|
}
|
|
3424
3423
|
if (!delayEnter) {
|
|
3425
3424
|
// move content from off-dom container to actual container
|
|
3426
|
-
move(pendingBranch, container, anchor, 0 /* ENTER */);
|
|
3425
|
+
move(pendingBranch, container, anchor, 0 /* MoveType.ENTER */);
|
|
3427
3426
|
}
|
|
3428
3427
|
}
|
|
3429
3428
|
setActiveBranch(suspense, pendingBranch);
|
|
@@ -3497,7 +3496,7 @@ var Vue = (function () {
|
|
|
3497
3496
|
const hydratedEl = instance.vnode.el;
|
|
3498
3497
|
instance
|
|
3499
3498
|
.asyncDep.catch(err => {
|
|
3500
|
-
handleError(err, instance, 0 /* SETUP_FUNCTION */);
|
|
3499
|
+
handleError(err, instance, 0 /* ErrorCodes.SETUP_FUNCTION */);
|
|
3501
3500
|
})
|
|
3502
3501
|
.then(asyncSetupResult => {
|
|
3503
3502
|
// retry when the setup() promise resolves.
|
|
@@ -3571,7 +3570,7 @@ var Vue = (function () {
|
|
|
3571
3570
|
}
|
|
3572
3571
|
function normalizeSuspenseChildren(vnode) {
|
|
3573
3572
|
const { shapeFlag, children } = vnode;
|
|
3574
|
-
const isSlotChildren = shapeFlag & 32 /* SLOTS_CHILDREN */;
|
|
3573
|
+
const isSlotChildren = shapeFlag & 32 /* ShapeFlags.SLOTS_CHILDREN */;
|
|
3575
3574
|
vnode.ssContent = normalizeSuspenseSlot(isSlotChildren ? children.default : children);
|
|
3576
3575
|
vnode.ssFallback = isSlotChildren
|
|
3577
3576
|
? normalizeSuspenseSlot(children.fallback)
|
|
@@ -3742,7 +3741,7 @@ var Vue = (function () {
|
|
|
3742
3741
|
return traverse(s);
|
|
3743
3742
|
}
|
|
3744
3743
|
else if (isFunction(s)) {
|
|
3745
|
-
return callWithErrorHandling(s, instance, 2 /* WATCH_GETTER */);
|
|
3744
|
+
return callWithErrorHandling(s, instance, 2 /* ErrorCodes.WATCH_GETTER */);
|
|
3746
3745
|
}
|
|
3747
3746
|
else {
|
|
3748
3747
|
warnInvalidSource(s);
|
|
@@ -3752,7 +3751,7 @@ var Vue = (function () {
|
|
|
3752
3751
|
else if (isFunction(source)) {
|
|
3753
3752
|
if (cb) {
|
|
3754
3753
|
// getter with cb
|
|
3755
|
-
getter = () => callWithErrorHandling(source, instance, 2 /* WATCH_GETTER */);
|
|
3754
|
+
getter = () => callWithErrorHandling(source, instance, 2 /* ErrorCodes.WATCH_GETTER */);
|
|
3756
3755
|
}
|
|
3757
3756
|
else {
|
|
3758
3757
|
// no cb -> simple effect
|
|
@@ -3763,7 +3762,7 @@ var Vue = (function () {
|
|
|
3763
3762
|
if (cleanup) {
|
|
3764
3763
|
cleanup();
|
|
3765
3764
|
}
|
|
3766
|
-
return callWithAsyncErrorHandling(source, instance, 3 /* WATCH_CALLBACK */, [onCleanup]);
|
|
3765
|
+
return callWithAsyncErrorHandling(source, instance, 3 /* ErrorCodes.WATCH_CALLBACK */, [onCleanup]);
|
|
3767
3766
|
};
|
|
3768
3767
|
}
|
|
3769
3768
|
}
|
|
@@ -3777,7 +3776,7 @@ var Vue = (function () {
|
|
|
3777
3776
|
getter = () => {
|
|
3778
3777
|
const val = baseGetter();
|
|
3779
3778
|
if (isArray(val) &&
|
|
3780
|
-
checkCompatEnabled("WATCH_ARRAY" /* WATCH_ARRAY */, instance)) {
|
|
3779
|
+
checkCompatEnabled("WATCH_ARRAY" /* DeprecationTypes.WATCH_ARRAY */, instance)) {
|
|
3781
3780
|
traverse(val);
|
|
3782
3781
|
}
|
|
3783
3782
|
return val;
|
|
@@ -3790,7 +3789,7 @@ var Vue = (function () {
|
|
|
3790
3789
|
let cleanup;
|
|
3791
3790
|
let onCleanup = (fn) => {
|
|
3792
3791
|
cleanup = effect.onStop = () => {
|
|
3793
|
-
callWithErrorHandling(fn, instance, 4 /* WATCH_CLEANUP */);
|
|
3792
|
+
callWithErrorHandling(fn, instance, 4 /* ErrorCodes.WATCH_CLEANUP */);
|
|
3794
3793
|
};
|
|
3795
3794
|
};
|
|
3796
3795
|
let oldValue = isMultiSource ? [] : INITIAL_WATCHER_VALUE;
|
|
@@ -3807,12 +3806,12 @@ var Vue = (function () {
|
|
|
3807
3806
|
? newValue.some((v, i) => hasChanged(v, oldValue[i]))
|
|
3808
3807
|
: hasChanged(newValue, oldValue)) ||
|
|
3809
3808
|
(isArray(newValue) &&
|
|
3810
|
-
isCompatEnabled("WATCH_ARRAY" /* WATCH_ARRAY */, instance))) {
|
|
3809
|
+
isCompatEnabled("WATCH_ARRAY" /* DeprecationTypes.WATCH_ARRAY */, instance))) {
|
|
3811
3810
|
// cleanup before running cb again
|
|
3812
3811
|
if (cleanup) {
|
|
3813
3812
|
cleanup();
|
|
3814
3813
|
}
|
|
3815
|
-
callWithAsyncErrorHandling(cb, instance, 3 /* WATCH_CALLBACK */, [
|
|
3814
|
+
callWithAsyncErrorHandling(cb, instance, 3 /* ErrorCodes.WATCH_CALLBACK */, [
|
|
3816
3815
|
newValue,
|
|
3817
3816
|
// pass undefined as the old value when it's changed for the first time
|
|
3818
3817
|
oldValue === INITIAL_WATCHER_VALUE ? undefined : oldValue,
|
|
@@ -3838,7 +3837,10 @@ var Vue = (function () {
|
|
|
3838
3837
|
}
|
|
3839
3838
|
else {
|
|
3840
3839
|
// default: 'pre'
|
|
3841
|
-
|
|
3840
|
+
job.pre = true;
|
|
3841
|
+
if (instance)
|
|
3842
|
+
job.id = instance.uid;
|
|
3843
|
+
scheduler = () => queueJob(job);
|
|
3842
3844
|
}
|
|
3843
3845
|
const effect = new ReactiveEffect(getter, scheduler);
|
|
3844
3846
|
{
|
|
@@ -3905,7 +3907,7 @@ var Vue = (function () {
|
|
|
3905
3907
|
};
|
|
3906
3908
|
}
|
|
3907
3909
|
function traverse(value, seen) {
|
|
3908
|
-
if (!isObject(value) || value["__v_skip" /* SKIP */]) {
|
|
3910
|
+
if (!isObject(value) || value["__v_skip" /* ReactiveFlags.SKIP */]) {
|
|
3909
3911
|
return value;
|
|
3910
3912
|
}
|
|
3911
3913
|
seen = seen || new Set();
|
|
@@ -4092,7 +4094,7 @@ var Vue = (function () {
|
|
|
4092
4094
|
const leavingVNodesCache = getLeavingNodesForType(state, vnode);
|
|
4093
4095
|
const callHook = (hook, args) => {
|
|
4094
4096
|
hook &&
|
|
4095
|
-
callWithAsyncErrorHandling(hook, instance, 9 /* TRANSITION_HOOK */, args);
|
|
4097
|
+
callWithAsyncErrorHandling(hook, instance, 9 /* ErrorCodes.TRANSITION_HOOK */, args);
|
|
4096
4098
|
};
|
|
4097
4099
|
const callAsyncHook = (hook, args) => {
|
|
4098
4100
|
const done = args[1];
|
|
@@ -4228,10 +4230,10 @@ var Vue = (function () {
|
|
|
4228
4230
|
: vnode;
|
|
4229
4231
|
}
|
|
4230
4232
|
function setTransitionHooks(vnode, hooks) {
|
|
4231
|
-
if (vnode.shapeFlag & 6 /* COMPONENT */ && vnode.component) {
|
|
4233
|
+
if (vnode.shapeFlag & 6 /* ShapeFlags.COMPONENT */ && vnode.component) {
|
|
4232
4234
|
setTransitionHooks(vnode.component.subTree, hooks);
|
|
4233
4235
|
}
|
|
4234
|
-
else if (vnode.shapeFlag & 128 /* SUSPENSE */) {
|
|
4236
|
+
else if (vnode.shapeFlag & 128 /* ShapeFlags.SUSPENSE */) {
|
|
4235
4237
|
vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
4236
4238
|
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
4237
4239
|
}
|
|
@@ -4250,7 +4252,7 @@ var Vue = (function () {
|
|
|
4250
4252
|
: String(parentKey) + String(child.key != null ? child.key : i);
|
|
4251
4253
|
// handle fragment children case, e.g. v-for
|
|
4252
4254
|
if (child.type === Fragment) {
|
|
4253
|
-
if (child.patchFlag & 128 /* KEYED_FRAGMENT */)
|
|
4255
|
+
if (child.patchFlag & 128 /* PatchFlags.KEYED_FRAGMENT */)
|
|
4254
4256
|
keyedFragmentCount++;
|
|
4255
4257
|
ret = ret.concat(getTransitionRawChildren(child.children, keepComment, key));
|
|
4256
4258
|
}
|
|
@@ -4265,7 +4267,7 @@ var Vue = (function () {
|
|
|
4265
4267
|
// these children to force full diffs to ensure correct behavior.
|
|
4266
4268
|
if (keyedFragmentCount > 1) {
|
|
4267
4269
|
for (let i = 0; i < ret.length; i++) {
|
|
4268
|
-
ret[i].patchFlag = -2 /* BAIL */;
|
|
4270
|
+
ret[i].patchFlag = -2 /* PatchFlags.BAIL */;
|
|
4269
4271
|
}
|
|
4270
4272
|
}
|
|
4271
4273
|
return ret;
|
|
@@ -4343,7 +4345,7 @@ var Vue = (function () {
|
|
|
4343
4345
|
}
|
|
4344
4346
|
const onError = (err) => {
|
|
4345
4347
|
pendingRequest = null;
|
|
4346
|
-
handleError(err, instance, 13 /* ASYNC_COMPONENT_LOADER */, !errorComponent /* do not throw in dev if user provided error component */);
|
|
4348
|
+
handleError(err, instance, 13 /* ErrorCodes.ASYNC_COMPONENT_LOADER */, !errorComponent /* do not throw in dev if user provided error component */);
|
|
4347
4349
|
};
|
|
4348
4350
|
// suspense-controlled or SSR.
|
|
4349
4351
|
if ((suspensible && instance.suspense) ||
|
|
@@ -4445,7 +4447,7 @@ var Vue = (function () {
|
|
|
4445
4447
|
const storageContainer = createElement('div');
|
|
4446
4448
|
sharedContext.activate = (vnode, container, anchor, isSVG, optimized) => {
|
|
4447
4449
|
const instance = vnode.component;
|
|
4448
|
-
move(vnode, container, anchor, 0 /* ENTER */, parentSuspense);
|
|
4450
|
+
move(vnode, container, anchor, 0 /* MoveType.ENTER */, parentSuspense);
|
|
4449
4451
|
// in case props have changed
|
|
4450
4452
|
patch(instance.vnode, vnode, container, anchor, instance, parentSuspense, isSVG, vnode.slotScopeIds, optimized);
|
|
4451
4453
|
queuePostRenderEffect(() => {
|
|
@@ -4465,7 +4467,7 @@ var Vue = (function () {
|
|
|
4465
4467
|
};
|
|
4466
4468
|
sharedContext.deactivate = (vnode) => {
|
|
4467
4469
|
const instance = vnode.component;
|
|
4468
|
-
move(vnode, storageContainer, null, 1 /* LEAVE */, parentSuspense);
|
|
4470
|
+
move(vnode, storageContainer, null, 1 /* MoveType.LEAVE */, parentSuspense);
|
|
4469
4471
|
queuePostRenderEffect(() => {
|
|
4470
4472
|
if (instance.da) {
|
|
4471
4473
|
invokeArrayFns(instance.da);
|
|
@@ -4554,8 +4556,8 @@ var Vue = (function () {
|
|
|
4554
4556
|
return children;
|
|
4555
4557
|
}
|
|
4556
4558
|
else if (!isVNode(rawVNode) ||
|
|
4557
|
-
(!(rawVNode.shapeFlag & 4 /* STATEFUL_COMPONENT */) &&
|
|
4558
|
-
!(rawVNode.shapeFlag & 128 /* SUSPENSE */))) {
|
|
4559
|
+
(!(rawVNode.shapeFlag & 4 /* ShapeFlags.STATEFUL_COMPONENT */) &&
|
|
4560
|
+
!(rawVNode.shapeFlag & 128 /* ShapeFlags.SUSPENSE */))) {
|
|
4559
4561
|
current = null;
|
|
4560
4562
|
return rawVNode;
|
|
4561
4563
|
}
|
|
@@ -4577,7 +4579,7 @@ var Vue = (function () {
|
|
|
4577
4579
|
// clone vnode if it's reused because we are going to mutate it
|
|
4578
4580
|
if (vnode.el) {
|
|
4579
4581
|
vnode = cloneVNode(vnode);
|
|
4580
|
-
if (rawVNode.shapeFlag & 128 /* SUSPENSE */) {
|
|
4582
|
+
if (rawVNode.shapeFlag & 128 /* ShapeFlags.SUSPENSE */) {
|
|
4581
4583
|
rawVNode.ssContent = vnode;
|
|
4582
4584
|
}
|
|
4583
4585
|
}
|
|
@@ -4596,7 +4598,7 @@ var Vue = (function () {
|
|
|
4596
4598
|
setTransitionHooks(vnode, vnode.transition);
|
|
4597
4599
|
}
|
|
4598
4600
|
// avoid vnode being mounted as fresh
|
|
4599
|
-
vnode.shapeFlag |= 512 /* COMPONENT_KEPT_ALIVE */;
|
|
4601
|
+
vnode.shapeFlag |= 512 /* ShapeFlags.COMPONENT_KEPT_ALIVE */;
|
|
4600
4602
|
// make this key the freshest
|
|
4601
4603
|
keys.delete(key);
|
|
4602
4604
|
keys.add(key);
|
|
@@ -4609,7 +4611,7 @@ var Vue = (function () {
|
|
|
4609
4611
|
}
|
|
4610
4612
|
}
|
|
4611
4613
|
// avoid vnode being unmounted
|
|
4612
|
-
vnode.shapeFlag |= 256 /* COMPONENT_SHOULD_KEEP_ALIVE */;
|
|
4614
|
+
vnode.shapeFlag |= 256 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */;
|
|
4613
4615
|
current = vnode;
|
|
4614
4616
|
return isSuspense(rawVNode.type) ? rawVNode : vnode;
|
|
4615
4617
|
};
|
|
@@ -4635,10 +4637,10 @@ var Vue = (function () {
|
|
|
4635
4637
|
return false;
|
|
4636
4638
|
}
|
|
4637
4639
|
function onActivated(hook, target) {
|
|
4638
|
-
registerKeepAliveHook(hook, "a" /* ACTIVATED */, target);
|
|
4640
|
+
registerKeepAliveHook(hook, "a" /* LifecycleHooks.ACTIVATED */, target);
|
|
4639
4641
|
}
|
|
4640
4642
|
function onDeactivated(hook, target) {
|
|
4641
|
-
registerKeepAliveHook(hook, "da" /* DEACTIVATED */, target);
|
|
4643
|
+
registerKeepAliveHook(hook, "da" /* LifecycleHooks.DEACTIVATED */, target);
|
|
4642
4644
|
}
|
|
4643
4645
|
function registerKeepAliveHook(hook, type, target = currentInstance) {
|
|
4644
4646
|
// cache the deactivate branch check wrapper for injected hooks so the same
|
|
@@ -4682,16 +4684,16 @@ var Vue = (function () {
|
|
|
4682
4684
|
}
|
|
4683
4685
|
function resetShapeFlag(vnode) {
|
|
4684
4686
|
let shapeFlag = vnode.shapeFlag;
|
|
4685
|
-
if (shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */) {
|
|
4686
|
-
shapeFlag -= 256 /* COMPONENT_SHOULD_KEEP_ALIVE */;
|
|
4687
|
+
if (shapeFlag & 256 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */) {
|
|
4688
|
+
shapeFlag -= 256 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */;
|
|
4687
4689
|
}
|
|
4688
|
-
if (shapeFlag & 512 /* COMPONENT_KEPT_ALIVE */) {
|
|
4689
|
-
shapeFlag -= 512 /* COMPONENT_KEPT_ALIVE */;
|
|
4690
|
+
if (shapeFlag & 512 /* ShapeFlags.COMPONENT_KEPT_ALIVE */) {
|
|
4691
|
+
shapeFlag -= 512 /* ShapeFlags.COMPONENT_KEPT_ALIVE */;
|
|
4690
4692
|
}
|
|
4691
4693
|
vnode.shapeFlag = shapeFlag;
|
|
4692
4694
|
}
|
|
4693
4695
|
function getInnerChild(vnode) {
|
|
4694
|
-
return vnode.shapeFlag & 128 /* SUSPENSE */ ? vnode.ssContent : vnode;
|
|
4696
|
+
return vnode.shapeFlag & 128 /* ShapeFlags.SUSPENSE */ ? vnode.ssContent : vnode;
|
|
4695
4697
|
}
|
|
4696
4698
|
|
|
4697
4699
|
function injectHook(type, hook, target = currentInstance, prepend = false) {
|
|
@@ -4737,23 +4739,23 @@ var Vue = (function () {
|
|
|
4737
4739
|
}
|
|
4738
4740
|
const createHook = (lifecycle) => (hook, target = currentInstance) =>
|
|
4739
4741
|
// post-create lifecycle registrations are noops during SSR (except for serverPrefetch)
|
|
4740
|
-
(!isInSSRComponentSetup || lifecycle === "sp" /* SERVER_PREFETCH */) &&
|
|
4742
|
+
(!isInSSRComponentSetup || lifecycle === "sp" /* LifecycleHooks.SERVER_PREFETCH */) &&
|
|
4741
4743
|
injectHook(lifecycle, hook, target);
|
|
4742
|
-
const onBeforeMount = createHook("bm" /* BEFORE_MOUNT */);
|
|
4743
|
-
const onMounted = createHook("m" /* MOUNTED */);
|
|
4744
|
-
const onBeforeUpdate = createHook("bu" /* BEFORE_UPDATE */);
|
|
4745
|
-
const onUpdated = createHook("u" /* UPDATED */);
|
|
4746
|
-
const onBeforeUnmount = createHook("bum" /* BEFORE_UNMOUNT */);
|
|
4747
|
-
const onUnmounted = createHook("um" /* UNMOUNTED */);
|
|
4748
|
-
const onServerPrefetch = createHook("sp" /* SERVER_PREFETCH */);
|
|
4749
|
-
const onRenderTriggered = createHook("rtg" /* RENDER_TRIGGERED */);
|
|
4750
|
-
const onRenderTracked = createHook("rtc" /* RENDER_TRACKED */);
|
|
4744
|
+
const onBeforeMount = createHook("bm" /* LifecycleHooks.BEFORE_MOUNT */);
|
|
4745
|
+
const onMounted = createHook("m" /* LifecycleHooks.MOUNTED */);
|
|
4746
|
+
const onBeforeUpdate = createHook("bu" /* LifecycleHooks.BEFORE_UPDATE */);
|
|
4747
|
+
const onUpdated = createHook("u" /* LifecycleHooks.UPDATED */);
|
|
4748
|
+
const onBeforeUnmount = createHook("bum" /* LifecycleHooks.BEFORE_UNMOUNT */);
|
|
4749
|
+
const onUnmounted = createHook("um" /* LifecycleHooks.UNMOUNTED */);
|
|
4750
|
+
const onServerPrefetch = createHook("sp" /* LifecycleHooks.SERVER_PREFETCH */);
|
|
4751
|
+
const onRenderTriggered = createHook("rtg" /* LifecycleHooks.RENDER_TRIGGERED */);
|
|
4752
|
+
const onRenderTracked = createHook("rtc" /* LifecycleHooks.RENDER_TRACKED */);
|
|
4751
4753
|
function onErrorCaptured(hook, target = currentInstance) {
|
|
4752
|
-
injectHook("ec" /* ERROR_CAPTURED */, hook, target);
|
|
4754
|
+
injectHook("ec" /* LifecycleHooks.ERROR_CAPTURED */, hook, target);
|
|
4753
4755
|
}
|
|
4754
4756
|
|
|
4755
4757
|
function getCompatChildren(instance) {
|
|
4756
|
-
assertCompatEnabled("INSTANCE_CHILDREN" /* INSTANCE_CHILDREN */, instance);
|
|
4758
|
+
assertCompatEnabled("INSTANCE_CHILDREN" /* DeprecationTypes.INSTANCE_CHILDREN */, instance);
|
|
4757
4759
|
const root = instance.subTree;
|
|
4758
4760
|
const children = [];
|
|
4759
4761
|
if (root) {
|
|
@@ -4765,7 +4767,7 @@ var Vue = (function () {
|
|
|
4765
4767
|
if (vnode.component) {
|
|
4766
4768
|
children.push(vnode.component.proxy);
|
|
4767
4769
|
}
|
|
4768
|
-
else if (vnode.shapeFlag & 16 /* ARRAY_CHILDREN */) {
|
|
4770
|
+
else if (vnode.shapeFlag & 16 /* ShapeFlags.ARRAY_CHILDREN */) {
|
|
4769
4771
|
const vnodes = vnode.children;
|
|
4770
4772
|
for (let i = 0; i < vnodes.length; i++) {
|
|
4771
4773
|
walk(vnodes[i], children);
|
|
@@ -4774,7 +4776,7 @@ var Vue = (function () {
|
|
|
4774
4776
|
}
|
|
4775
4777
|
|
|
4776
4778
|
function getCompatListeners(instance) {
|
|
4777
|
-
assertCompatEnabled("INSTANCE_LISTENERS" /* INSTANCE_LISTENERS */, instance);
|
|
4779
|
+
assertCompatEnabled("INSTANCE_LISTENERS" /* DeprecationTypes.INSTANCE_LISTENERS */, instance);
|
|
4778
4780
|
const listeners = {};
|
|
4779
4781
|
const rawProps = instance.vnode.props;
|
|
4780
4782
|
if (!rawProps) {
|
|
@@ -4802,7 +4804,7 @@ var Vue = (function () {
|
|
|
4802
4804
|
mappedName.forEach(mapped => {
|
|
4803
4805
|
const mappedHook = dir[mapped];
|
|
4804
4806
|
if (mappedHook) {
|
|
4805
|
-
softAssertCompatEnabled("CUSTOM_DIR" /* CUSTOM_DIR */, instance, mapped, name);
|
|
4807
|
+
softAssertCompatEnabled("CUSTOM_DIR" /* DeprecationTypes.CUSTOM_DIR */, instance, mapped, name);
|
|
4806
4808
|
hook.push(mappedHook);
|
|
4807
4809
|
}
|
|
4808
4810
|
});
|
|
@@ -4810,7 +4812,7 @@ var Vue = (function () {
|
|
|
4810
4812
|
}
|
|
4811
4813
|
else {
|
|
4812
4814
|
if (dir[mappedName]) {
|
|
4813
|
-
softAssertCompatEnabled("CUSTOM_DIR" /* CUSTOM_DIR */, instance, mappedName, name);
|
|
4815
|
+
softAssertCompatEnabled("CUSTOM_DIR" /* DeprecationTypes.CUSTOM_DIR */, instance, mappedName, name);
|
|
4814
4816
|
}
|
|
4815
4817
|
return dir[mappedName];
|
|
4816
4818
|
}
|
|
@@ -4884,7 +4886,7 @@ var Vue = (function () {
|
|
|
4884
4886
|
// disable tracking inside all lifecycle hooks
|
|
4885
4887
|
// since they can potentially be called inside effects.
|
|
4886
4888
|
pauseTracking();
|
|
4887
|
-
callWithAsyncErrorHandling(hook, instance, 8 /* DIRECTIVE_HOOK */, [
|
|
4889
|
+
callWithAsyncErrorHandling(hook, instance, 8 /* ErrorCodes.DIRECTIVE_HOOK */, [
|
|
4888
4890
|
vnode.el,
|
|
4889
4891
|
binding,
|
|
4890
4892
|
vnode,
|
|
@@ -4937,7 +4939,7 @@ var Vue = (function () {
|
|
|
4937
4939
|
const Component = instance.type;
|
|
4938
4940
|
// explicit self name has highest priority
|
|
4939
4941
|
if (type === COMPONENTS) {
|
|
4940
|
-
const selfName = getComponentName(Component);
|
|
4942
|
+
const selfName = getComponentName(Component, false /* do not include inferred name to avoid breaking existing code */);
|
|
4941
4943
|
if (selfName &&
|
|
4942
4944
|
(selfName === name ||
|
|
4943
4945
|
selfName === camelize(name) ||
|
|
@@ -4991,7 +4993,7 @@ var Vue = (function () {
|
|
|
4991
4993
|
return;
|
|
4992
4994
|
}
|
|
4993
4995
|
// v2 render function, try to provide compat
|
|
4994
|
-
if (checkCompatEnabled("RENDER_FUNCTION" /* RENDER_FUNCTION */, instance)) {
|
|
4996
|
+
if (checkCompatEnabled("RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */, instance)) {
|
|
4995
4997
|
const wrapped = (Component.render = function compatRender() {
|
|
4996
4998
|
// @ts-ignore
|
|
4997
4999
|
return render.call(this, compatH);
|
|
@@ -5113,7 +5115,7 @@ var Vue = (function () {
|
|
|
5113
5115
|
function convertLegacySlots(vnode) {
|
|
5114
5116
|
const { props, children } = vnode;
|
|
5115
5117
|
let slots;
|
|
5116
|
-
if (vnode.shapeFlag & 6 /* COMPONENT */ && isArray(children)) {
|
|
5118
|
+
if (vnode.shapeFlag & 6 /* ShapeFlags.COMPONENT */ && isArray(children)) {
|
|
5117
5119
|
slots = {};
|
|
5118
5120
|
// check "slot" property on vnodes and turn them into v3 function slots
|
|
5119
5121
|
for (let i = 0; i < children.length; i++) {
|
|
@@ -5152,8 +5154,8 @@ var Vue = (function () {
|
|
|
5152
5154
|
}
|
|
5153
5155
|
function defineLegacyVNodeProperties(vnode) {
|
|
5154
5156
|
/* istanbul ignore if */
|
|
5155
|
-
if (isCompatEnabled("RENDER_FUNCTION" /* RENDER_FUNCTION */, currentRenderingInstance, true /* enable for built-ins */) &&
|
|
5156
|
-
isCompatEnabled("PRIVATE_APIS" /* PRIVATE_APIS */, currentRenderingInstance, true /* enable for built-ins */)) {
|
|
5157
|
+
if (isCompatEnabled("RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */, currentRenderingInstance, true /* enable for built-ins */) &&
|
|
5158
|
+
isCompatEnabled("PRIVATE_APIS" /* DeprecationTypes.PRIVATE_APIS */, currentRenderingInstance, true /* enable for built-ins */)) {
|
|
5157
5159
|
const context = currentRenderingInstance;
|
|
5158
5160
|
const getInstance = () => vnode.component && vnode.component.proxy;
|
|
5159
5161
|
let componentOptions;
|
|
@@ -5167,7 +5169,7 @@ var Vue = (function () {
|
|
|
5167
5169
|
context: { get: () => context && context.proxy },
|
|
5168
5170
|
componentOptions: {
|
|
5169
5171
|
get: () => {
|
|
5170
|
-
if (vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */) {
|
|
5172
|
+
if (vnode.shapeFlag & 4 /* ShapeFlags.STATEFUL_COMPONENT */) {
|
|
5171
5173
|
if (componentOptions) {
|
|
5172
5174
|
return componentOptions;
|
|
5173
5175
|
}
|
|
@@ -5287,7 +5289,13 @@ var Vue = (function () {
|
|
|
5287
5289
|
}
|
|
5288
5290
|
else if (slot) {
|
|
5289
5291
|
// conditional single slot generated by <template v-if="..." #foo>
|
|
5290
|
-
slots[slot.name] = slot.
|
|
5292
|
+
slots[slot.name] = slot.key
|
|
5293
|
+
? (...args) => {
|
|
5294
|
+
const res = slot.fn(...args);
|
|
5295
|
+
res.key = slot.key;
|
|
5296
|
+
return res;
|
|
5297
|
+
}
|
|
5298
|
+
: slot.fn;
|
|
5291
5299
|
}
|
|
5292
5300
|
}
|
|
5293
5301
|
return slots;
|
|
@@ -5323,9 +5331,15 @@ var Vue = (function () {
|
|
|
5323
5331
|
}
|
|
5324
5332
|
openBlock();
|
|
5325
5333
|
const validSlotContent = slot && ensureValidVNode(slot(props));
|
|
5326
|
-
const rendered = createBlock(Fragment, {
|
|
5327
|
-
|
|
5328
|
-
|
|
5334
|
+
const rendered = createBlock(Fragment, {
|
|
5335
|
+
key: props.key ||
|
|
5336
|
+
// slot content array of a dynamic conditional slot may have a branch
|
|
5337
|
+
// key attached in the `createSlots` helper, respect that
|
|
5338
|
+
(validSlotContent && validSlotContent.key) ||
|
|
5339
|
+
`_${name}`
|
|
5340
|
+
}, validSlotContent || (fallback ? fallback() : []), validSlotContent && slots._ === 1 /* SlotFlags.STABLE */
|
|
5341
|
+
? 64 /* PatchFlags.STABLE_FRAGMENT */
|
|
5342
|
+
: -2 /* PatchFlags.BAIL */);
|
|
5329
5343
|
if (!noSlotted && rendered.scopeId) {
|
|
5330
5344
|
rendered.slotScopeIds = [rendered.scopeId + '-s'];
|
|
5331
5345
|
}
|
|
@@ -5353,14 +5367,16 @@ var Vue = (function () {
|
|
|
5353
5367
|
* For prefixing keys in v-on="obj" with "on"
|
|
5354
5368
|
* @private
|
|
5355
5369
|
*/
|
|
5356
|
-
function toHandlers(obj) {
|
|
5370
|
+
function toHandlers(obj, preserveCaseIfNecessary) {
|
|
5357
5371
|
const ret = {};
|
|
5358
5372
|
if (!isObject(obj)) {
|
|
5359
5373
|
warn$1(`v-on with no argument expects an object value.`);
|
|
5360
5374
|
return ret;
|
|
5361
5375
|
}
|
|
5362
5376
|
for (const key in obj) {
|
|
5363
|
-
ret[
|
|
5377
|
+
ret[preserveCaseIfNecessary && /[A-Z]/.test(key)
|
|
5378
|
+
? `on:${key}`
|
|
5379
|
+
: toHandlerKey(key)] = obj[key];
|
|
5364
5380
|
}
|
|
5365
5381
|
return ret;
|
|
5366
5382
|
}
|
|
@@ -5496,26 +5512,26 @@ var Vue = (function () {
|
|
|
5496
5512
|
};
|
|
5497
5513
|
extend(map, {
|
|
5498
5514
|
$set: i => {
|
|
5499
|
-
assertCompatEnabled("INSTANCE_SET" /* INSTANCE_SET */, i);
|
|
5515
|
+
assertCompatEnabled("INSTANCE_SET" /* DeprecationTypes.INSTANCE_SET */, i);
|
|
5500
5516
|
return set;
|
|
5501
5517
|
},
|
|
5502
5518
|
$delete: i => {
|
|
5503
|
-
assertCompatEnabled("INSTANCE_DELETE" /* INSTANCE_DELETE */, i);
|
|
5519
|
+
assertCompatEnabled("INSTANCE_DELETE" /* DeprecationTypes.INSTANCE_DELETE */, i);
|
|
5504
5520
|
return del;
|
|
5505
5521
|
},
|
|
5506
5522
|
$mount: i => {
|
|
5507
|
-
assertCompatEnabled("GLOBAL_MOUNT" /* GLOBAL_MOUNT */, null /* this warning is global */);
|
|
5523
|
+
assertCompatEnabled("GLOBAL_MOUNT" /* DeprecationTypes.GLOBAL_MOUNT */, null /* this warning is global */);
|
|
5508
5524
|
// root mount override from ./global.ts in installCompatMount
|
|
5509
5525
|
return i.ctx._compat_mount || NOOP;
|
|
5510
5526
|
},
|
|
5511
5527
|
$destroy: i => {
|
|
5512
|
-
assertCompatEnabled("INSTANCE_DESTROY" /* INSTANCE_DESTROY */, i);
|
|
5528
|
+
assertCompatEnabled("INSTANCE_DESTROY" /* DeprecationTypes.INSTANCE_DESTROY */, i);
|
|
5513
5529
|
// root destroy override from ./global.ts in installCompatMount
|
|
5514
5530
|
return i.ctx._compat_destroy || NOOP;
|
|
5515
5531
|
},
|
|
5516
5532
|
// overrides existing accessor
|
|
5517
5533
|
$slots: i => {
|
|
5518
|
-
if (isCompatEnabled("RENDER_FUNCTION" /* RENDER_FUNCTION */, i) &&
|
|
5534
|
+
if (isCompatEnabled("RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */, i) &&
|
|
5519
5535
|
i.render &&
|
|
5520
5536
|
i.render._compatWrapped) {
|
|
5521
5537
|
return new Proxy(i.slots, legacySlotProxyHandlers);
|
|
@@ -5523,7 +5539,7 @@ var Vue = (function () {
|
|
|
5523
5539
|
return shallowReadonly(i.slots) ;
|
|
5524
5540
|
},
|
|
5525
5541
|
$scopedSlots: i => {
|
|
5526
|
-
assertCompatEnabled("INSTANCE_SCOPED_SLOTS" /* INSTANCE_SCOPED_SLOTS */, i);
|
|
5542
|
+
assertCompatEnabled("INSTANCE_SCOPED_SLOTS" /* DeprecationTypes.INSTANCE_SCOPED_SLOTS */, i);
|
|
5527
5543
|
const res = {};
|
|
5528
5544
|
for (const key in i.slots) {
|
|
5529
5545
|
const fn = i.slots[key];
|
|
@@ -5540,7 +5556,7 @@ var Vue = (function () {
|
|
|
5540
5556
|
$listeners: getCompatListeners
|
|
5541
5557
|
});
|
|
5542
5558
|
/* istanbul ignore if */
|
|
5543
|
-
if (isCompatEnabled("PRIVATE_APIS" /* PRIVATE_APIS */, null)) {
|
|
5559
|
+
if (isCompatEnabled("PRIVATE_APIS" /* DeprecationTypes.PRIVATE_APIS */, null)) {
|
|
5544
5560
|
extend(map, {
|
|
5545
5561
|
// needed by many libs / render fns
|
|
5546
5562
|
$vnode: i => i.vnode,
|
|
@@ -5644,23 +5660,23 @@ var Vue = (function () {
|
|
|
5644
5660
|
const n = accessCache[key];
|
|
5645
5661
|
if (n !== undefined) {
|
|
5646
5662
|
switch (n) {
|
|
5647
|
-
case 1 /* SETUP */:
|
|
5663
|
+
case 1 /* AccessTypes.SETUP */:
|
|
5648
5664
|
return setupState[key];
|
|
5649
|
-
case 2 /* DATA */:
|
|
5665
|
+
case 2 /* AccessTypes.DATA */:
|
|
5650
5666
|
return data[key];
|
|
5651
|
-
case 4 /* CONTEXT */:
|
|
5667
|
+
case 4 /* AccessTypes.CONTEXT */:
|
|
5652
5668
|
return ctx[key];
|
|
5653
|
-
case 3 /* PROPS */:
|
|
5669
|
+
case 3 /* AccessTypes.PROPS */:
|
|
5654
5670
|
return props[key];
|
|
5655
5671
|
// default: just fallthrough
|
|
5656
5672
|
}
|
|
5657
5673
|
}
|
|
5658
5674
|
else if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) {
|
|
5659
|
-
accessCache[key] = 1 /* SETUP */;
|
|
5675
|
+
accessCache[key] = 1 /* AccessTypes.SETUP */;
|
|
5660
5676
|
return setupState[key];
|
|
5661
5677
|
}
|
|
5662
5678
|
else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
|
|
5663
|
-
accessCache[key] = 2 /* DATA */;
|
|
5679
|
+
accessCache[key] = 2 /* AccessTypes.DATA */;
|
|
5664
5680
|
return data[key];
|
|
5665
5681
|
}
|
|
5666
5682
|
else if (
|
|
@@ -5668,15 +5684,15 @@ var Vue = (function () {
|
|
|
5668
5684
|
// props
|
|
5669
5685
|
(normalizedProps = instance.propsOptions[0]) &&
|
|
5670
5686
|
hasOwn(normalizedProps, key)) {
|
|
5671
|
-
accessCache[key] = 3 /* PROPS */;
|
|
5687
|
+
accessCache[key] = 3 /* AccessTypes.PROPS */;
|
|
5672
5688
|
return props[key];
|
|
5673
5689
|
}
|
|
5674
5690
|
else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
|
|
5675
|
-
accessCache[key] = 4 /* CONTEXT */;
|
|
5691
|
+
accessCache[key] = 4 /* AccessTypes.CONTEXT */;
|
|
5676
5692
|
return ctx[key];
|
|
5677
5693
|
}
|
|
5678
5694
|
else if (shouldCacheAccess) {
|
|
5679
|
-
accessCache[key] = 0 /* OTHER */;
|
|
5695
|
+
accessCache[key] = 0 /* AccessTypes.OTHER */;
|
|
5680
5696
|
}
|
|
5681
5697
|
}
|
|
5682
5698
|
const publicGetter = publicPropertiesMap[key];
|
|
@@ -5684,7 +5700,7 @@ var Vue = (function () {
|
|
|
5684
5700
|
// public $xxx properties
|
|
5685
5701
|
if (publicGetter) {
|
|
5686
5702
|
if (key === '$attrs') {
|
|
5687
|
-
track(instance, "get" /* GET */, key);
|
|
5703
|
+
track(instance, "get" /* TrackOpTypes.GET */, key);
|
|
5688
5704
|
markAttrsAccessed();
|
|
5689
5705
|
}
|
|
5690
5706
|
return publicGetter(instance);
|
|
@@ -5697,7 +5713,7 @@ var Vue = (function () {
|
|
|
5697
5713
|
}
|
|
5698
5714
|
else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
|
|
5699
5715
|
// user may set custom properties to `this` that start with `$`
|
|
5700
|
-
accessCache[key] = 4 /* CONTEXT */;
|
|
5716
|
+
accessCache[key] = 4 /* AccessTypes.CONTEXT */;
|
|
5701
5717
|
return ctx[key];
|
|
5702
5718
|
}
|
|
5703
5719
|
else if (
|
|
@@ -5873,7 +5889,7 @@ var Vue = (function () {
|
|
|
5873
5889
|
const toVal = to[key];
|
|
5874
5890
|
const fromVal = from[key];
|
|
5875
5891
|
if (key in to && isPlainObject(toVal) && isPlainObject(fromVal)) {
|
|
5876
|
-
warnDeprecation("OPTIONS_DATA_MERGE" /* OPTIONS_DATA_MERGE */, null, key);
|
|
5892
|
+
warnDeprecation("OPTIONS_DATA_MERGE" /* DeprecationTypes.OPTIONS_DATA_MERGE */, null, key);
|
|
5877
5893
|
deepMergeData(toVal, fromVal);
|
|
5878
5894
|
}
|
|
5879
5895
|
else {
|
|
@@ -5904,7 +5920,7 @@ var Vue = (function () {
|
|
|
5904
5920
|
// call beforeCreate first before accessing other options since
|
|
5905
5921
|
// the hook may mutate resolved options (#2791)
|
|
5906
5922
|
if (options.beforeCreate) {
|
|
5907
|
-
callHook(options.beforeCreate, instance, "bc" /* BEFORE_CREATE */);
|
|
5923
|
+
callHook(options.beforeCreate, instance, "bc" /* LifecycleHooks.BEFORE_CREATE */);
|
|
5908
5924
|
}
|
|
5909
5925
|
const {
|
|
5910
5926
|
// state
|
|
@@ -5920,7 +5936,7 @@ var Vue = (function () {
|
|
|
5920
5936
|
const [propsOptions] = instance.propsOptions;
|
|
5921
5937
|
if (propsOptions) {
|
|
5922
5938
|
for (const key in propsOptions) {
|
|
5923
|
-
checkDuplicateProperties("Props" /* PROPS */, key);
|
|
5939
|
+
checkDuplicateProperties("Props" /* OptionTypes.PROPS */, key);
|
|
5924
5940
|
}
|
|
5925
5941
|
}
|
|
5926
5942
|
}
|
|
@@ -5950,7 +5966,7 @@ var Vue = (function () {
|
|
|
5950
5966
|
});
|
|
5951
5967
|
}
|
|
5952
5968
|
{
|
|
5953
|
-
checkDuplicateProperties("Methods" /* METHODS */, key);
|
|
5969
|
+
checkDuplicateProperties("Methods" /* OptionTypes.METHODS */, key);
|
|
5954
5970
|
}
|
|
5955
5971
|
}
|
|
5956
5972
|
else {
|
|
@@ -5977,7 +5993,7 @@ var Vue = (function () {
|
|
|
5977
5993
|
instance.data = reactive(data);
|
|
5978
5994
|
{
|
|
5979
5995
|
for (const key in data) {
|
|
5980
|
-
checkDuplicateProperties("Data" /* DATA */, key);
|
|
5996
|
+
checkDuplicateProperties("Data" /* OptionTypes.DATA */, key);
|
|
5981
5997
|
// expose data on ctx during dev
|
|
5982
5998
|
if (!isReservedPrefix(key[0])) {
|
|
5983
5999
|
Object.defineProperty(ctx, key, {
|
|
@@ -6021,7 +6037,7 @@ var Vue = (function () {
|
|
|
6021
6037
|
set: v => (c.value = v)
|
|
6022
6038
|
});
|
|
6023
6039
|
{
|
|
6024
|
-
checkDuplicateProperties("Computed" /* COMPUTED */, key);
|
|
6040
|
+
checkDuplicateProperties("Computed" /* OptionTypes.COMPUTED */, key);
|
|
6025
6041
|
}
|
|
6026
6042
|
}
|
|
6027
6043
|
}
|
|
@@ -6039,7 +6055,7 @@ var Vue = (function () {
|
|
|
6039
6055
|
});
|
|
6040
6056
|
}
|
|
6041
6057
|
if (created) {
|
|
6042
|
-
callHook(created, instance, "c" /* CREATED */);
|
|
6058
|
+
callHook(created, instance, "c" /* LifecycleHooks.CREATED */);
|
|
6043
6059
|
}
|
|
6044
6060
|
function registerLifecycleHook(register, hook) {
|
|
6045
6061
|
if (isArray(hook)) {
|
|
@@ -6063,11 +6079,11 @@ var Vue = (function () {
|
|
|
6063
6079
|
registerLifecycleHook(onServerPrefetch, serverPrefetch);
|
|
6064
6080
|
{
|
|
6065
6081
|
if (beforeDestroy &&
|
|
6066
|
-
softAssertCompatEnabled("OPTIONS_BEFORE_DESTROY" /* OPTIONS_BEFORE_DESTROY */, instance)) {
|
|
6082
|
+
softAssertCompatEnabled("OPTIONS_BEFORE_DESTROY" /* DeprecationTypes.OPTIONS_BEFORE_DESTROY */, instance)) {
|
|
6067
6083
|
registerLifecycleHook(onBeforeUnmount, beforeDestroy);
|
|
6068
6084
|
}
|
|
6069
6085
|
if (destroyed &&
|
|
6070
|
-
softAssertCompatEnabled("OPTIONS_DESTROYED" /* OPTIONS_DESTROYED */, instance)) {
|
|
6086
|
+
softAssertCompatEnabled("OPTIONS_DESTROYED" /* DeprecationTypes.OPTIONS_DESTROYED */, instance)) {
|
|
6071
6087
|
registerLifecycleHook(onUnmounted, destroyed);
|
|
6072
6088
|
}
|
|
6073
6089
|
}
|
|
@@ -6099,7 +6115,7 @@ var Vue = (function () {
|
|
|
6099
6115
|
if (directives)
|
|
6100
6116
|
instance.directives = directives;
|
|
6101
6117
|
if (filters &&
|
|
6102
|
-
isCompatEnabled("FILTERS" /* FILTERS */, instance)) {
|
|
6118
|
+
isCompatEnabled("FILTERS" /* DeprecationTypes.FILTERS */, instance)) {
|
|
6103
6119
|
instance.filters = filters;
|
|
6104
6120
|
}
|
|
6105
6121
|
}
|
|
@@ -6146,7 +6162,7 @@ var Vue = (function () {
|
|
|
6146
6162
|
ctx[key] = injected;
|
|
6147
6163
|
}
|
|
6148
6164
|
{
|
|
6149
|
-
checkDuplicateProperties("Inject" /* INJECT */, key);
|
|
6165
|
+
checkDuplicateProperties("Inject" /* OptionTypes.INJECT */, key);
|
|
6150
6166
|
}
|
|
6151
6167
|
}
|
|
6152
6168
|
}
|
|
@@ -6206,7 +6222,7 @@ var Vue = (function () {
|
|
|
6206
6222
|
resolved = cached;
|
|
6207
6223
|
}
|
|
6208
6224
|
else if (!globalMixins.length && !mixins && !extendsOptions) {
|
|
6209
|
-
if (isCompatEnabled("PRIVATE_APIS" /* PRIVATE_APIS */, instance)) {
|
|
6225
|
+
if (isCompatEnabled("PRIVATE_APIS" /* DeprecationTypes.PRIVATE_APIS */, instance)) {
|
|
6210
6226
|
resolved = extend({}, base);
|
|
6211
6227
|
resolved.parent = instance.parent && instance.parent.proxy;
|
|
6212
6228
|
resolved.propsData = instance.vnode.props;
|
|
@@ -6222,7 +6238,9 @@ var Vue = (function () {
|
|
|
6222
6238
|
}
|
|
6223
6239
|
mergeOptions(resolved, base, optionMergeStrategies);
|
|
6224
6240
|
}
|
|
6225
|
-
|
|
6241
|
+
if (isObject(base)) {
|
|
6242
|
+
cache.set(base, resolved);
|
|
6243
|
+
}
|
|
6226
6244
|
return resolved;
|
|
6227
6245
|
}
|
|
6228
6246
|
function mergeOptions(to, from, strats, asMixin = false) {
|
|
@@ -6290,7 +6308,7 @@ var Vue = (function () {
|
|
|
6290
6308
|
return from;
|
|
6291
6309
|
}
|
|
6292
6310
|
return function mergedDataFn() {
|
|
6293
|
-
return (isCompatEnabled("OPTIONS_DATA_MERGE" /* OPTIONS_DATA_MERGE */, null)
|
|
6311
|
+
return (isCompatEnabled("OPTIONS_DATA_MERGE" /* DeprecationTypes.OPTIONS_DATA_MERGE */, null)
|
|
6294
6312
|
? deepMergeData
|
|
6295
6313
|
: extend)(isFunction(to) ? to.call(this, this) : to, isFunction(from) ? from.call(this, this) : from);
|
|
6296
6314
|
};
|
|
@@ -6329,7 +6347,7 @@ var Vue = (function () {
|
|
|
6329
6347
|
function createPropsDefaultThis(instance, rawProps, propKey) {
|
|
6330
6348
|
return new Proxy({}, {
|
|
6331
6349
|
get(_, key) {
|
|
6332
|
-
warnDeprecation("PROPS_DEFAULT_THIS" /* PROPS_DEFAULT_THIS */, null, propKey);
|
|
6350
|
+
warnDeprecation("PROPS_DEFAULT_THIS" /* DeprecationTypes.PROPS_DEFAULT_THIS */, null, propKey);
|
|
6333
6351
|
// $options
|
|
6334
6352
|
if (key === '$options') {
|
|
6335
6353
|
return resolveMergedOptions(instance);
|
|
@@ -6359,11 +6377,11 @@ var Vue = (function () {
|
|
|
6359
6377
|
return true;
|
|
6360
6378
|
}
|
|
6361
6379
|
if ((key === 'class' || key === 'style') &&
|
|
6362
|
-
isCompatEnabled("INSTANCE_ATTRS_CLASS_STYLE" /* INSTANCE_ATTRS_CLASS_STYLE */, instance)) {
|
|
6380
|
+
isCompatEnabled("INSTANCE_ATTRS_CLASS_STYLE" /* DeprecationTypes.INSTANCE_ATTRS_CLASS_STYLE */, instance)) {
|
|
6363
6381
|
return true;
|
|
6364
6382
|
}
|
|
6365
6383
|
if (isOn(key) &&
|
|
6366
|
-
isCompatEnabled("INSTANCE_LISTENERS" /* INSTANCE_LISTENERS */, instance)) {
|
|
6384
|
+
isCompatEnabled("INSTANCE_LISTENERS" /* DeprecationTypes.INSTANCE_LISTENERS */, instance)) {
|
|
6367
6385
|
return true;
|
|
6368
6386
|
}
|
|
6369
6387
|
// vue-router
|
|
@@ -6406,6 +6424,13 @@ var Vue = (function () {
|
|
|
6406
6424
|
}
|
|
6407
6425
|
instance.attrs = attrs;
|
|
6408
6426
|
}
|
|
6427
|
+
function isInHmrContext(instance) {
|
|
6428
|
+
while (instance) {
|
|
6429
|
+
if (instance.type.__hmrId)
|
|
6430
|
+
return true;
|
|
6431
|
+
instance = instance.parent;
|
|
6432
|
+
}
|
|
6433
|
+
}
|
|
6409
6434
|
function updateProps(instance, rawProps, rawPrevProps, optimized) {
|
|
6410
6435
|
const { props, attrs, vnode: { patchFlag } } = instance;
|
|
6411
6436
|
const rawCurrentProps = toRaw(props);
|
|
@@ -6415,11 +6440,10 @@ var Vue = (function () {
|
|
|
6415
6440
|
// always force full diff in dev
|
|
6416
6441
|
// - #1942 if hmr is enabled with sfc component
|
|
6417
6442
|
// - vite#872 non-sfc component used by sfc component
|
|
6418
|
-
!((instance
|
|
6419
|
-
(instance.parent && instance.parent.type.__hmrId))) &&
|
|
6443
|
+
!(isInHmrContext(instance)) &&
|
|
6420
6444
|
(optimized || patchFlag > 0) &&
|
|
6421
|
-
!(patchFlag & 16 /* FULL_PROPS */)) {
|
|
6422
|
-
if (patchFlag & 8 /* PROPS */) {
|
|
6445
|
+
!(patchFlag & 16 /* PatchFlags.FULL_PROPS */)) {
|
|
6446
|
+
if (patchFlag & 8 /* PatchFlags.PROPS */) {
|
|
6423
6447
|
// Compiler-generated props & no keys change, just set the updated
|
|
6424
6448
|
// the props.
|
|
6425
6449
|
const propsToUpdate = instance.vnode.dynamicProps;
|
|
@@ -6506,7 +6530,7 @@ var Vue = (function () {
|
|
|
6506
6530
|
}
|
|
6507
6531
|
// trigger updates for $attrs in case it's used in component slots
|
|
6508
6532
|
if (hasAttrsChanged) {
|
|
6509
|
-
trigger(instance, "set" /* SET */, '$attrs');
|
|
6533
|
+
trigger(instance, "set" /* TriggerOpTypes.SET */, '$attrs');
|
|
6510
6534
|
}
|
|
6511
6535
|
{
|
|
6512
6536
|
validateProps(rawProps || {}, props, instance);
|
|
@@ -6524,7 +6548,7 @@ var Vue = (function () {
|
|
|
6524
6548
|
}
|
|
6525
6549
|
{
|
|
6526
6550
|
if (key.startsWith('onHook:')) {
|
|
6527
|
-
softAssertCompatEnabled("INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */, instance, key.slice(2).toLowerCase());
|
|
6551
|
+
softAssertCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance, key.slice(2).toLowerCase());
|
|
6528
6552
|
}
|
|
6529
6553
|
if (key === 'inline-template') {
|
|
6530
6554
|
continue;
|
|
@@ -6585,7 +6609,7 @@ var Vue = (function () {
|
|
|
6585
6609
|
}
|
|
6586
6610
|
else {
|
|
6587
6611
|
setCurrentInstance(instance);
|
|
6588
|
-
value = propsDefaults[key] = defaultValue.call(isCompatEnabled("PROPS_DEFAULT_THIS" /* PROPS_DEFAULT_THIS */, instance)
|
|
6612
|
+
value = propsDefaults[key] = defaultValue.call(isCompatEnabled("PROPS_DEFAULT_THIS" /* DeprecationTypes.PROPS_DEFAULT_THIS */, instance)
|
|
6589
6613
|
? createPropsDefaultThis(instance, props, key)
|
|
6590
6614
|
: null, props);
|
|
6591
6615
|
unsetCurrentInstance();
|
|
@@ -6596,11 +6620,11 @@ var Vue = (function () {
|
|
|
6596
6620
|
}
|
|
6597
6621
|
}
|
|
6598
6622
|
// boolean casting
|
|
6599
|
-
if (opt[0 /* shouldCast */]) {
|
|
6623
|
+
if (opt[0 /* BooleanFlags.shouldCast */]) {
|
|
6600
6624
|
if (isAbsent && !hasDefault) {
|
|
6601
6625
|
value = false;
|
|
6602
6626
|
}
|
|
6603
|
-
else if (opt[1 /* shouldCastTrue */] &&
|
|
6627
|
+
else if (opt[1 /* BooleanFlags.shouldCastTrue */] &&
|
|
6604
6628
|
(value === '' || value === hyphenate(key))) {
|
|
6605
6629
|
value = true;
|
|
6606
6630
|
}
|
|
@@ -6641,7 +6665,9 @@ var Vue = (function () {
|
|
|
6641
6665
|
}
|
|
6642
6666
|
}
|
|
6643
6667
|
if (!raw && !hasExtends) {
|
|
6644
|
-
|
|
6668
|
+
if (isObject(comp)) {
|
|
6669
|
+
cache.set(comp, EMPTY_ARR);
|
|
6670
|
+
}
|
|
6645
6671
|
return EMPTY_ARR;
|
|
6646
6672
|
}
|
|
6647
6673
|
if (isArray(raw)) {
|
|
@@ -6668,8 +6694,8 @@ var Vue = (function () {
|
|
|
6668
6694
|
if (prop) {
|
|
6669
6695
|
const booleanIndex = getTypeIndex(Boolean, prop.type);
|
|
6670
6696
|
const stringIndex = getTypeIndex(String, prop.type);
|
|
6671
|
-
prop[0 /* shouldCast */] = booleanIndex > -1;
|
|
6672
|
-
prop[1 /* shouldCastTrue */] =
|
|
6697
|
+
prop[0 /* BooleanFlags.shouldCast */] = booleanIndex > -1;
|
|
6698
|
+
prop[1 /* BooleanFlags.shouldCastTrue */] =
|
|
6673
6699
|
stringIndex < 0 || booleanIndex < stringIndex;
|
|
6674
6700
|
// if the prop needs boolean casting or default value
|
|
6675
6701
|
if (booleanIndex > -1 || hasOwn(prop, 'default')) {
|
|
@@ -6680,7 +6706,9 @@ var Vue = (function () {
|
|
|
6680
6706
|
}
|
|
6681
6707
|
}
|
|
6682
6708
|
const res = [normalized, needCastKeys];
|
|
6683
|
-
|
|
6709
|
+
if (isObject(comp)) {
|
|
6710
|
+
cache.set(comp, res);
|
|
6711
|
+
}
|
|
6684
6712
|
return res;
|
|
6685
6713
|
}
|
|
6686
6714
|
function validatePropName(key) {
|
|
@@ -6871,7 +6899,7 @@ var Vue = (function () {
|
|
|
6871
6899
|
slots[key] = normalizeSlot(key, value, ctx);
|
|
6872
6900
|
}
|
|
6873
6901
|
else if (value != null) {
|
|
6874
|
-
if (!(isCompatEnabled("RENDER_FUNCTION" /* RENDER_FUNCTION */, instance))) {
|
|
6902
|
+
if (!(isCompatEnabled("RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */, instance))) {
|
|
6875
6903
|
warn$1(`Non-function value encountered for slot "${key}". ` +
|
|
6876
6904
|
`Prefer function slots for better performance.`);
|
|
6877
6905
|
}
|
|
@@ -6882,7 +6910,7 @@ var Vue = (function () {
|
|
|
6882
6910
|
};
|
|
6883
6911
|
const normalizeVNodeSlots = (instance, children) => {
|
|
6884
6912
|
if (!isKeepAlive(instance.vnode) &&
|
|
6885
|
-
!(isCompatEnabled("RENDER_FUNCTION" /* RENDER_FUNCTION */, instance))) {
|
|
6913
|
+
!(isCompatEnabled("RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */, instance))) {
|
|
6886
6914
|
warn$1(`Non-function value encountered for default slot. ` +
|
|
6887
6915
|
`Prefer function slots for better performance.`);
|
|
6888
6916
|
}
|
|
@@ -6890,7 +6918,7 @@ var Vue = (function () {
|
|
|
6890
6918
|
instance.slots.default = () => normalized;
|
|
6891
6919
|
};
|
|
6892
6920
|
const initSlots = (instance, children) => {
|
|
6893
|
-
if (instance.vnode.shapeFlag & 32 /* SLOTS_CHILDREN */) {
|
|
6921
|
+
if (instance.vnode.shapeFlag & 32 /* ShapeFlags.SLOTS_CHILDREN */) {
|
|
6894
6922
|
const type = children._;
|
|
6895
6923
|
if (type) {
|
|
6896
6924
|
// users can get the shallow readonly version of the slots object through `this.$slots`,
|
|
@@ -6915,7 +6943,7 @@ var Vue = (function () {
|
|
|
6915
6943
|
const { vnode, slots } = instance;
|
|
6916
6944
|
let needDeletionCheck = true;
|
|
6917
6945
|
let deletionComparisonTarget = EMPTY_OBJ;
|
|
6918
|
-
if (vnode.shapeFlag & 32 /* SLOTS_CHILDREN */) {
|
|
6946
|
+
if (vnode.shapeFlag & 32 /* ShapeFlags.SLOTS_CHILDREN */) {
|
|
6919
6947
|
const type = children._;
|
|
6920
6948
|
if (type) {
|
|
6921
6949
|
// compiled slots.
|
|
@@ -6924,7 +6952,7 @@ var Vue = (function () {
|
|
|
6924
6952
|
// force update slots and mark instance for hmr as well
|
|
6925
6953
|
extend(slots, children);
|
|
6926
6954
|
}
|
|
6927
|
-
else if (optimized && type === 1 /* STABLE */) {
|
|
6955
|
+
else if (optimized && type === 1 /* SlotFlags.STABLE */) {
|
|
6928
6956
|
// compiled AND stable.
|
|
6929
6957
|
// no need to update, and skip stale slots removal.
|
|
6930
6958
|
needDeletionCheck = false;
|
|
@@ -6937,7 +6965,7 @@ var Vue = (function () {
|
|
|
6937
6965
|
// when rendering the optimized slots by manually written render function,
|
|
6938
6966
|
// we need to delete the `slots._` flag if necessary to make subsequent updates reliable,
|
|
6939
6967
|
// i.e. let the `renderSlot` create the bailed Fragment
|
|
6940
|
-
if (!optimized && type === 1 /* STABLE */) {
|
|
6968
|
+
if (!optimized && type === 1 /* SlotFlags.STABLE */) {
|
|
6941
6969
|
delete slots._;
|
|
6942
6970
|
}
|
|
6943
6971
|
}
|
|
@@ -6966,11 +6994,11 @@ var Vue = (function () {
|
|
|
6966
6994
|
// dev only
|
|
6967
6995
|
function installLegacyConfigWarnings(config) {
|
|
6968
6996
|
const legacyConfigOptions = {
|
|
6969
|
-
silent: "CONFIG_SILENT" /* CONFIG_SILENT */,
|
|
6970
|
-
devtools: "CONFIG_DEVTOOLS" /* CONFIG_DEVTOOLS */,
|
|
6971
|
-
ignoredElements: "CONFIG_IGNORED_ELEMENTS" /* CONFIG_IGNORED_ELEMENTS */,
|
|
6972
|
-
keyCodes: "CONFIG_KEY_CODES" /* CONFIG_KEY_CODES */,
|
|
6973
|
-
productionTip: "CONFIG_PRODUCTION_TIP" /* CONFIG_PRODUCTION_TIP */
|
|
6997
|
+
silent: "CONFIG_SILENT" /* DeprecationTypes.CONFIG_SILENT */,
|
|
6998
|
+
devtools: "CONFIG_DEVTOOLS" /* DeprecationTypes.CONFIG_DEVTOOLS */,
|
|
6999
|
+
ignoredElements: "CONFIG_IGNORED_ELEMENTS" /* DeprecationTypes.CONFIG_IGNORED_ELEMENTS */,
|
|
7000
|
+
keyCodes: "CONFIG_KEY_CODES" /* DeprecationTypes.CONFIG_KEY_CODES */,
|
|
7001
|
+
productionTip: "CONFIG_PRODUCTION_TIP" /* DeprecationTypes.CONFIG_PRODUCTION_TIP */
|
|
6974
7002
|
};
|
|
6975
7003
|
Object.keys(legacyConfigOptions).forEach(key => {
|
|
6976
7004
|
let val = config[key];
|
|
@@ -6995,7 +7023,7 @@ var Vue = (function () {
|
|
|
6995
7023
|
return target[key];
|
|
6996
7024
|
}
|
|
6997
7025
|
if (key in internalOptionMergeStrats &&
|
|
6998
|
-
softAssertCompatEnabled("CONFIG_OPTION_MERGE_STRATS" /* CONFIG_OPTION_MERGE_STRATS */, null)) {
|
|
7026
|
+
softAssertCompatEnabled("CONFIG_OPTION_MERGE_STRATS" /* DeprecationTypes.CONFIG_OPTION_MERGE_STRATS */, null)) {
|
|
6999
7027
|
return internalOptionMergeStrats[key];
|
|
7000
7028
|
}
|
|
7001
7029
|
}
|
|
@@ -7013,11 +7041,11 @@ var Vue = (function () {
|
|
|
7013
7041
|
return createCompatApp(options, Vue);
|
|
7014
7042
|
});
|
|
7015
7043
|
function createCompatApp(options = {}, Ctor) {
|
|
7016
|
-
assertCompatEnabled("GLOBAL_MOUNT" /* GLOBAL_MOUNT */, null);
|
|
7044
|
+
assertCompatEnabled("GLOBAL_MOUNT" /* DeprecationTypes.GLOBAL_MOUNT */, null);
|
|
7017
7045
|
const { data } = options;
|
|
7018
7046
|
if (data &&
|
|
7019
7047
|
!isFunction(data) &&
|
|
7020
|
-
softAssertCompatEnabled("OPTIONS_DATA_FN" /* OPTIONS_DATA_FN */, null)) {
|
|
7048
|
+
softAssertCompatEnabled("OPTIONS_DATA_FN" /* DeprecationTypes.OPTIONS_DATA_FN */, null)) {
|
|
7021
7049
|
options.data = () => data;
|
|
7022
7050
|
}
|
|
7023
7051
|
const app = createApp(options);
|
|
@@ -7032,7 +7060,7 @@ var Vue = (function () {
|
|
|
7032
7060
|
return vm;
|
|
7033
7061
|
}
|
|
7034
7062
|
}
|
|
7035
|
-
Vue.version = `2.6.14-compat:${"3.2.
|
|
7063
|
+
Vue.version = `2.6.14-compat:${"3.2.39"}`;
|
|
7036
7064
|
Vue.config = singletonApp.config;
|
|
7037
7065
|
Vue.use = (p, ...options) => {
|
|
7038
7066
|
if (p && isFunction(p.install)) {
|
|
@@ -7071,7 +7099,7 @@ var Vue = (function () {
|
|
|
7071
7099
|
Vue.nextTick = nextTick;
|
|
7072
7100
|
const extendCache = new WeakMap();
|
|
7073
7101
|
function extendCtor(extendOptions = {}) {
|
|
7074
|
-
assertCompatEnabled("GLOBAL_EXTEND" /* GLOBAL_EXTEND */, null);
|
|
7102
|
+
assertCompatEnabled("GLOBAL_EXTEND" /* DeprecationTypes.GLOBAL_EXTEND */, null);
|
|
7075
7103
|
if (isFunction(extendOptions)) {
|
|
7076
7104
|
extendOptions = extendOptions.options;
|
|
7077
7105
|
}
|
|
@@ -7112,15 +7140,15 @@ var Vue = (function () {
|
|
|
7112
7140
|
}
|
|
7113
7141
|
Vue.extend = extendCtor.bind(Vue);
|
|
7114
7142
|
Vue.set = (target, key, value) => {
|
|
7115
|
-
assertCompatEnabled("GLOBAL_SET" /* GLOBAL_SET */, null);
|
|
7143
|
+
assertCompatEnabled("GLOBAL_SET" /* DeprecationTypes.GLOBAL_SET */, null);
|
|
7116
7144
|
target[key] = value;
|
|
7117
7145
|
};
|
|
7118
7146
|
Vue.delete = (target, key) => {
|
|
7119
|
-
assertCompatEnabled("GLOBAL_DELETE" /* GLOBAL_DELETE */, null);
|
|
7147
|
+
assertCompatEnabled("GLOBAL_DELETE" /* DeprecationTypes.GLOBAL_DELETE */, null);
|
|
7120
7148
|
delete target[key];
|
|
7121
7149
|
};
|
|
7122
7150
|
Vue.observable = (target) => {
|
|
7123
|
-
assertCompatEnabled("GLOBAL_OBSERVABLE" /* GLOBAL_OBSERVABLE */, null);
|
|
7151
|
+
assertCompatEnabled("GLOBAL_OBSERVABLE" /* DeprecationTypes.GLOBAL_OBSERVABLE */, null);
|
|
7124
7152
|
return reactive(target);
|
|
7125
7153
|
};
|
|
7126
7154
|
Vue.filter = ((name, filter) => {
|
|
@@ -7141,7 +7169,7 @@ var Vue = (function () {
|
|
|
7141
7169
|
};
|
|
7142
7170
|
Object.defineProperty(Vue, 'util', {
|
|
7143
7171
|
get() {
|
|
7144
|
-
assertCompatEnabled("GLOBAL_PRIVATE_UTIL" /* GLOBAL_PRIVATE_UTIL */, null);
|
|
7172
|
+
assertCompatEnabled("GLOBAL_PRIVATE_UTIL" /* DeprecationTypes.GLOBAL_PRIVATE_UTIL */, null);
|
|
7145
7173
|
return util;
|
|
7146
7174
|
}
|
|
7147
7175
|
});
|
|
@@ -7164,7 +7192,7 @@ var Vue = (function () {
|
|
|
7164
7192
|
function installFilterMethod(app, context) {
|
|
7165
7193
|
context.filters = {};
|
|
7166
7194
|
app.filter = (name, filter) => {
|
|
7167
|
-
assertCompatEnabled("FILTERS" /* FILTERS */, null);
|
|
7195
|
+
assertCompatEnabled("FILTERS" /* DeprecationTypes.FILTERS */, null);
|
|
7168
7196
|
if (!filter) {
|
|
7169
7197
|
return context.filters[name];
|
|
7170
7198
|
}
|
|
@@ -7181,7 +7209,7 @@ var Vue = (function () {
|
|
|
7181
7209
|
// so that app.use() can work with legacy plugins that extend prototypes
|
|
7182
7210
|
prototype: {
|
|
7183
7211
|
get() {
|
|
7184
|
-
warnDeprecation("GLOBAL_PROTOTYPE" /* GLOBAL_PROTOTYPE */, null);
|
|
7212
|
+
warnDeprecation("GLOBAL_PROTOTYPE" /* DeprecationTypes.GLOBAL_PROTOTYPE */, null);
|
|
7185
7213
|
return app.config.globalProperties;
|
|
7186
7214
|
}
|
|
7187
7215
|
},
|
|
@@ -7218,7 +7246,7 @@ var Vue = (function () {
|
|
|
7218
7246
|
app.config[key] = isObject(val) ? Object.create(val) : val;
|
|
7219
7247
|
// compat for runtime ignoredElements -> isCustomElement
|
|
7220
7248
|
if (key === 'ignoredElements' &&
|
|
7221
|
-
isCompatEnabled("CONFIG_IGNORED_ELEMENTS" /* CONFIG_IGNORED_ELEMENTS */, null) &&
|
|
7249
|
+
isCompatEnabled("CONFIG_IGNORED_ELEMENTS" /* DeprecationTypes.CONFIG_IGNORED_ELEMENTS */, null) &&
|
|
7222
7250
|
!isRuntimeOnly() &&
|
|
7223
7251
|
isArray(val)) {
|
|
7224
7252
|
app.config.compilerOptions.isCustomElement = tag => {
|
|
@@ -7231,7 +7259,7 @@ var Vue = (function () {
|
|
|
7231
7259
|
}
|
|
7232
7260
|
function applySingletonPrototype(app, Ctor) {
|
|
7233
7261
|
// copy prototype augmentations as config.globalProperties
|
|
7234
|
-
const enabled = isCompatEnabled("GLOBAL_PROTOTYPE" /* GLOBAL_PROTOTYPE */, null);
|
|
7262
|
+
const enabled = isCompatEnabled("GLOBAL_PROTOTYPE" /* DeprecationTypes.GLOBAL_PROTOTYPE */, null);
|
|
7235
7263
|
if (enabled) {
|
|
7236
7264
|
app.config.globalProperties = Object.create(Ctor.prototype);
|
|
7237
7265
|
}
|
|
@@ -7246,7 +7274,7 @@ var Vue = (function () {
|
|
|
7246
7274
|
}
|
|
7247
7275
|
}
|
|
7248
7276
|
if (hasPrototypeAugmentations) {
|
|
7249
|
-
warnDeprecation("GLOBAL_PROTOTYPE" /* GLOBAL_PROTOTYPE */, null);
|
|
7277
|
+
warnDeprecation("GLOBAL_PROTOTYPE" /* DeprecationTypes.GLOBAL_PROTOTYPE */, null);
|
|
7250
7278
|
}
|
|
7251
7279
|
}
|
|
7252
7280
|
function installCompatMount(app, context, render) {
|
|
@@ -7316,7 +7344,7 @@ var Vue = (function () {
|
|
|
7316
7344
|
for (let i = 0; i < container.attributes.length; i++) {
|
|
7317
7345
|
const attr = container.attributes[i];
|
|
7318
7346
|
if (attr.name !== 'v-cloak' && /^(v-|:|@)/.test(attr.name)) {
|
|
7319
|
-
warnDeprecation("GLOBAL_MOUNT_CONTAINER" /* GLOBAL_MOUNT_CONTAINER */, null);
|
|
7347
|
+
warnDeprecation("GLOBAL_MOUNT_CONTAINER" /* DeprecationTypes.GLOBAL_MOUNT_CONTAINER */, null);
|
|
7320
7348
|
break;
|
|
7321
7349
|
}
|
|
7322
7350
|
}
|
|
@@ -7355,7 +7383,7 @@ var Vue = (function () {
|
|
|
7355
7383
|
if (bum) {
|
|
7356
7384
|
invokeArrayFns(bum);
|
|
7357
7385
|
}
|
|
7358
|
-
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */, instance)) {
|
|
7386
|
+
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
7359
7387
|
instance.emit('hook:beforeDestroy');
|
|
7360
7388
|
}
|
|
7361
7389
|
// stop effects
|
|
@@ -7366,7 +7394,7 @@ var Vue = (function () {
|
|
|
7366
7394
|
if (um) {
|
|
7367
7395
|
invokeArrayFns(um);
|
|
7368
7396
|
}
|
|
7369
|
-
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */, instance)) {
|
|
7397
|
+
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
7370
7398
|
instance.emit('hook:destroyed');
|
|
7371
7399
|
}
|
|
7372
7400
|
}
|
|
@@ -7427,12 +7455,12 @@ var Vue = (function () {
|
|
|
7427
7455
|
enumerable: true,
|
|
7428
7456
|
configurable: true,
|
|
7429
7457
|
get() {
|
|
7430
|
-
track(obj, "get" /* GET */, key);
|
|
7458
|
+
track(obj, "get" /* TrackOpTypes.GET */, key);
|
|
7431
7459
|
return val;
|
|
7432
7460
|
},
|
|
7433
7461
|
set(newVal) {
|
|
7434
7462
|
val = isObject(newVal) ? reactive(newVal) : newVal;
|
|
7435
|
-
trigger(obj, "set" /* SET */, key, newVal);
|
|
7463
|
+
trigger(obj, "set" /* TriggerOpTypes.SET */, key, newVal);
|
|
7436
7464
|
}
|
|
7437
7465
|
});
|
|
7438
7466
|
}
|
|
@@ -7625,7 +7653,7 @@ var Vue = (function () {
|
|
|
7625
7653
|
// because the template ref is forwarded to inner component
|
|
7626
7654
|
return;
|
|
7627
7655
|
}
|
|
7628
|
-
const refValue = vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */
|
|
7656
|
+
const refValue = vnode.shapeFlag & 4 /* ShapeFlags.STATEFUL_COMPONENT */
|
|
7629
7657
|
? getExposeProxy(vnode.component) || vnode.component.proxy
|
|
7630
7658
|
: vnode.el;
|
|
7631
7659
|
const value = isUnmount ? null : refValue;
|
|
@@ -7651,7 +7679,7 @@ var Vue = (function () {
|
|
|
7651
7679
|
}
|
|
7652
7680
|
}
|
|
7653
7681
|
if (isFunction(ref)) {
|
|
7654
|
-
callWithErrorHandling(ref, owner, 12 /* FUNCTION_REF */, [value, refs]);
|
|
7682
|
+
callWithErrorHandling(ref, owner, 12 /* ErrorCodes.FUNCTION_REF */, [value, refs]);
|
|
7655
7683
|
}
|
|
7656
7684
|
else {
|
|
7657
7685
|
const _isString = isString(ref);
|
|
@@ -7688,7 +7716,7 @@ var Vue = (function () {
|
|
|
7688
7716
|
setupState[ref] = value;
|
|
7689
7717
|
}
|
|
7690
7718
|
}
|
|
7691
|
-
else if (
|
|
7719
|
+
else if (_isRef) {
|
|
7692
7720
|
ref.value = value;
|
|
7693
7721
|
if (rawRef.k)
|
|
7694
7722
|
refs[rawRef.k] = value;
|
|
@@ -7713,7 +7741,7 @@ var Vue = (function () {
|
|
|
7713
7741
|
|
|
7714
7742
|
let hasMismatch = false;
|
|
7715
7743
|
const isSVGContainer = (container) => /svg/.test(container.namespaceURI) && container.tagName !== 'foreignObject';
|
|
7716
|
-
const isComment = (node) => node.nodeType === 8 /* COMMENT */;
|
|
7744
|
+
const isComment = (node) => node.nodeType === 8 /* DOMNodeTypes.COMMENT */;
|
|
7717
7745
|
// Note: hydration is DOM-specific
|
|
7718
7746
|
// But we have to place it in core due to tight coupling with core - splitting
|
|
7719
7747
|
// it out creates a ton of unnecessary complexity.
|
|
@@ -7727,11 +7755,13 @@ var Vue = (function () {
|
|
|
7727
7755
|
`Performing full mount instead.`);
|
|
7728
7756
|
patch(null, vnode, container);
|
|
7729
7757
|
flushPostFlushCbs();
|
|
7758
|
+
container._vnode = vnode;
|
|
7730
7759
|
return;
|
|
7731
7760
|
}
|
|
7732
7761
|
hasMismatch = false;
|
|
7733
7762
|
hydrateNode(container.firstChild, vnode, null, null, null);
|
|
7734
7763
|
flushPostFlushCbs();
|
|
7764
|
+
container._vnode = vnode;
|
|
7735
7765
|
if (hasMismatch && !false) {
|
|
7736
7766
|
// this error should show up in production
|
|
7737
7767
|
console.error(`Hydration completed but contains mismatches.`);
|
|
@@ -7743,14 +7773,14 @@ var Vue = (function () {
|
|
|
7743
7773
|
const { type, ref, shapeFlag, patchFlag } = vnode;
|
|
7744
7774
|
const domType = node.nodeType;
|
|
7745
7775
|
vnode.el = node;
|
|
7746
|
-
if (patchFlag === -2 /* BAIL */) {
|
|
7776
|
+
if (patchFlag === -2 /* PatchFlags.BAIL */) {
|
|
7747
7777
|
optimized = false;
|
|
7748
7778
|
vnode.dynamicChildren = null;
|
|
7749
7779
|
}
|
|
7750
7780
|
let nextNode = null;
|
|
7751
7781
|
switch (type) {
|
|
7752
7782
|
case Text:
|
|
7753
|
-
if (domType !== 3 /* TEXT */) {
|
|
7783
|
+
if (domType !== 3 /* DOMNodeTypes.TEXT */) {
|
|
7754
7784
|
// #5728 empty text node inside a slot can cause hydration failure
|
|
7755
7785
|
// because the server rendered HTML won't contain a text node
|
|
7756
7786
|
if (vnode.children === '') {
|
|
@@ -7773,7 +7803,7 @@ var Vue = (function () {
|
|
|
7773
7803
|
}
|
|
7774
7804
|
break;
|
|
7775
7805
|
case Comment:
|
|
7776
|
-
if (domType !== 8 /* COMMENT */ || isFragmentStart) {
|
|
7806
|
+
if (domType !== 8 /* DOMNodeTypes.COMMENT */ || isFragmentStart) {
|
|
7777
7807
|
nextNode = onMismatch();
|
|
7778
7808
|
}
|
|
7779
7809
|
else {
|
|
@@ -7781,7 +7811,7 @@ var Vue = (function () {
|
|
|
7781
7811
|
}
|
|
7782
7812
|
break;
|
|
7783
7813
|
case Static:
|
|
7784
|
-
if (domType !== 1 /* ELEMENT */) {
|
|
7814
|
+
if (domType !== 1 /* DOMNodeTypes.ELEMENT */ && domType !== 3 /* DOMNodeTypes.TEXT */) {
|
|
7785
7815
|
nextNode = onMismatch();
|
|
7786
7816
|
}
|
|
7787
7817
|
else {
|
|
@@ -7792,7 +7822,10 @@ var Vue = (function () {
|
|
|
7792
7822
|
const needToAdoptContent = !vnode.children.length;
|
|
7793
7823
|
for (let i = 0; i < vnode.staticCount; i++) {
|
|
7794
7824
|
if (needToAdoptContent)
|
|
7795
|
-
vnode.children +=
|
|
7825
|
+
vnode.children +=
|
|
7826
|
+
nextNode.nodeType === 1 /* DOMNodeTypes.ELEMENT */
|
|
7827
|
+
? nextNode.outerHTML
|
|
7828
|
+
: nextNode.data;
|
|
7796
7829
|
if (i === vnode.staticCount - 1) {
|
|
7797
7830
|
vnode.anchor = nextNode;
|
|
7798
7831
|
}
|
|
@@ -7810,8 +7843,8 @@ var Vue = (function () {
|
|
|
7810
7843
|
}
|
|
7811
7844
|
break;
|
|
7812
7845
|
default:
|
|
7813
|
-
if (shapeFlag & 1 /* ELEMENT */) {
|
|
7814
|
-
if (domType !== 1 /* ELEMENT */ ||
|
|
7846
|
+
if (shapeFlag & 1 /* ShapeFlags.ELEMENT */) {
|
|
7847
|
+
if (domType !== 1 /* DOMNodeTypes.ELEMENT */ ||
|
|
7815
7848
|
vnode.type.toLowerCase() !==
|
|
7816
7849
|
node.tagName.toLowerCase()) {
|
|
7817
7850
|
nextNode = onMismatch();
|
|
@@ -7820,7 +7853,7 @@ var Vue = (function () {
|
|
|
7820
7853
|
nextNode = hydrateElement(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
7821
7854
|
}
|
|
7822
7855
|
}
|
|
7823
|
-
else if (shapeFlag & 6 /* COMPONENT */) {
|
|
7856
|
+
else if (shapeFlag & 6 /* ShapeFlags.COMPONENT */) {
|
|
7824
7857
|
// when setting up the render effect, if the initial vnode already
|
|
7825
7858
|
// has .el set, the component will perform hydration instead of mount
|
|
7826
7859
|
// on its sub-tree.
|
|
@@ -7859,15 +7892,15 @@ var Vue = (function () {
|
|
|
7859
7892
|
vnode.component.subTree = subTree;
|
|
7860
7893
|
}
|
|
7861
7894
|
}
|
|
7862
|
-
else if (shapeFlag & 64 /* TELEPORT */) {
|
|
7863
|
-
if (domType !== 8 /* COMMENT */) {
|
|
7895
|
+
else if (shapeFlag & 64 /* ShapeFlags.TELEPORT */) {
|
|
7896
|
+
if (domType !== 8 /* DOMNodeTypes.COMMENT */) {
|
|
7864
7897
|
nextNode = onMismatch();
|
|
7865
7898
|
}
|
|
7866
7899
|
else {
|
|
7867
7900
|
nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, rendererInternals, hydrateChildren);
|
|
7868
7901
|
}
|
|
7869
7902
|
}
|
|
7870
|
-
else if (shapeFlag & 128 /* SUSPENSE */) {
|
|
7903
|
+
else if (shapeFlag & 128 /* ShapeFlags.SUSPENSE */) {
|
|
7871
7904
|
nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, isSVGContainer(parentNode(node)), slotScopeIds, optimized, rendererInternals, hydrateNode);
|
|
7872
7905
|
}
|
|
7873
7906
|
else {
|
|
@@ -7895,7 +7928,7 @@ var Vue = (function () {
|
|
|
7895
7928
|
if (props) {
|
|
7896
7929
|
if (forcePatchValue ||
|
|
7897
7930
|
!optimized ||
|
|
7898
|
-
patchFlag & (16 /* FULL_PROPS */ | 32 /* HYDRATE_EVENTS */)) {
|
|
7931
|
+
patchFlag & (16 /* PatchFlags.FULL_PROPS */ | 32 /* PatchFlags.HYDRATE_EVENTS */)) {
|
|
7899
7932
|
for (const key in props) {
|
|
7900
7933
|
if ((forcePatchValue && key.endsWith('value')) ||
|
|
7901
7934
|
(isOn(key) && !isReservedProp(key))) {
|
|
@@ -7924,7 +7957,7 @@ var Vue = (function () {
|
|
|
7924
7957
|
}, parentSuspense);
|
|
7925
7958
|
}
|
|
7926
7959
|
// children
|
|
7927
|
-
if (shapeFlag & 16 /* ARRAY_CHILDREN */ &&
|
|
7960
|
+
if (shapeFlag & 16 /* ShapeFlags.ARRAY_CHILDREN */ &&
|
|
7928
7961
|
// skip if element has innerHTML / textContent
|
|
7929
7962
|
!(props && (props.innerHTML || props.textContent))) {
|
|
7930
7963
|
let next = hydrateChildren(el.firstChild, vnode, el, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
@@ -7942,7 +7975,7 @@ var Vue = (function () {
|
|
|
7942
7975
|
remove(cur);
|
|
7943
7976
|
}
|
|
7944
7977
|
}
|
|
7945
|
-
else if (shapeFlag & 8 /* TEXT_CHILDREN */) {
|
|
7978
|
+
else if (shapeFlag & 8 /* ShapeFlags.TEXT_CHILDREN */) {
|
|
7946
7979
|
if (el.textContent !== vnode.children) {
|
|
7947
7980
|
hasMismatch = true;
|
|
7948
7981
|
warn$1(`Hydration text content mismatch in <${vnode.type}>:\n` +
|
|
@@ -8005,7 +8038,7 @@ var Vue = (function () {
|
|
|
8005
8038
|
};
|
|
8006
8039
|
const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
|
|
8007
8040
|
hasMismatch = true;
|
|
8008
|
-
warn$1(`Hydration node mismatch:\n- Client vnode:`, vnode.type, `\n- Server rendered DOM:`, node, node.nodeType === 3 /* TEXT */
|
|
8041
|
+
warn$1(`Hydration node mismatch:\n- Client vnode:`, vnode.type, `\n- Server rendered DOM:`, node, node.nodeType === 3 /* DOMNodeTypes.TEXT */
|
|
8009
8042
|
? `(text)`
|
|
8010
8043
|
: isComment(node) && node.data === '['
|
|
8011
8044
|
? `(start of fragment)`
|
|
@@ -8136,7 +8169,7 @@ var Vue = (function () {
|
|
|
8136
8169
|
unmount(n1, parentComponent, parentSuspense, true);
|
|
8137
8170
|
n1 = null;
|
|
8138
8171
|
}
|
|
8139
|
-
if (n2.patchFlag === -2 /* BAIL */) {
|
|
8172
|
+
if (n2.patchFlag === -2 /* PatchFlags.BAIL */) {
|
|
8140
8173
|
optimized = false;
|
|
8141
8174
|
n2.dynamicChildren = null;
|
|
8142
8175
|
}
|
|
@@ -8160,16 +8193,16 @@ var Vue = (function () {
|
|
|
8160
8193
|
processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
|
|
8161
8194
|
break;
|
|
8162
8195
|
default:
|
|
8163
|
-
if (shapeFlag & 1 /* ELEMENT */) {
|
|
8196
|
+
if (shapeFlag & 1 /* ShapeFlags.ELEMENT */) {
|
|
8164
8197
|
processElement(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
|
|
8165
8198
|
}
|
|
8166
|
-
else if (shapeFlag & 6 /* COMPONENT */) {
|
|
8199
|
+
else if (shapeFlag & 6 /* ShapeFlags.COMPONENT */) {
|
|
8167
8200
|
processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
|
|
8168
8201
|
}
|
|
8169
|
-
else if (shapeFlag & 64 /* TELEPORT */) {
|
|
8202
|
+
else if (shapeFlag & 64 /* ShapeFlags.TELEPORT */) {
|
|
8170
8203
|
type.process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals);
|
|
8171
8204
|
}
|
|
8172
|
-
else if (shapeFlag & 128 /* SUSPENSE */) {
|
|
8205
|
+
else if (shapeFlag & 128 /* ShapeFlags.SUSPENSE */) {
|
|
8173
8206
|
type.process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals);
|
|
8174
8207
|
}
|
|
8175
8208
|
else {
|
|
@@ -8255,10 +8288,10 @@ var Vue = (function () {
|
|
|
8255
8288
|
el = vnode.el = hostCreateElement(vnode.type, isSVG, props && props.is, props);
|
|
8256
8289
|
// mount children first, since some props may rely on child content
|
|
8257
8290
|
// being already rendered, e.g. `<select value>`
|
|
8258
|
-
if (shapeFlag & 8 /* TEXT_CHILDREN */) {
|
|
8291
|
+
if (shapeFlag & 8 /* ShapeFlags.TEXT_CHILDREN */) {
|
|
8259
8292
|
hostSetElementText(el, vnode.children);
|
|
8260
8293
|
}
|
|
8261
|
-
else if (shapeFlag & 16 /* ARRAY_CHILDREN */) {
|
|
8294
|
+
else if (shapeFlag & 16 /* ShapeFlags.ARRAY_CHILDREN */) {
|
|
8262
8295
|
mountChildren(vnode.children, el, null, parentComponent, parentSuspense, isSVG && type !== 'foreignObject', slotScopeIds, optimized);
|
|
8263
8296
|
}
|
|
8264
8297
|
if (dirs) {
|
|
@@ -8334,7 +8367,7 @@ var Vue = (function () {
|
|
|
8334
8367
|
if (parentComponent) {
|
|
8335
8368
|
let subTree = parentComponent.subTree;
|
|
8336
8369
|
if (subTree.patchFlag > 0 &&
|
|
8337
|
-
subTree.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */) {
|
|
8370
|
+
subTree.patchFlag & 2048 /* PatchFlags.DEV_ROOT_FRAGMENT */) {
|
|
8338
8371
|
subTree =
|
|
8339
8372
|
filterSingleRoot(subTree.children) || subTree;
|
|
8340
8373
|
}
|
|
@@ -8357,7 +8390,7 @@ var Vue = (function () {
|
|
|
8357
8390
|
let { patchFlag, dynamicChildren, dirs } = n2;
|
|
8358
8391
|
// #1426 take the old vnode's patch flag into account since user may clone a
|
|
8359
8392
|
// compiler-generated vnode, which de-opts to FULL_PROPS
|
|
8360
|
-
patchFlag |= n1.patchFlag & 16 /* FULL_PROPS */;
|
|
8393
|
+
patchFlag |= n1.patchFlag & 16 /* PatchFlags.FULL_PROPS */;
|
|
8361
8394
|
const oldProps = n1.props || EMPTY_OBJ;
|
|
8362
8395
|
const newProps = n2.props || EMPTY_OBJ;
|
|
8363
8396
|
let vnodeHook;
|
|
@@ -8392,21 +8425,21 @@ var Vue = (function () {
|
|
|
8392
8425
|
// generated by the compiler and can take the fast path.
|
|
8393
8426
|
// in this path old node and new node are guaranteed to have the same shape
|
|
8394
8427
|
// (i.e. at the exact same position in the source template)
|
|
8395
|
-
if (patchFlag & 16 /* FULL_PROPS */) {
|
|
8428
|
+
if (patchFlag & 16 /* PatchFlags.FULL_PROPS */) {
|
|
8396
8429
|
// element props contain dynamic keys, full diff needed
|
|
8397
8430
|
patchProps(el, n2, oldProps, newProps, parentComponent, parentSuspense, isSVG);
|
|
8398
8431
|
}
|
|
8399
8432
|
else {
|
|
8400
8433
|
// class
|
|
8401
8434
|
// this flag is matched when the element has dynamic class bindings.
|
|
8402
|
-
if (patchFlag & 2 /* CLASS */) {
|
|
8435
|
+
if (patchFlag & 2 /* PatchFlags.CLASS */) {
|
|
8403
8436
|
if (oldProps.class !== newProps.class) {
|
|
8404
8437
|
hostPatchProp(el, 'class', null, newProps.class, isSVG);
|
|
8405
8438
|
}
|
|
8406
8439
|
}
|
|
8407
8440
|
// style
|
|
8408
8441
|
// this flag is matched when the element has dynamic style bindings
|
|
8409
|
-
if (patchFlag & 4 /* STYLE */) {
|
|
8442
|
+
if (patchFlag & 4 /* PatchFlags.STYLE */) {
|
|
8410
8443
|
hostPatchProp(el, 'style', oldProps.style, newProps.style, isSVG);
|
|
8411
8444
|
}
|
|
8412
8445
|
// props
|
|
@@ -8415,7 +8448,7 @@ var Vue = (function () {
|
|
|
8415
8448
|
// faster iteration.
|
|
8416
8449
|
// Note dynamic keys like :[foo]="bar" will cause this optimization to
|
|
8417
8450
|
// bail out and go through a full diff because we need to unset the old key
|
|
8418
|
-
if (patchFlag & 8 /* PROPS */) {
|
|
8451
|
+
if (patchFlag & 8 /* PatchFlags.PROPS */) {
|
|
8419
8452
|
// if the flag is present then dynamicProps must be non-null
|
|
8420
8453
|
const propsToUpdate = n2.dynamicProps;
|
|
8421
8454
|
for (let i = 0; i < propsToUpdate.length; i++) {
|
|
@@ -8431,7 +8464,7 @@ var Vue = (function () {
|
|
|
8431
8464
|
}
|
|
8432
8465
|
// text
|
|
8433
8466
|
// This flag is matched when the element has only dynamic text children.
|
|
8434
|
-
if (patchFlag & 1 /* TEXT */) {
|
|
8467
|
+
if (patchFlag & 1 /* PatchFlags.TEXT */) {
|
|
8435
8468
|
if (n1.children !== n2.children) {
|
|
8436
8469
|
hostSetElementText(el, n2.children);
|
|
8437
8470
|
}
|
|
@@ -8465,7 +8498,7 @@ var Vue = (function () {
|
|
|
8465
8498
|
// which also requires the correct parent container
|
|
8466
8499
|
!isSameVNodeType(oldVNode, newVNode) ||
|
|
8467
8500
|
// - In the case of a component, it could contain anything.
|
|
8468
|
-
oldVNode.shapeFlag & (6 /* COMPONENT */ | 64 /* TELEPORT */))
|
|
8501
|
+
oldVNode.shapeFlag & (6 /* ShapeFlags.COMPONENT */ | 64 /* ShapeFlags.TELEPORT */))
|
|
8469
8502
|
? hostParentNode(oldVNode.el)
|
|
8470
8503
|
: // In other cases, the parent container is not actually used so we
|
|
8471
8504
|
// just pass the block element here to avoid a DOM parentNode call.
|
|
@@ -8503,7 +8536,7 @@ var Vue = (function () {
|
|
|
8503
8536
|
const fragmentEndAnchor = (n2.anchor = n1 ? n1.anchor : hostCreateText(''));
|
|
8504
8537
|
let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2;
|
|
8505
8538
|
if (// #5523 dev root fragment may inherit directives
|
|
8506
|
-
(isHmrUpdating || patchFlag & 2048 /* DEV_ROOT_FRAGMENT */)) {
|
|
8539
|
+
(isHmrUpdating || patchFlag & 2048 /* PatchFlags.DEV_ROOT_FRAGMENT */)) {
|
|
8507
8540
|
// HMR updated / Dev root fragment (w/ comments), force full diff
|
|
8508
8541
|
patchFlag = 0;
|
|
8509
8542
|
optimized = false;
|
|
@@ -8525,7 +8558,7 @@ var Vue = (function () {
|
|
|
8525
8558
|
}
|
|
8526
8559
|
else {
|
|
8527
8560
|
if (patchFlag > 0 &&
|
|
8528
|
-
patchFlag & 64 /* STABLE_FRAGMENT */ &&
|
|
8561
|
+
patchFlag & 64 /* PatchFlags.STABLE_FRAGMENT */ &&
|
|
8529
8562
|
dynamicChildren &&
|
|
8530
8563
|
// #2715 the previous fragment could've been a BAILed one as a result
|
|
8531
8564
|
// of renderSlot() with no valid children
|
|
@@ -8558,7 +8591,7 @@ var Vue = (function () {
|
|
|
8558
8591
|
const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
|
|
8559
8592
|
n2.slotScopeIds = slotScopeIds;
|
|
8560
8593
|
if (n1 == null) {
|
|
8561
|
-
if (n2.shapeFlag & 512 /* COMPONENT_KEPT_ALIVE */) {
|
|
8594
|
+
if (n2.shapeFlag & 512 /* ShapeFlags.COMPONENT_KEPT_ALIVE */) {
|
|
8562
8595
|
parentComponent.ctx.activate(n2, container, anchor, isSVG, optimized);
|
|
8563
8596
|
}
|
|
8564
8597
|
else {
|
|
@@ -8663,7 +8696,7 @@ var Vue = (function () {
|
|
|
8663
8696
|
(vnodeHook = props && props.onVnodeBeforeMount)) {
|
|
8664
8697
|
invokeVNodeHook(vnodeHook, parent, initialVNode);
|
|
8665
8698
|
}
|
|
8666
|
-
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */, instance)) {
|
|
8699
|
+
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
8667
8700
|
instance.emit('hook:beforeMount');
|
|
8668
8701
|
}
|
|
8669
8702
|
toggleRecurse(instance, true);
|
|
@@ -8724,18 +8757,18 @@ var Vue = (function () {
|
|
|
8724
8757
|
const scopedInitialVNode = initialVNode;
|
|
8725
8758
|
queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), parentSuspense);
|
|
8726
8759
|
}
|
|
8727
|
-
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */, instance)) {
|
|
8760
|
+
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
8728
8761
|
queuePostRenderEffect(() => instance.emit('hook:mounted'), parentSuspense);
|
|
8729
8762
|
}
|
|
8730
8763
|
// activated hook for keep-alive roots.
|
|
8731
8764
|
// #1742 activated hook must be accessed after first render
|
|
8732
8765
|
// since the hook may be injected by a child keep-alive
|
|
8733
|
-
if (initialVNode.shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */ ||
|
|
8766
|
+
if (initialVNode.shapeFlag & 256 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */ ||
|
|
8734
8767
|
(parent &&
|
|
8735
8768
|
isAsyncWrapper(parent.vnode) &&
|
|
8736
|
-
parent.vnode.shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */)) {
|
|
8769
|
+
parent.vnode.shapeFlag & 256 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */)) {
|
|
8737
8770
|
instance.a && queuePostRenderEffect(instance.a, parentSuspense);
|
|
8738
|
-
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */, instance)) {
|
|
8771
|
+
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
8739
8772
|
queuePostRenderEffect(() => instance.emit('hook:activated'), parentSuspense);
|
|
8740
8773
|
}
|
|
8741
8774
|
}
|
|
@@ -8773,7 +8806,7 @@ var Vue = (function () {
|
|
|
8773
8806
|
if ((vnodeHook = next.props && next.props.onVnodeBeforeUpdate)) {
|
|
8774
8807
|
invokeVNodeHook(vnodeHook, parent, next, vnode);
|
|
8775
8808
|
}
|
|
8776
|
-
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */, instance)) {
|
|
8809
|
+
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
8777
8810
|
instance.emit('hook:beforeUpdate');
|
|
8778
8811
|
}
|
|
8779
8812
|
toggleRecurse(instance, true);
|
|
@@ -8813,7 +8846,7 @@ var Vue = (function () {
|
|
|
8813
8846
|
if ((vnodeHook = next.props && next.props.onVnodeUpdated)) {
|
|
8814
8847
|
queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, next, vnode), parentSuspense);
|
|
8815
8848
|
}
|
|
8816
|
-
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */, instance)) {
|
|
8849
|
+
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
8817
8850
|
queuePostRenderEffect(() => instance.emit('hook:updated'), parentSuspense);
|
|
8818
8851
|
}
|
|
8819
8852
|
{
|
|
@@ -8853,7 +8886,7 @@ var Vue = (function () {
|
|
|
8853
8886
|
pauseTracking();
|
|
8854
8887
|
// props update may have triggered pre-flush watchers.
|
|
8855
8888
|
// flush them before the render update.
|
|
8856
|
-
flushPreFlushCbs(
|
|
8889
|
+
flushPreFlushCbs();
|
|
8857
8890
|
resetTracking();
|
|
8858
8891
|
};
|
|
8859
8892
|
const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized = false) => {
|
|
@@ -8863,22 +8896,22 @@ var Vue = (function () {
|
|
|
8863
8896
|
const { patchFlag, shapeFlag } = n2;
|
|
8864
8897
|
// fast path
|
|
8865
8898
|
if (patchFlag > 0) {
|
|
8866
|
-
if (patchFlag & 128 /* KEYED_FRAGMENT */) {
|
|
8899
|
+
if (patchFlag & 128 /* PatchFlags.KEYED_FRAGMENT */) {
|
|
8867
8900
|
// this could be either fully-keyed or mixed (some keyed some not)
|
|
8868
8901
|
// presence of patchFlag means children are guaranteed to be arrays
|
|
8869
8902
|
patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
|
|
8870
8903
|
return;
|
|
8871
8904
|
}
|
|
8872
|
-
else if (patchFlag & 256 /* UNKEYED_FRAGMENT */) {
|
|
8905
|
+
else if (patchFlag & 256 /* PatchFlags.UNKEYED_FRAGMENT */) {
|
|
8873
8906
|
// unkeyed
|
|
8874
8907
|
patchUnkeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
|
|
8875
8908
|
return;
|
|
8876
8909
|
}
|
|
8877
8910
|
}
|
|
8878
8911
|
// children has 3 possibilities: text, array or no children.
|
|
8879
|
-
if (shapeFlag & 8 /* TEXT_CHILDREN */) {
|
|
8912
|
+
if (shapeFlag & 8 /* ShapeFlags.TEXT_CHILDREN */) {
|
|
8880
8913
|
// text children fast path
|
|
8881
|
-
if (prevShapeFlag & 16 /* ARRAY_CHILDREN */) {
|
|
8914
|
+
if (prevShapeFlag & 16 /* ShapeFlags.ARRAY_CHILDREN */) {
|
|
8882
8915
|
unmountChildren(c1, parentComponent, parentSuspense);
|
|
8883
8916
|
}
|
|
8884
8917
|
if (c2 !== c1) {
|
|
@@ -8886,9 +8919,9 @@ var Vue = (function () {
|
|
|
8886
8919
|
}
|
|
8887
8920
|
}
|
|
8888
8921
|
else {
|
|
8889
|
-
if (prevShapeFlag & 16 /* ARRAY_CHILDREN */) {
|
|
8922
|
+
if (prevShapeFlag & 16 /* ShapeFlags.ARRAY_CHILDREN */) {
|
|
8890
8923
|
// prev children was array
|
|
8891
|
-
if (shapeFlag & 16 /* ARRAY_CHILDREN */) {
|
|
8924
|
+
if (shapeFlag & 16 /* ShapeFlags.ARRAY_CHILDREN */) {
|
|
8892
8925
|
// two arrays, cannot assume anything, do full diff
|
|
8893
8926
|
patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
|
|
8894
8927
|
}
|
|
@@ -8900,11 +8933,11 @@ var Vue = (function () {
|
|
|
8900
8933
|
else {
|
|
8901
8934
|
// prev children was text OR null
|
|
8902
8935
|
// new children is array OR null
|
|
8903
|
-
if (prevShapeFlag & 8 /* TEXT_CHILDREN */) {
|
|
8936
|
+
if (prevShapeFlag & 8 /* ShapeFlags.TEXT_CHILDREN */) {
|
|
8904
8937
|
hostSetElementText(container, '');
|
|
8905
8938
|
}
|
|
8906
8939
|
// mount new if array
|
|
8907
|
-
if (shapeFlag & 16 /* ARRAY_CHILDREN */) {
|
|
8940
|
+
if (shapeFlag & 16 /* ShapeFlags.ARRAY_CHILDREN */) {
|
|
8908
8941
|
mountChildren(c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
|
|
8909
8942
|
}
|
|
8910
8943
|
}
|
|
@@ -9095,7 +9128,7 @@ var Vue = (function () {
|
|
|
9095
9128
|
// There is no stable subsequence (e.g. a reverse)
|
|
9096
9129
|
// OR current node is not among the stable sequence
|
|
9097
9130
|
if (j < 0 || i !== increasingNewIndexSequence[j]) {
|
|
9098
|
-
move(nextChild, container, anchor, 2 /* REORDER */);
|
|
9131
|
+
move(nextChild, container, anchor, 2 /* MoveType.REORDER */);
|
|
9099
9132
|
}
|
|
9100
9133
|
else {
|
|
9101
9134
|
j--;
|
|
@@ -9106,15 +9139,15 @@ var Vue = (function () {
|
|
|
9106
9139
|
};
|
|
9107
9140
|
const move = (vnode, container, anchor, moveType, parentSuspense = null) => {
|
|
9108
9141
|
const { el, type, transition, children, shapeFlag } = vnode;
|
|
9109
|
-
if (shapeFlag & 6 /* COMPONENT */) {
|
|
9142
|
+
if (shapeFlag & 6 /* ShapeFlags.COMPONENT */) {
|
|
9110
9143
|
move(vnode.component.subTree, container, anchor, moveType);
|
|
9111
9144
|
return;
|
|
9112
9145
|
}
|
|
9113
|
-
if (shapeFlag & 128 /* SUSPENSE */) {
|
|
9146
|
+
if (shapeFlag & 128 /* ShapeFlags.SUSPENSE */) {
|
|
9114
9147
|
vnode.suspense.move(container, anchor, moveType);
|
|
9115
9148
|
return;
|
|
9116
9149
|
}
|
|
9117
|
-
if (shapeFlag & 64 /* TELEPORT */) {
|
|
9150
|
+
if (shapeFlag & 64 /* ShapeFlags.TELEPORT */) {
|
|
9118
9151
|
type.move(vnode, container, anchor, internals);
|
|
9119
9152
|
return;
|
|
9120
9153
|
}
|
|
@@ -9131,11 +9164,11 @@ var Vue = (function () {
|
|
|
9131
9164
|
return;
|
|
9132
9165
|
}
|
|
9133
9166
|
// single nodes
|
|
9134
|
-
const needTransition = moveType !== 2 /* REORDER */ &&
|
|
9135
|
-
shapeFlag & 1 /* ELEMENT */ &&
|
|
9167
|
+
const needTransition = moveType !== 2 /* MoveType.REORDER */ &&
|
|
9168
|
+
shapeFlag & 1 /* ShapeFlags.ELEMENT */ &&
|
|
9136
9169
|
transition;
|
|
9137
9170
|
if (needTransition) {
|
|
9138
|
-
if (moveType === 0 /* ENTER */) {
|
|
9171
|
+
if (moveType === 0 /* MoveType.ENTER */) {
|
|
9139
9172
|
transition.beforeEnter(el);
|
|
9140
9173
|
hostInsert(el, container, anchor);
|
|
9141
9174
|
queuePostRenderEffect(() => transition.enter(el), parentSuspense);
|
|
@@ -9167,42 +9200,42 @@ var Vue = (function () {
|
|
|
9167
9200
|
if (ref != null) {
|
|
9168
9201
|
setRef(ref, null, parentSuspense, vnode, true);
|
|
9169
9202
|
}
|
|
9170
|
-
if (shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */) {
|
|
9203
|
+
if (shapeFlag & 256 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */) {
|
|
9171
9204
|
parentComponent.ctx.deactivate(vnode);
|
|
9172
9205
|
return;
|
|
9173
9206
|
}
|
|
9174
|
-
const shouldInvokeDirs = shapeFlag & 1 /* ELEMENT */ && dirs;
|
|
9207
|
+
const shouldInvokeDirs = shapeFlag & 1 /* ShapeFlags.ELEMENT */ && dirs;
|
|
9175
9208
|
const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);
|
|
9176
9209
|
let vnodeHook;
|
|
9177
9210
|
if (shouldInvokeVnodeHook &&
|
|
9178
9211
|
(vnodeHook = props && props.onVnodeBeforeUnmount)) {
|
|
9179
9212
|
invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
9180
9213
|
}
|
|
9181
|
-
if (shapeFlag & 6 /* COMPONENT */) {
|
|
9214
|
+
if (shapeFlag & 6 /* ShapeFlags.COMPONENT */) {
|
|
9182
9215
|
unmountComponent(vnode.component, parentSuspense, doRemove);
|
|
9183
9216
|
}
|
|
9184
9217
|
else {
|
|
9185
|
-
if (shapeFlag & 128 /* SUSPENSE */) {
|
|
9218
|
+
if (shapeFlag & 128 /* ShapeFlags.SUSPENSE */) {
|
|
9186
9219
|
vnode.suspense.unmount(parentSuspense, doRemove);
|
|
9187
9220
|
return;
|
|
9188
9221
|
}
|
|
9189
9222
|
if (shouldInvokeDirs) {
|
|
9190
9223
|
invokeDirectiveHook(vnode, null, parentComponent, 'beforeUnmount');
|
|
9191
9224
|
}
|
|
9192
|
-
if (shapeFlag & 64 /* TELEPORT */) {
|
|
9225
|
+
if (shapeFlag & 64 /* ShapeFlags.TELEPORT */) {
|
|
9193
9226
|
vnode.type.remove(vnode, parentComponent, parentSuspense, optimized, internals, doRemove);
|
|
9194
9227
|
}
|
|
9195
9228
|
else if (dynamicChildren &&
|
|
9196
9229
|
// #1153: fast path should not be taken for non-stable (v-for) fragments
|
|
9197
9230
|
(type !== Fragment ||
|
|
9198
|
-
(patchFlag > 0 && patchFlag & 64 /* STABLE_FRAGMENT */))) {
|
|
9231
|
+
(patchFlag > 0 && patchFlag & 64 /* PatchFlags.STABLE_FRAGMENT */))) {
|
|
9199
9232
|
// fast path for block nodes: only need to unmount dynamic children.
|
|
9200
9233
|
unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);
|
|
9201
9234
|
}
|
|
9202
9235
|
else if ((type === Fragment &&
|
|
9203
9236
|
patchFlag &
|
|
9204
|
-
(128 /* KEYED_FRAGMENT */ | 256 /* UNKEYED_FRAGMENT */)) ||
|
|
9205
|
-
(!optimized && shapeFlag & 16 /* ARRAY_CHILDREN */)) {
|
|
9237
|
+
(128 /* PatchFlags.KEYED_FRAGMENT */ | 256 /* PatchFlags.UNKEYED_FRAGMENT */)) ||
|
|
9238
|
+
(!optimized && shapeFlag & 16 /* ShapeFlags.ARRAY_CHILDREN */)) {
|
|
9206
9239
|
unmountChildren(children, parentComponent, parentSuspense);
|
|
9207
9240
|
}
|
|
9208
9241
|
if (doRemove) {
|
|
@@ -9223,7 +9256,7 @@ var Vue = (function () {
|
|
|
9223
9256
|
const { type, el, anchor, transition } = vnode;
|
|
9224
9257
|
if (type === Fragment) {
|
|
9225
9258
|
if (vnode.patchFlag > 0 &&
|
|
9226
|
-
vnode.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */ &&
|
|
9259
|
+
vnode.patchFlag & 2048 /* PatchFlags.DEV_ROOT_FRAGMENT */ &&
|
|
9227
9260
|
transition &&
|
|
9228
9261
|
!transition.persisted) {
|
|
9229
9262
|
vnode.children.forEach(child => {
|
|
@@ -9250,7 +9283,7 @@ var Vue = (function () {
|
|
|
9250
9283
|
transition.afterLeave();
|
|
9251
9284
|
}
|
|
9252
9285
|
};
|
|
9253
|
-
if (vnode.shapeFlag & 1 /* ELEMENT */ &&
|
|
9286
|
+
if (vnode.shapeFlag & 1 /* ShapeFlags.ELEMENT */ &&
|
|
9254
9287
|
transition &&
|
|
9255
9288
|
!transition.persisted) {
|
|
9256
9289
|
const { leave, delayLeave } = transition;
|
|
@@ -9286,7 +9319,7 @@ var Vue = (function () {
|
|
|
9286
9319
|
if (bum) {
|
|
9287
9320
|
invokeArrayFns(bum);
|
|
9288
9321
|
}
|
|
9289
|
-
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */, instance)) {
|
|
9322
|
+
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
9290
9323
|
instance.emit('hook:beforeDestroy');
|
|
9291
9324
|
}
|
|
9292
9325
|
// stop effects in component scope
|
|
@@ -9302,7 +9335,7 @@ var Vue = (function () {
|
|
|
9302
9335
|
if (um) {
|
|
9303
9336
|
queuePostRenderEffect(um, parentSuspense);
|
|
9304
9337
|
}
|
|
9305
|
-
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */, instance)) {
|
|
9338
|
+
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
9306
9339
|
queuePostRenderEffect(() => instance.emit('hook:destroyed'), parentSuspense);
|
|
9307
9340
|
}
|
|
9308
9341
|
queuePostRenderEffect(() => {
|
|
@@ -9332,10 +9365,10 @@ var Vue = (function () {
|
|
|
9332
9365
|
}
|
|
9333
9366
|
};
|
|
9334
9367
|
const getNextHostNode = vnode => {
|
|
9335
|
-
if (vnode.shapeFlag & 6 /* COMPONENT */) {
|
|
9368
|
+
if (vnode.shapeFlag & 6 /* ShapeFlags.COMPONENT */) {
|
|
9336
9369
|
return getNextHostNode(vnode.component.subTree);
|
|
9337
9370
|
}
|
|
9338
|
-
if (vnode.shapeFlag & 128 /* SUSPENSE */) {
|
|
9371
|
+
if (vnode.shapeFlag & 128 /* ShapeFlags.SUSPENSE */) {
|
|
9339
9372
|
return vnode.suspense.next();
|
|
9340
9373
|
}
|
|
9341
9374
|
return hostNextSibling((vnode.anchor || vnode.el));
|
|
@@ -9349,6 +9382,7 @@ var Vue = (function () {
|
|
|
9349
9382
|
else {
|
|
9350
9383
|
patch(container._vnode || null, vnode, container, null, null, null, isSVG);
|
|
9351
9384
|
}
|
|
9385
|
+
flushPreFlushCbs();
|
|
9352
9386
|
flushPostFlushCbs();
|
|
9353
9387
|
container._vnode = vnode;
|
|
9354
9388
|
};
|
|
@@ -9398,8 +9432,8 @@ var Vue = (function () {
|
|
|
9398
9432
|
// guaranteed to be vnodes
|
|
9399
9433
|
const c1 = ch1[i];
|
|
9400
9434
|
let c2 = ch2[i];
|
|
9401
|
-
if (c2.shapeFlag & 1 /* ELEMENT */ && !c2.dynamicChildren) {
|
|
9402
|
-
if (c2.patchFlag <= 0 || c2.patchFlag === 32 /* HYDRATE_EVENTS */) {
|
|
9435
|
+
if (c2.shapeFlag & 1 /* ShapeFlags.ELEMENT */ && !c2.dynamicChildren) {
|
|
9436
|
+
if (c2.patchFlag <= 0 || c2.patchFlag === 32 /* PatchFlags.HYDRATE_EVENTS */) {
|
|
9403
9437
|
c2 = ch2[i] = cloneIfMounted(ch2[i]);
|
|
9404
9438
|
c2.el = c1.el;
|
|
9405
9439
|
}
|
|
@@ -9519,7 +9553,7 @@ var Vue = (function () {
|
|
|
9519
9553
|
const mount = (container, anchor) => {
|
|
9520
9554
|
// Teleport *always* has Array children. This is enforced in both the
|
|
9521
9555
|
// compiler and vnode children normalization.
|
|
9522
|
-
if (shapeFlag & 16 /* ARRAY_CHILDREN */) {
|
|
9556
|
+
if (shapeFlag & 16 /* ShapeFlags.ARRAY_CHILDREN */) {
|
|
9523
9557
|
mountChildren(children, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
|
|
9524
9558
|
}
|
|
9525
9559
|
};
|
|
@@ -9555,7 +9589,7 @@ var Vue = (function () {
|
|
|
9555
9589
|
if (!wasDisabled) {
|
|
9556
9590
|
// enabled -> disabled
|
|
9557
9591
|
// move into main container
|
|
9558
|
-
moveTeleport(n2, container, mainAnchor, internals, 1 /* TOGGLE */);
|
|
9592
|
+
moveTeleport(n2, container, mainAnchor, internals, 1 /* TeleportMoveTypes.TOGGLE */);
|
|
9559
9593
|
}
|
|
9560
9594
|
}
|
|
9561
9595
|
else {
|
|
@@ -9563,7 +9597,7 @@ var Vue = (function () {
|
|
|
9563
9597
|
if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) {
|
|
9564
9598
|
const nextTarget = (n2.target = resolveTarget(n2.props, querySelector));
|
|
9565
9599
|
if (nextTarget) {
|
|
9566
|
-
moveTeleport(n2, nextTarget, null, internals, 0 /* TARGET_CHANGE */);
|
|
9600
|
+
moveTeleport(n2, nextTarget, null, internals, 0 /* TeleportMoveTypes.TARGET_CHANGE */);
|
|
9567
9601
|
}
|
|
9568
9602
|
else {
|
|
9569
9603
|
warn$1('Invalid Teleport target on update:', target, `(${typeof target})`);
|
|
@@ -9572,7 +9606,7 @@ var Vue = (function () {
|
|
|
9572
9606
|
else if (wasDisabled) {
|
|
9573
9607
|
// disabled -> enabled
|
|
9574
9608
|
// move into teleport target
|
|
9575
|
-
moveTeleport(n2, target, targetAnchor, internals, 1 /* TOGGLE */);
|
|
9609
|
+
moveTeleport(n2, target, targetAnchor, internals, 1 /* TeleportMoveTypes.TOGGLE */);
|
|
9576
9610
|
}
|
|
9577
9611
|
}
|
|
9578
9612
|
}
|
|
@@ -9585,7 +9619,7 @@ var Vue = (function () {
|
|
|
9585
9619
|
// an unmounted teleport should always remove its children if not disabled
|
|
9586
9620
|
if (doRemove || !isTeleportDisabled(props)) {
|
|
9587
9621
|
hostRemove(anchor);
|
|
9588
|
-
if (shapeFlag & 16 /* ARRAY_CHILDREN */) {
|
|
9622
|
+
if (shapeFlag & 16 /* ShapeFlags.ARRAY_CHILDREN */) {
|
|
9589
9623
|
for (let i = 0; i < children.length; i++) {
|
|
9590
9624
|
const child = children[i];
|
|
9591
9625
|
unmount(child, parentComponent, parentSuspense, true, !!child.dynamicChildren);
|
|
@@ -9596,13 +9630,13 @@ var Vue = (function () {
|
|
|
9596
9630
|
move: moveTeleport,
|
|
9597
9631
|
hydrate: hydrateTeleport
|
|
9598
9632
|
};
|
|
9599
|
-
function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2 /* REORDER */) {
|
|
9633
|
+
function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2 /* TeleportMoveTypes.REORDER */) {
|
|
9600
9634
|
// move target anchor if this is a target change.
|
|
9601
|
-
if (moveType === 0 /* TARGET_CHANGE */) {
|
|
9635
|
+
if (moveType === 0 /* TeleportMoveTypes.TARGET_CHANGE */) {
|
|
9602
9636
|
insert(vnode.targetAnchor, container, parentAnchor);
|
|
9603
9637
|
}
|
|
9604
9638
|
const { el, anchor, shapeFlag, children, props } = vnode;
|
|
9605
|
-
const isReorder = moveType === 2 /* REORDER */;
|
|
9639
|
+
const isReorder = moveType === 2 /* TeleportMoveTypes.REORDER */;
|
|
9606
9640
|
// move main view anchor if this is a re-order.
|
|
9607
9641
|
if (isReorder) {
|
|
9608
9642
|
insert(el, container, parentAnchor);
|
|
@@ -9612,9 +9646,9 @@ var Vue = (function () {
|
|
|
9612
9646
|
// is not a reorder, or the teleport is disabled
|
|
9613
9647
|
if (!isReorder || isTeleportDisabled(props)) {
|
|
9614
9648
|
// Teleport has either Array children or no children.
|
|
9615
|
-
if (shapeFlag & 16 /* ARRAY_CHILDREN */) {
|
|
9649
|
+
if (shapeFlag & 16 /* ShapeFlags.ARRAY_CHILDREN */) {
|
|
9616
9650
|
for (let i = 0; i < children.length; i++) {
|
|
9617
|
-
move(children[i], container, parentAnchor, 2 /* REORDER */);
|
|
9651
|
+
move(children[i], container, parentAnchor, 2 /* MoveType.REORDER */);
|
|
9618
9652
|
}
|
|
9619
9653
|
}
|
|
9620
9654
|
}
|
|
@@ -9629,7 +9663,7 @@ var Vue = (function () {
|
|
|
9629
9663
|
// if multiple teleports rendered to the same target element, we need to
|
|
9630
9664
|
// pick up from where the last teleport finished instead of the first node
|
|
9631
9665
|
const targetNode = target._lpa || target.firstChild;
|
|
9632
|
-
if (vnode.shapeFlag & 16 /* ARRAY_CHILDREN */) {
|
|
9666
|
+
if (vnode.shapeFlag & 16 /* ShapeFlags.ARRAY_CHILDREN */) {
|
|
9633
9667
|
if (isTeleportDisabled(vnode.props)) {
|
|
9634
9668
|
vnode.anchor = hydrateChildren(nextSibling(node), vnode, parentNode(node), parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
9635
9669
|
vnode.targetAnchor = targetNode;
|
|
@@ -9706,7 +9740,7 @@ var Vue = (function () {
|
|
|
9706
9740
|
}
|
|
9707
9741
|
// 2.x async component
|
|
9708
9742
|
if (isFunction(comp) &&
|
|
9709
|
-
checkCompatEnabled("COMPONENT_ASYNC" /* COMPONENT_ASYNC */, instance, comp)) {
|
|
9743
|
+
checkCompatEnabled("COMPONENT_ASYNC" /* DeprecationTypes.COMPONENT_ASYNC */, instance, comp)) {
|
|
9710
9744
|
// since after disabling this, plain functions are still valid usage, do not
|
|
9711
9745
|
// use softAssert here.
|
|
9712
9746
|
return convertLegacyAsyncComponent(comp);
|
|
@@ -9714,7 +9748,7 @@ var Vue = (function () {
|
|
|
9714
9748
|
// 2.x functional component
|
|
9715
9749
|
if (isObject(comp) &&
|
|
9716
9750
|
comp.functional &&
|
|
9717
|
-
softAssertCompatEnabled("COMPONENT_FUNCTIONAL" /* COMPONENT_FUNCTIONAL */, instance, comp)) {
|
|
9751
|
+
softAssertCompatEnabled("COMPONENT_FUNCTIONAL" /* DeprecationTypes.COMPONENT_FUNCTIONAL */, instance, comp)) {
|
|
9718
9752
|
return convertLegacyFunctionalComponent(comp);
|
|
9719
9753
|
}
|
|
9720
9754
|
return comp;
|
|
@@ -9811,7 +9845,7 @@ var Vue = (function () {
|
|
|
9811
9845
|
return value ? value.__v_isVNode === true : false;
|
|
9812
9846
|
}
|
|
9813
9847
|
function isSameVNodeType(n1, n2) {
|
|
9814
|
-
if (n2.shapeFlag & 6 /* COMPONENT */ &&
|
|
9848
|
+
if (n2.shapeFlag & 6 /* ShapeFlags.COMPONENT */ &&
|
|
9815
9849
|
hmrDirtyComponents.has(n2.type)) {
|
|
9816
9850
|
// HMR only: if the component has been hot-updated, force a reload.
|
|
9817
9851
|
return false;
|
|
@@ -9842,7 +9876,7 @@ var Vue = (function () {
|
|
|
9842
9876
|
: ref
|
|
9843
9877
|
: null);
|
|
9844
9878
|
};
|
|
9845
|
-
function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1 /* ELEMENT */, isBlockNode = false, needFullChildrenNormalization = false) {
|
|
9879
|
+
function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1 /* ShapeFlags.ELEMENT */, isBlockNode = false, needFullChildrenNormalization = false) {
|
|
9846
9880
|
const vnode = {
|
|
9847
9881
|
__v_isVNode: true,
|
|
9848
9882
|
__v_skip: true,
|
|
@@ -9873,7 +9907,7 @@ var Vue = (function () {
|
|
|
9873
9907
|
if (needFullChildrenNormalization) {
|
|
9874
9908
|
normalizeChildren(vnode, children);
|
|
9875
9909
|
// normalize suspense children
|
|
9876
|
-
if (shapeFlag & 128 /* SUSPENSE */) {
|
|
9910
|
+
if (shapeFlag & 128 /* ShapeFlags.SUSPENSE */) {
|
|
9877
9911
|
type.normalize(vnode);
|
|
9878
9912
|
}
|
|
9879
9913
|
}
|
|
@@ -9881,8 +9915,8 @@ var Vue = (function () {
|
|
|
9881
9915
|
// compiled element vnode - if children is passed, only possible types are
|
|
9882
9916
|
// string or Array.
|
|
9883
9917
|
vnode.shapeFlag |= isString(children)
|
|
9884
|
-
? 8 /* TEXT_CHILDREN */
|
|
9885
|
-
: 16 /* ARRAY_CHILDREN */;
|
|
9918
|
+
? 8 /* ShapeFlags.TEXT_CHILDREN */
|
|
9919
|
+
: 16 /* ShapeFlags.ARRAY_CHILDREN */;
|
|
9886
9920
|
}
|
|
9887
9921
|
// validate key
|
|
9888
9922
|
if (vnode.key !== vnode.key) {
|
|
@@ -9898,10 +9932,10 @@ var Vue = (function () {
|
|
|
9898
9932
|
// component nodes also should always be patched, because even if the
|
|
9899
9933
|
// component doesn't need to update, it needs to persist the instance on to
|
|
9900
9934
|
// the next vnode so that it can be properly unmounted later.
|
|
9901
|
-
(vnode.patchFlag > 0 || shapeFlag & 6 /* COMPONENT */) &&
|
|
9935
|
+
(vnode.patchFlag > 0 || shapeFlag & 6 /* ShapeFlags.COMPONENT */) &&
|
|
9902
9936
|
// the EVENTS flag is only for hydration and if it is the only flag, the
|
|
9903
9937
|
// vnode should not be considered dynamic due to handler caching.
|
|
9904
|
-
vnode.patchFlag !== 32 /* HYDRATE_EVENTS */) {
|
|
9938
|
+
vnode.patchFlag !== 32 /* PatchFlags.HYDRATE_EVENTS */) {
|
|
9905
9939
|
currentBlock.push(vnode);
|
|
9906
9940
|
}
|
|
9907
9941
|
{
|
|
@@ -9927,14 +9961,14 @@ var Vue = (function () {
|
|
|
9927
9961
|
normalizeChildren(cloned, children);
|
|
9928
9962
|
}
|
|
9929
9963
|
if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) {
|
|
9930
|
-
if (cloned.shapeFlag & 6 /* COMPONENT */) {
|
|
9964
|
+
if (cloned.shapeFlag & 6 /* ShapeFlags.COMPONENT */) {
|
|
9931
9965
|
currentBlock[currentBlock.indexOf(type)] = cloned;
|
|
9932
9966
|
}
|
|
9933
9967
|
else {
|
|
9934
9968
|
currentBlock.push(cloned);
|
|
9935
9969
|
}
|
|
9936
9970
|
}
|
|
9937
|
-
cloned.patchFlag |= -2 /* BAIL */;
|
|
9971
|
+
cloned.patchFlag |= -2 /* PatchFlags.BAIL */;
|
|
9938
9972
|
return cloned;
|
|
9939
9973
|
}
|
|
9940
9974
|
// class component normalization.
|
|
@@ -9964,17 +9998,17 @@ var Vue = (function () {
|
|
|
9964
9998
|
}
|
|
9965
9999
|
// encode the vnode type information into a bitmap
|
|
9966
10000
|
const shapeFlag = isString(type)
|
|
9967
|
-
? 1 /* ELEMENT */
|
|
10001
|
+
? 1 /* ShapeFlags.ELEMENT */
|
|
9968
10002
|
: isSuspense(type)
|
|
9969
|
-
? 128 /* SUSPENSE */
|
|
10003
|
+
? 128 /* ShapeFlags.SUSPENSE */
|
|
9970
10004
|
: isTeleport(type)
|
|
9971
|
-
? 64 /* TELEPORT */
|
|
10005
|
+
? 64 /* ShapeFlags.TELEPORT */
|
|
9972
10006
|
: isObject(type)
|
|
9973
|
-
? 4 /* STATEFUL_COMPONENT */
|
|
10007
|
+
? 4 /* ShapeFlags.STATEFUL_COMPONENT */
|
|
9974
10008
|
: isFunction(type)
|
|
9975
|
-
? 2 /* FUNCTIONAL_COMPONENT */
|
|
10009
|
+
? 2 /* ShapeFlags.FUNCTIONAL_COMPONENT */
|
|
9976
10010
|
: 0;
|
|
9977
|
-
if (shapeFlag & 4 /* STATEFUL_COMPONENT */ && isProxy(type)) {
|
|
10011
|
+
if (shapeFlag & 4 /* ShapeFlags.STATEFUL_COMPONENT */ && isProxy(type)) {
|
|
9978
10012
|
type = toRaw(type);
|
|
9979
10013
|
warn$1(`Vue received a Component which was made a reactive object. This can ` +
|
|
9980
10014
|
`lead to unnecessary performance overhead, and should be avoided by ` +
|
|
@@ -10013,7 +10047,7 @@ var Vue = (function () {
|
|
|
10013
10047
|
: ref,
|
|
10014
10048
|
scopeId: vnode.scopeId,
|
|
10015
10049
|
slotScopeIds: vnode.slotScopeIds,
|
|
10016
|
-
children: patchFlag === -1 /* HOISTED */ && isArray(children)
|
|
10050
|
+
children: patchFlag === -1 /* PatchFlags.HOISTED */ && isArray(children)
|
|
10017
10051
|
? children.map(deepCloneVNode)
|
|
10018
10052
|
: children,
|
|
10019
10053
|
target: vnode.target,
|
|
@@ -10026,8 +10060,8 @@ var Vue = (function () {
|
|
|
10026
10060
|
// fast paths only.
|
|
10027
10061
|
patchFlag: extraProps && vnode.type !== Fragment
|
|
10028
10062
|
? patchFlag === -1 // hoisted node
|
|
10029
|
-
? 16 /* FULL_PROPS */
|
|
10030
|
-
: patchFlag | 16 /* FULL_PROPS */
|
|
10063
|
+
? 16 /* PatchFlags.FULL_PROPS */
|
|
10064
|
+
: patchFlag | 16 /* PatchFlags.FULL_PROPS */
|
|
10031
10065
|
: patchFlag,
|
|
10032
10066
|
dynamicProps: vnode.dynamicProps,
|
|
10033
10067
|
dynamicChildren: vnode.dynamicChildren,
|
|
@@ -10120,10 +10154,10 @@ var Vue = (function () {
|
|
|
10120
10154
|
children = null;
|
|
10121
10155
|
}
|
|
10122
10156
|
else if (isArray(children)) {
|
|
10123
|
-
type = 16 /* ARRAY_CHILDREN */;
|
|
10157
|
+
type = 16 /* ShapeFlags.ARRAY_CHILDREN */;
|
|
10124
10158
|
}
|
|
10125
10159
|
else if (typeof children === 'object') {
|
|
10126
|
-
if (shapeFlag & (1 /* ELEMENT */ | 64 /* TELEPORT */)) {
|
|
10160
|
+
if (shapeFlag & (1 /* ShapeFlags.ELEMENT */ | 64 /* ShapeFlags.TELEPORT */)) {
|
|
10127
10161
|
// Normalize slot to plain children for plain element and Teleport
|
|
10128
10162
|
const slot = children.default;
|
|
10129
10163
|
if (slot) {
|
|
@@ -10135,37 +10169,37 @@ var Vue = (function () {
|
|
|
10135
10169
|
return;
|
|
10136
10170
|
}
|
|
10137
10171
|
else {
|
|
10138
|
-
type = 32 /* SLOTS_CHILDREN */;
|
|
10172
|
+
type = 32 /* ShapeFlags.SLOTS_CHILDREN */;
|
|
10139
10173
|
const slotFlag = children._;
|
|
10140
10174
|
if (!slotFlag && !(InternalObjectKey in children)) {
|
|
10141
10175
|
children._ctx = currentRenderingInstance;
|
|
10142
10176
|
}
|
|
10143
|
-
else if (slotFlag === 3 /* FORWARDED */ && currentRenderingInstance) {
|
|
10177
|
+
else if (slotFlag === 3 /* SlotFlags.FORWARDED */ && currentRenderingInstance) {
|
|
10144
10178
|
// a child component receives forwarded slots from the parent.
|
|
10145
10179
|
// its slot type is determined by its parent's slot type.
|
|
10146
|
-
if (currentRenderingInstance.slots._ === 1 /* STABLE */) {
|
|
10147
|
-
children._ = 1 /* STABLE */;
|
|
10180
|
+
if (currentRenderingInstance.slots._ === 1 /* SlotFlags.STABLE */) {
|
|
10181
|
+
children._ = 1 /* SlotFlags.STABLE */;
|
|
10148
10182
|
}
|
|
10149
10183
|
else {
|
|
10150
|
-
children._ = 2 /* DYNAMIC */;
|
|
10151
|
-
vnode.patchFlag |= 1024 /* DYNAMIC_SLOTS */;
|
|
10184
|
+
children._ = 2 /* SlotFlags.DYNAMIC */;
|
|
10185
|
+
vnode.patchFlag |= 1024 /* PatchFlags.DYNAMIC_SLOTS */;
|
|
10152
10186
|
}
|
|
10153
10187
|
}
|
|
10154
10188
|
}
|
|
10155
10189
|
}
|
|
10156
10190
|
else if (isFunction(children)) {
|
|
10157
10191
|
children = { default: children, _ctx: currentRenderingInstance };
|
|
10158
|
-
type = 32 /* SLOTS_CHILDREN */;
|
|
10192
|
+
type = 32 /* ShapeFlags.SLOTS_CHILDREN */;
|
|
10159
10193
|
}
|
|
10160
10194
|
else {
|
|
10161
10195
|
children = String(children);
|
|
10162
10196
|
// force teleport children to array so it can be moved around
|
|
10163
|
-
if (shapeFlag & 64 /* TELEPORT */) {
|
|
10164
|
-
type = 16 /* ARRAY_CHILDREN */;
|
|
10197
|
+
if (shapeFlag & 64 /* ShapeFlags.TELEPORT */) {
|
|
10198
|
+
type = 16 /* ShapeFlags.ARRAY_CHILDREN */;
|
|
10165
10199
|
children = [createTextVNode(children)];
|
|
10166
10200
|
}
|
|
10167
10201
|
else {
|
|
10168
|
-
type = 8 /* TEXT_CHILDREN */;
|
|
10202
|
+
type = 8 /* ShapeFlags.TEXT_CHILDREN */;
|
|
10169
10203
|
}
|
|
10170
10204
|
}
|
|
10171
10205
|
vnode.children = children;
|
|
@@ -10203,7 +10237,7 @@ var Vue = (function () {
|
|
|
10203
10237
|
return ret;
|
|
10204
10238
|
}
|
|
10205
10239
|
function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
|
|
10206
|
-
callWithAsyncErrorHandling(hook, instance, 7 /* VNODE_HOOK */, [
|
|
10240
|
+
callWithAsyncErrorHandling(hook, instance, 7 /* ErrorCodes.VNODE_HOOK */, [
|
|
10207
10241
|
vnode,
|
|
10208
10242
|
prevVNode
|
|
10209
10243
|
]);
|
|
@@ -10311,7 +10345,7 @@ var Vue = (function () {
|
|
|
10311
10345
|
}
|
|
10312
10346
|
}
|
|
10313
10347
|
function isStatefulComponent(instance) {
|
|
10314
|
-
return instance.vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */;
|
|
10348
|
+
return instance.vnode.shapeFlag & 4 /* ShapeFlags.STATEFUL_COMPONENT */;
|
|
10315
10349
|
}
|
|
10316
10350
|
let isInSSRComponentSetup = false;
|
|
10317
10351
|
function setupComponent(instance, isSSR = false) {
|
|
@@ -10366,7 +10400,7 @@ var Vue = (function () {
|
|
|
10366
10400
|
setup.length > 1 ? createSetupContext(instance) : null);
|
|
10367
10401
|
setCurrentInstance(instance);
|
|
10368
10402
|
pauseTracking();
|
|
10369
|
-
const setupResult = callWithErrorHandling(setup, instance, 0 /* SETUP_FUNCTION */, [shallowReadonly(instance.props) , setupContext]);
|
|
10403
|
+
const setupResult = callWithErrorHandling(setup, instance, 0 /* ErrorCodes.SETUP_FUNCTION */, [shallowReadonly(instance.props) , setupContext]);
|
|
10370
10404
|
resetTracking();
|
|
10371
10405
|
unsetCurrentInstance();
|
|
10372
10406
|
if (isPromise(setupResult)) {
|
|
@@ -10378,7 +10412,7 @@ var Vue = (function () {
|
|
|
10378
10412
|
handleSetupResult(instance, resolvedResult, isSSR);
|
|
10379
10413
|
})
|
|
10380
10414
|
.catch(e => {
|
|
10381
|
-
handleError(e, instance, 0 /* SETUP_FUNCTION */);
|
|
10415
|
+
handleError(e, instance, 0 /* ErrorCodes.SETUP_FUNCTION */);
|
|
10382
10416
|
});
|
|
10383
10417
|
}
|
|
10384
10418
|
else {
|
|
@@ -10461,7 +10495,8 @@ var Vue = (function () {
|
|
|
10461
10495
|
if (!isSSR && compile && !Component.render) {
|
|
10462
10496
|
const template = (instance.vnode.props &&
|
|
10463
10497
|
instance.vnode.props['inline-template']) ||
|
|
10464
|
-
Component.template
|
|
10498
|
+
Component.template ||
|
|
10499
|
+
resolveMergedOptions(instance).template;
|
|
10465
10500
|
if (template) {
|
|
10466
10501
|
{
|
|
10467
10502
|
startMeasure(instance, `compile`);
|
|
@@ -10476,6 +10511,7 @@ var Vue = (function () {
|
|
|
10476
10511
|
// pass runtime compat config into the compiler
|
|
10477
10512
|
finalCompilerOptions.compatConfig = Object.create(globalCompatConfig);
|
|
10478
10513
|
if (Component.compatConfig) {
|
|
10514
|
+
// @ts-expect-error types are not compatible
|
|
10479
10515
|
extend(finalCompilerOptions.compatConfig, Component.compatConfig);
|
|
10480
10516
|
}
|
|
10481
10517
|
}
|
|
@@ -10520,7 +10556,7 @@ var Vue = (function () {
|
|
|
10520
10556
|
return new Proxy(instance.attrs, {
|
|
10521
10557
|
get(target, key) {
|
|
10522
10558
|
markAttrsAccessed();
|
|
10523
|
-
track(instance, "get" /* GET */, '$attrs');
|
|
10559
|
+
track(instance, "get" /* TrackOpTypes.GET */, '$attrs');
|
|
10524
10560
|
return target[key];
|
|
10525
10561
|
},
|
|
10526
10562
|
set() {
|
|
@@ -10576,10 +10612,10 @@ var Vue = (function () {
|
|
|
10576
10612
|
}
|
|
10577
10613
|
const classifyRE = /(?:^|[-_])(\w)/g;
|
|
10578
10614
|
const classify = (str) => str.replace(classifyRE, c => c.toUpperCase()).replace(/[-_]/g, '');
|
|
10579
|
-
function getComponentName(Component) {
|
|
10615
|
+
function getComponentName(Component, includeInferred = true) {
|
|
10580
10616
|
return isFunction(Component)
|
|
10581
10617
|
? Component.displayName || Component.name
|
|
10582
|
-
: Component.name;
|
|
10618
|
+
: Component.name || (includeInferred && Component.__name);
|
|
10583
10619
|
}
|
|
10584
10620
|
/* istanbul ignore next */
|
|
10585
10621
|
function formatComponentName(instance, Component, isRoot = false) {
|
|
@@ -11018,9 +11054,9 @@ var Vue = (function () {
|
|
|
11018
11054
|
}
|
|
11019
11055
|
|
|
11020
11056
|
// Core API ------------------------------------------------------------------
|
|
11021
|
-
const version = "3.2.
|
|
11057
|
+
const version = "3.2.39";
|
|
11022
11058
|
/**
|
|
11023
|
-
* SSR utils for \@vue/server-renderer. Only exposed in
|
|
11059
|
+
* SSR utils for \@vue/server-renderer. Only exposed in ssr-possible builds.
|
|
11024
11060
|
* @internal
|
|
11025
11061
|
*/
|
|
11026
11062
|
const ssrUtils = (null);
|
|
@@ -11268,14 +11304,14 @@ var Vue = (function () {
|
|
|
11268
11304
|
? 'true'
|
|
11269
11305
|
: null;
|
|
11270
11306
|
if (v2CocercedValue &&
|
|
11271
|
-
compatUtils.softAssertCompatEnabled("ATTR_ENUMERATED_COERCION" /* ATTR_ENUMERATED_COERCION */, instance, key, value, v2CocercedValue)) {
|
|
11307
|
+
compatUtils.softAssertCompatEnabled("ATTR_ENUMERATED_COERCION" /* DeprecationTypes.ATTR_ENUMERATED_COERCION */, instance, key, value, v2CocercedValue)) {
|
|
11272
11308
|
el.setAttribute(key, v2CocercedValue);
|
|
11273
11309
|
return true;
|
|
11274
11310
|
}
|
|
11275
11311
|
}
|
|
11276
11312
|
else if (value === false &&
|
|
11277
11313
|
!isSpecialBooleanAttr(key) &&
|
|
11278
|
-
compatUtils.softAssertCompatEnabled("ATTR_FALSE_VALUE" /* ATTR_FALSE_VALUE */, instance, key)) {
|
|
11314
|
+
compatUtils.softAssertCompatEnabled("ATTR_FALSE_VALUE" /* DeprecationTypes.ATTR_FALSE_VALUE */, instance, key)) {
|
|
11279
11315
|
el.removeAttribute(key);
|
|
11280
11316
|
return true;
|
|
11281
11317
|
}
|
|
@@ -11337,10 +11373,10 @@ var Vue = (function () {
|
|
|
11337
11373
|
}
|
|
11338
11374
|
else {
|
|
11339
11375
|
if (value === false &&
|
|
11340
|
-
compatUtils.isCompatEnabled("ATTR_FALSE_VALUE" /* ATTR_FALSE_VALUE */, parentComponent)) {
|
|
11376
|
+
compatUtils.isCompatEnabled("ATTR_FALSE_VALUE" /* DeprecationTypes.ATTR_FALSE_VALUE */, parentComponent)) {
|
|
11341
11377
|
const type = typeof el[key];
|
|
11342
11378
|
if (type === 'string' || type === 'number') {
|
|
11343
|
-
compatUtils.warnDeprecation("ATTR_FALSE_VALUE" /* ATTR_FALSE_VALUE */, parentComponent, key);
|
|
11379
|
+
compatUtils.warnDeprecation("ATTR_FALSE_VALUE" /* DeprecationTypes.ATTR_FALSE_VALUE */, parentComponent, key);
|
|
11344
11380
|
value = type === 'number' ? 0 : '';
|
|
11345
11381
|
needRemove = true;
|
|
11346
11382
|
}
|
|
@@ -11430,7 +11466,8 @@ var Vue = (function () {
|
|
|
11430
11466
|
options[m[0].toLowerCase()] = true;
|
|
11431
11467
|
}
|
|
11432
11468
|
}
|
|
11433
|
-
|
|
11469
|
+
const event = name[2] === ':' ? name.slice(3) : hyphenate(name.slice(2));
|
|
11470
|
+
return [event, options];
|
|
11434
11471
|
}
|
|
11435
11472
|
function createInvoker(initialValue, instance) {
|
|
11436
11473
|
const invoker = (e) => {
|
|
@@ -11442,7 +11479,7 @@ var Vue = (function () {
|
|
|
11442
11479
|
// AFTER it was attached.
|
|
11443
11480
|
const timeStamp = e.timeStamp || _getNow();
|
|
11444
11481
|
if (skipTimestampCheck || timeStamp >= invoker.attached - 1) {
|
|
11445
|
-
callWithAsyncErrorHandling(patchStopImmediatePropagation(e, invoker.value), instance, 5 /* NATIVE_EVENT_HANDLER */, [e]);
|
|
11482
|
+
callWithAsyncErrorHandling(patchStopImmediatePropagation(e, invoker.value), instance, 5 /* ErrorCodes.NATIVE_EVENT_HANDLER */, [e]);
|
|
11446
11483
|
}
|
|
11447
11484
|
};
|
|
11448
11485
|
invoker.value = initialValue;
|
|
@@ -11785,7 +11822,7 @@ var Vue = (function () {
|
|
|
11785
11822
|
});
|
|
11786
11823
|
}
|
|
11787
11824
|
function setVarsOnVNode(vnode, vars) {
|
|
11788
|
-
if (vnode.shapeFlag & 128 /* SUSPENSE */) {
|
|
11825
|
+
if (vnode.shapeFlag & 128 /* ShapeFlags.SUSPENSE */) {
|
|
11789
11826
|
const suspense = vnode.suspense;
|
|
11790
11827
|
vnode = suspense.activeBranch;
|
|
11791
11828
|
if (suspense.pendingBranch && !suspense.isHydrating) {
|
|
@@ -11798,7 +11835,7 @@ var Vue = (function () {
|
|
|
11798
11835
|
while (vnode.component) {
|
|
11799
11836
|
vnode = vnode.component.subTree;
|
|
11800
11837
|
}
|
|
11801
|
-
if (vnode.shapeFlag & 1 /* ELEMENT */ && vnode.el) {
|
|
11838
|
+
if (vnode.shapeFlag & 1 /* ShapeFlags.ELEMENT */ && vnode.el) {
|
|
11802
11839
|
setVarsOnNode(vnode.el, vars);
|
|
11803
11840
|
}
|
|
11804
11841
|
else if (vnode.type === Fragment) {
|
|
@@ -11887,7 +11924,7 @@ var Vue = (function () {
|
|
|
11887
11924
|
}
|
|
11888
11925
|
const { name = 'v', type, duration, enterFromClass = `${name}-enter-from`, enterActiveClass = `${name}-enter-active`, enterToClass = `${name}-enter-to`, appearFromClass = enterFromClass, appearActiveClass = enterActiveClass, appearToClass = enterToClass, leaveFromClass = `${name}-leave-from`, leaveActiveClass = `${name}-leave-active`, leaveToClass = `${name}-leave-to` } = rawProps;
|
|
11889
11926
|
// legacy transition class compat
|
|
11890
|
-
const legacyClassEnabled = compatUtils.isCompatEnabled("TRANSITION_CLASSES" /* TRANSITION_CLASSES */, null);
|
|
11927
|
+
const legacyClassEnabled = compatUtils.isCompatEnabled("TRANSITION_CLASSES" /* DeprecationTypes.TRANSITION_CLASSES */, null);
|
|
11891
11928
|
let legacyEnterFromClass;
|
|
11892
11929
|
let legacyAppearFromClass;
|
|
11893
11930
|
let legacyLeaveFromClass;
|
|
@@ -12196,7 +12233,7 @@ var Vue = (function () {
|
|
|
12196
12233
|
const cssTransitionProps = resolveTransitionProps(rawProps);
|
|
12197
12234
|
let tag = rawProps.tag || Fragment;
|
|
12198
12235
|
if (!rawProps.tag &&
|
|
12199
|
-
compatUtils.checkCompatEnabled("TRANSITION_GROUP_ROOT" /* TRANSITION_GROUP_ROOT */, instance.parent)) {
|
|
12236
|
+
compatUtils.checkCompatEnabled("TRANSITION_GROUP_ROOT" /* DeprecationTypes.TRANSITION_GROUP_ROOT */, instance.parent)) {
|
|
12200
12237
|
tag = 'span';
|
|
12201
12238
|
}
|
|
12202
12239
|
prevChildren = children;
|
|
@@ -12566,13 +12603,13 @@ var Vue = (function () {
|
|
|
12566
12603
|
let instance = null;
|
|
12567
12604
|
{
|
|
12568
12605
|
instance = getCurrentInstance();
|
|
12569
|
-
if (compatUtils.isCompatEnabled("CONFIG_KEY_CODES" /* CONFIG_KEY_CODES */, instance)) {
|
|
12606
|
+
if (compatUtils.isCompatEnabled("CONFIG_KEY_CODES" /* DeprecationTypes.CONFIG_KEY_CODES */, instance)) {
|
|
12570
12607
|
if (instance) {
|
|
12571
12608
|
globalKeyCodes = instance.appContext.config.keyCodes;
|
|
12572
12609
|
}
|
|
12573
12610
|
}
|
|
12574
12611
|
if (modifiers.some(m => /^\d+$/.test(m))) {
|
|
12575
|
-
compatUtils.warnDeprecation("V_ON_KEYCODE_MODIFIER" /* V_ON_KEYCODE_MODIFIER */, instance);
|
|
12612
|
+
compatUtils.warnDeprecation("V_ON_KEYCODE_MODIFIER" /* DeprecationTypes.V_ON_KEYCODE_MODIFIER */, instance);
|
|
12576
12613
|
}
|
|
12577
12614
|
}
|
|
12578
12615
|
return (event) => {
|
|
@@ -12585,7 +12622,7 @@ var Vue = (function () {
|
|
|
12585
12622
|
}
|
|
12586
12623
|
{
|
|
12587
12624
|
const keyCode = String(event.keyCode);
|
|
12588
|
-
if (compatUtils.isCompatEnabled("V_ON_KEYCODE_MODIFIER" /* V_ON_KEYCODE_MODIFIER */, instance) &&
|
|
12625
|
+
if (compatUtils.isCompatEnabled("V_ON_KEYCODE_MODIFIER" /* DeprecationTypes.V_ON_KEYCODE_MODIFIER */, instance) &&
|
|
12589
12626
|
modifiers.some(mod => mod == keyCode)) {
|
|
12590
12627
|
return fn(event);
|
|
12591
12628
|
}
|
|
@@ -12694,7 +12731,7 @@ var Vue = (function () {
|
|
|
12694
12731
|
for (let i = 0; i < container.attributes.length; i++) {
|
|
12695
12732
|
const attr = container.attributes[i];
|
|
12696
12733
|
if (attr.name !== 'v-cloak' && /^(v-|:|@)/.test(attr.name)) {
|
|
12697
|
-
compatUtils.warnDeprecation("GLOBAL_MOUNT_CONTAINER" /* GLOBAL_MOUNT_CONTAINER */, null);
|
|
12734
|
+
compatUtils.warnDeprecation("GLOBAL_MOUNT_CONTAINER" /* DeprecationTypes.GLOBAL_MOUNT_CONTAINER */, null);
|
|
12698
12735
|
break;
|
|
12699
12736
|
}
|
|
12700
12737
|
}
|
|
@@ -12951,7 +12988,7 @@ var Vue = (function () {
|
|
|
12951
12988
|
function wrappedCreateApp(...args) {
|
|
12952
12989
|
// @ts-ignore
|
|
12953
12990
|
const app = createApp(...args);
|
|
12954
|
-
if (compatUtils.isCompatEnabled("RENDER_FUNCTION" /* RENDER_FUNCTION */, null)) {
|
|
12991
|
+
if (compatUtils.isCompatEnabled("RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */, null)) {
|
|
12955
12992
|
// register built-in components so that they can be resolved via strings
|
|
12956
12993
|
// in the legacy h() call. The __compat__ prefix is to ensure that v3 h()
|
|
12957
12994
|
// doesn't get affected.
|