@vue/compat 3.2.37 → 3.2.38
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 +1164 -1122
- package/dist/vue.cjs.prod.js +973 -937
- package/dist/vue.esm-browser.js +1106 -1064
- package/dist/vue.esm-browser.prod.js +1 -1
- package/dist/vue.esm-bundler.js +1110 -1070
- package/dist/vue.global.js +1106 -1064
- package/dist/vue.global.prod.js +1 -1
- package/dist/vue.runtime.esm-browser.js +531 -502
- package/dist/vue.runtime.esm-browser.prod.js +1 -1
- package/dist/vue.runtime.esm-bundler.js +535 -508
- package/dist/vue.runtime.global.js +531 -502
- 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,38 @@ 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
|
-
currentPreFlushParentJob = parentJob;
|
|
1813
|
-
activePreFlushCbs = [...new Set(pendingPreFlushCbs)];
|
|
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, i = flushIndex) {
|
|
1804
|
+
{
|
|
1805
|
+
seen = seen || new Map();
|
|
1806
|
+
}
|
|
1807
|
+
for (; i < queue.length; i++) {
|
|
1808
|
+
const cb = queue[i];
|
|
1809
|
+
if (cb && cb.pre) {
|
|
1810
|
+
if (checkRecursiveUpdates(seen, cb)) {
|
|
1820
1811
|
continue;
|
|
1821
1812
|
}
|
|
1822
|
-
|
|
1813
|
+
queue.splice(i, 1);
|
|
1814
|
+
i--;
|
|
1815
|
+
cb();
|
|
1823
1816
|
}
|
|
1824
|
-
activePreFlushCbs = null;
|
|
1825
|
-
preFlushIndex = 0;
|
|
1826
|
-
currentPreFlushParentJob = null;
|
|
1827
|
-
// recursively flush until it drains
|
|
1828
|
-
flushPreFlushCbs(seen, parentJob);
|
|
1829
1817
|
}
|
|
1830
1818
|
}
|
|
1831
1819
|
function flushPostFlushCbs(seen) {
|
|
1832
|
-
// flush any pre cbs queued during the flush (e.g. pre watchers)
|
|
1833
|
-
flushPreFlushCbs();
|
|
1834
1820
|
if (pendingPostFlushCbs.length) {
|
|
1835
1821
|
const deduped = [...new Set(pendingPostFlushCbs)];
|
|
1836
1822
|
pendingPostFlushCbs.length = 0;
|
|
@@ -1855,13 +1841,22 @@ var Vue = (function () {
|
|
|
1855
1841
|
}
|
|
1856
1842
|
}
|
|
1857
1843
|
const getId = (job) => job.id == null ? Infinity : job.id;
|
|
1844
|
+
const comparator = (a, b) => {
|
|
1845
|
+
const diff = getId(a) - getId(b);
|
|
1846
|
+
if (diff === 0) {
|
|
1847
|
+
if (a.pre && !b.pre)
|
|
1848
|
+
return -1;
|
|
1849
|
+
if (b.pre && !a.pre)
|
|
1850
|
+
return 1;
|
|
1851
|
+
}
|
|
1852
|
+
return diff;
|
|
1853
|
+
};
|
|
1858
1854
|
function flushJobs(seen) {
|
|
1859
1855
|
isFlushPending = false;
|
|
1860
1856
|
isFlushing = true;
|
|
1861
1857
|
{
|
|
1862
1858
|
seen = seen || new Map();
|
|
1863
1859
|
}
|
|
1864
|
-
flushPreFlushCbs(seen);
|
|
1865
1860
|
// Sort queue before flush.
|
|
1866
1861
|
// This ensures that:
|
|
1867
1862
|
// 1. Components are updated from parent to child. (because parent is always
|
|
@@ -1869,7 +1864,7 @@ var Vue = (function () {
|
|
|
1869
1864
|
// priority number)
|
|
1870
1865
|
// 2. If a component is unmounted during a parent component's update,
|
|
1871
1866
|
// its update can be skipped.
|
|
1872
|
-
queue.sort(
|
|
1867
|
+
queue.sort(comparator);
|
|
1873
1868
|
// conditional usage of checkRecursiveUpdate must be determined out of
|
|
1874
1869
|
// try ... catch block since Rollup by default de-optimizes treeshaking
|
|
1875
1870
|
// inside try-catch. This can leave all warning code unshaked. Although
|
|
@@ -1885,7 +1880,7 @@ var Vue = (function () {
|
|
|
1885
1880
|
continue;
|
|
1886
1881
|
}
|
|
1887
1882
|
// console.log(`running:`, job.id)
|
|
1888
|
-
callWithErrorHandling(job, null, 14 /* SCHEDULER */);
|
|
1883
|
+
callWithErrorHandling(job, null, 14 /* ErrorCodes.SCHEDULER */);
|
|
1889
1884
|
}
|
|
1890
1885
|
}
|
|
1891
1886
|
}
|
|
@@ -1897,9 +1892,7 @@ var Vue = (function () {
|
|
|
1897
1892
|
currentFlushPromise = null;
|
|
1898
1893
|
// some postFlushCb queued jobs!
|
|
1899
1894
|
// keep flushing until it drains.
|
|
1900
|
-
if (queue.length ||
|
|
1901
|
-
pendingPreFlushCbs.length ||
|
|
1902
|
-
pendingPostFlushCbs.length) {
|
|
1895
|
+
if (queue.length || pendingPostFlushCbs.length) {
|
|
1903
1896
|
flushJobs(seen);
|
|
1904
1897
|
}
|
|
1905
1898
|
}
|
|
@@ -2117,7 +2110,7 @@ var Vue = (function () {
|
|
|
2117
2110
|
}
|
|
2118
2111
|
}
|
|
2119
2112
|
function devtoolsInitApp(app, version) {
|
|
2120
|
-
emit("app:init" /* APP_INIT */, app, version, {
|
|
2113
|
+
emit("app:init" /* DevtoolsHooks.APP_INIT */, app, version, {
|
|
2121
2114
|
Fragment,
|
|
2122
2115
|
Text,
|
|
2123
2116
|
Comment,
|
|
@@ -2125,88 +2118,88 @@ var Vue = (function () {
|
|
|
2125
2118
|
});
|
|
2126
2119
|
}
|
|
2127
2120
|
function devtoolsUnmountApp(app) {
|
|
2128
|
-
emit("app:unmount" /* APP_UNMOUNT */, app);
|
|
2121
|
+
emit("app:unmount" /* DevtoolsHooks.APP_UNMOUNT */, app);
|
|
2129
2122
|
}
|
|
2130
|
-
const devtoolsComponentAdded = /*#__PURE__*/ createDevtoolsComponentHook("component:added" /* COMPONENT_ADDED */);
|
|
2123
|
+
const devtoolsComponentAdded = /*#__PURE__*/ createDevtoolsComponentHook("component:added" /* DevtoolsHooks.COMPONENT_ADDED */);
|
|
2131
2124
|
const devtoolsComponentUpdated =
|
|
2132
|
-
/*#__PURE__*/ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */);
|
|
2125
|
+
/*#__PURE__*/ createDevtoolsComponentHook("component:updated" /* DevtoolsHooks.COMPONENT_UPDATED */);
|
|
2133
2126
|
const devtoolsComponentRemoved =
|
|
2134
|
-
/*#__PURE__*/ createDevtoolsComponentHook("component:removed" /* COMPONENT_REMOVED */);
|
|
2127
|
+
/*#__PURE__*/ createDevtoolsComponentHook("component:removed" /* DevtoolsHooks.COMPONENT_REMOVED */);
|
|
2135
2128
|
function createDevtoolsComponentHook(hook) {
|
|
2136
2129
|
return (component) => {
|
|
2137
2130
|
emit(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : undefined, component);
|
|
2138
2131
|
};
|
|
2139
2132
|
}
|
|
2140
|
-
const devtoolsPerfStart = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:start" /* PERFORMANCE_START */);
|
|
2141
|
-
const devtoolsPerfEnd = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:end" /* PERFORMANCE_END */);
|
|
2133
|
+
const devtoolsPerfStart = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:start" /* DevtoolsHooks.PERFORMANCE_START */);
|
|
2134
|
+
const devtoolsPerfEnd = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:end" /* DevtoolsHooks.PERFORMANCE_END */);
|
|
2142
2135
|
function createDevtoolsPerformanceHook(hook) {
|
|
2143
2136
|
return (component, type, time) => {
|
|
2144
2137
|
emit(hook, component.appContext.app, component.uid, component, type, time);
|
|
2145
2138
|
};
|
|
2146
2139
|
}
|
|
2147
2140
|
function devtoolsComponentEmit(component, event, params) {
|
|
2148
|
-
emit("component:emit" /* COMPONENT_EMIT */, component.appContext.app, component, event, params);
|
|
2141
|
+
emit("component:emit" /* DevtoolsHooks.COMPONENT_EMIT */, component.appContext.app, component, event, params);
|
|
2149
2142
|
}
|
|
2150
2143
|
|
|
2151
2144
|
const deprecationData = {
|
|
2152
|
-
["GLOBAL_MOUNT" /* GLOBAL_MOUNT */]: {
|
|
2145
|
+
["GLOBAL_MOUNT" /* DeprecationTypes.GLOBAL_MOUNT */]: {
|
|
2153
2146
|
message: `The global app bootstrapping API has changed: vm.$mount() and the "el" ` +
|
|
2154
2147
|
`option have been removed. Use createApp(RootComponent).mount() instead.`,
|
|
2155
2148
|
link: `https://v3-migration.vuejs.org/breaking-changes/global-api.html#mounting-app-instance`
|
|
2156
2149
|
},
|
|
2157
|
-
["GLOBAL_MOUNT_CONTAINER" /* GLOBAL_MOUNT_CONTAINER */]: {
|
|
2150
|
+
["GLOBAL_MOUNT_CONTAINER" /* DeprecationTypes.GLOBAL_MOUNT_CONTAINER */]: {
|
|
2158
2151
|
message: `Vue detected directives on the mount container. ` +
|
|
2159
2152
|
`In Vue 3, the container is no longer considered part of the template ` +
|
|
2160
2153
|
`and will not be processed/replaced.`,
|
|
2161
2154
|
link: `https://v3-migration.vuejs.org/breaking-changes/mount-changes.html`
|
|
2162
2155
|
},
|
|
2163
|
-
["GLOBAL_EXTEND" /* GLOBAL_EXTEND */]: {
|
|
2156
|
+
["GLOBAL_EXTEND" /* DeprecationTypes.GLOBAL_EXTEND */]: {
|
|
2164
2157
|
message: `Vue.extend() has been removed in Vue 3. ` +
|
|
2165
2158
|
`Use defineComponent() instead.`,
|
|
2166
2159
|
link: `https://vuejs.org/api/general.html#definecomponent`
|
|
2167
2160
|
},
|
|
2168
|
-
["GLOBAL_PROTOTYPE" /* GLOBAL_PROTOTYPE */]: {
|
|
2161
|
+
["GLOBAL_PROTOTYPE" /* DeprecationTypes.GLOBAL_PROTOTYPE */]: {
|
|
2169
2162
|
message: `Vue.prototype is no longer available in Vue 3. ` +
|
|
2170
2163
|
`Use app.config.globalProperties instead.`,
|
|
2171
2164
|
link: `https://v3-migration.vuejs.org/breaking-changes/global-api.html#vue-prototype-replaced-by-config-globalproperties`
|
|
2172
2165
|
},
|
|
2173
|
-
["GLOBAL_SET" /* GLOBAL_SET */]: {
|
|
2166
|
+
["GLOBAL_SET" /* DeprecationTypes.GLOBAL_SET */]: {
|
|
2174
2167
|
message: `Vue.set() has been removed as it is no longer needed in Vue 3. ` +
|
|
2175
2168
|
`Simply use native JavaScript mutations.`
|
|
2176
2169
|
},
|
|
2177
|
-
["GLOBAL_DELETE" /* GLOBAL_DELETE */]: {
|
|
2170
|
+
["GLOBAL_DELETE" /* DeprecationTypes.GLOBAL_DELETE */]: {
|
|
2178
2171
|
message: `Vue.delete() has been removed as it is no longer needed in Vue 3. ` +
|
|
2179
2172
|
`Simply use native JavaScript mutations.`
|
|
2180
2173
|
},
|
|
2181
|
-
["GLOBAL_OBSERVABLE" /* GLOBAL_OBSERVABLE */]: {
|
|
2174
|
+
["GLOBAL_OBSERVABLE" /* DeprecationTypes.GLOBAL_OBSERVABLE */]: {
|
|
2182
2175
|
message: `Vue.observable() has been removed. ` +
|
|
2183
2176
|
`Use \`import { reactive } from "vue"\` from Composition API instead.`,
|
|
2184
2177
|
link: `https://vuejs.org/api/reactivity-core.html#reactive`
|
|
2185
2178
|
},
|
|
2186
|
-
["GLOBAL_PRIVATE_UTIL" /* GLOBAL_PRIVATE_UTIL */]: {
|
|
2179
|
+
["GLOBAL_PRIVATE_UTIL" /* DeprecationTypes.GLOBAL_PRIVATE_UTIL */]: {
|
|
2187
2180
|
message: `Vue.util has been removed. Please refactor to avoid its usage ` +
|
|
2188
2181
|
`since it was an internal API even in Vue 2.`
|
|
2189
2182
|
},
|
|
2190
|
-
["CONFIG_SILENT" /* CONFIG_SILENT */]: {
|
|
2183
|
+
["CONFIG_SILENT" /* DeprecationTypes.CONFIG_SILENT */]: {
|
|
2191
2184
|
message: `config.silent has been removed because it is not good practice to ` +
|
|
2192
2185
|
`intentionally suppress warnings. You can use your browser console's ` +
|
|
2193
2186
|
`filter features to focus on relevant messages.`
|
|
2194
2187
|
},
|
|
2195
|
-
["CONFIG_DEVTOOLS" /* CONFIG_DEVTOOLS */]: {
|
|
2188
|
+
["CONFIG_DEVTOOLS" /* DeprecationTypes.CONFIG_DEVTOOLS */]: {
|
|
2196
2189
|
message: `config.devtools has been removed. To enable devtools for ` +
|
|
2197
2190
|
`production, configure the __VUE_PROD_DEVTOOLS__ compile-time flag.`,
|
|
2198
2191
|
link: `https://github.com/vuejs/core/tree/main/packages/vue#bundler-build-feature-flags`
|
|
2199
2192
|
},
|
|
2200
|
-
["CONFIG_KEY_CODES" /* CONFIG_KEY_CODES */]: {
|
|
2193
|
+
["CONFIG_KEY_CODES" /* DeprecationTypes.CONFIG_KEY_CODES */]: {
|
|
2201
2194
|
message: `config.keyCodes has been removed. ` +
|
|
2202
2195
|
`In Vue 3, you can directly use the kebab-case key names as v-on modifiers.`,
|
|
2203
2196
|
link: `https://v3-migration.vuejs.org/breaking-changes/keycode-modifiers.html`
|
|
2204
2197
|
},
|
|
2205
|
-
["CONFIG_PRODUCTION_TIP" /* CONFIG_PRODUCTION_TIP */]: {
|
|
2198
|
+
["CONFIG_PRODUCTION_TIP" /* DeprecationTypes.CONFIG_PRODUCTION_TIP */]: {
|
|
2206
2199
|
message: `config.productionTip has been removed.`,
|
|
2207
2200
|
link: `https://v3-migration.vuejs.org/breaking-changes/global-api.html#config-productiontip-removed`
|
|
2208
2201
|
},
|
|
2209
|
-
["CONFIG_IGNORED_ELEMENTS" /* CONFIG_IGNORED_ELEMENTS */]: {
|
|
2202
|
+
["CONFIG_IGNORED_ELEMENTS" /* DeprecationTypes.CONFIG_IGNORED_ELEMENTS */]: {
|
|
2210
2203
|
message: () => {
|
|
2211
2204
|
let msg = `config.ignoredElements has been removed.`;
|
|
2212
2205
|
if (isRuntimeOnly()) {
|
|
@@ -2219,35 +2212,35 @@ var Vue = (function () {
|
|
|
2219
2212
|
},
|
|
2220
2213
|
link: `https://v3-migration.vuejs.org/breaking-changes/global-api.html#config-ignoredelements-is-now-config-iscustomelement`
|
|
2221
2214
|
},
|
|
2222
|
-
["CONFIG_WHITESPACE" /* CONFIG_WHITESPACE */]: {
|
|
2215
|
+
["CONFIG_WHITESPACE" /* DeprecationTypes.CONFIG_WHITESPACE */]: {
|
|
2223
2216
|
// this warning is only relevant in the full build when using runtime
|
|
2224
2217
|
// compilation, so it's put in the runtime compatConfig list.
|
|
2225
2218
|
message: `Vue 3 compiler's whitespace option will default to "condense" instead of ` +
|
|
2226
2219
|
`"preserve". To suppress this warning, provide an explicit value for ` +
|
|
2227
2220
|
`\`config.compilerOptions.whitespace\`.`
|
|
2228
2221
|
},
|
|
2229
|
-
["CONFIG_OPTION_MERGE_STRATS" /* CONFIG_OPTION_MERGE_STRATS */]: {
|
|
2222
|
+
["CONFIG_OPTION_MERGE_STRATS" /* DeprecationTypes.CONFIG_OPTION_MERGE_STRATS */]: {
|
|
2230
2223
|
message: `config.optionMergeStrategies no longer exposes internal strategies. ` +
|
|
2231
2224
|
`Use custom merge functions instead.`
|
|
2232
2225
|
},
|
|
2233
|
-
["INSTANCE_SET" /* INSTANCE_SET */]: {
|
|
2226
|
+
["INSTANCE_SET" /* DeprecationTypes.INSTANCE_SET */]: {
|
|
2234
2227
|
message: `vm.$set() has been removed as it is no longer needed in Vue 3. ` +
|
|
2235
2228
|
`Simply use native JavaScript mutations.`
|
|
2236
2229
|
},
|
|
2237
|
-
["INSTANCE_DELETE" /* INSTANCE_DELETE */]: {
|
|
2230
|
+
["INSTANCE_DELETE" /* DeprecationTypes.INSTANCE_DELETE */]: {
|
|
2238
2231
|
message: `vm.$delete() has been removed as it is no longer needed in Vue 3. ` +
|
|
2239
2232
|
`Simply use native JavaScript mutations.`
|
|
2240
2233
|
},
|
|
2241
|
-
["INSTANCE_DESTROY" /* INSTANCE_DESTROY */]: {
|
|
2234
|
+
["INSTANCE_DESTROY" /* DeprecationTypes.INSTANCE_DESTROY */]: {
|
|
2242
2235
|
message: `vm.$destroy() has been removed. Use app.unmount() instead.`,
|
|
2243
2236
|
link: `https://vuejs.org/api/application.html#app-unmount`
|
|
2244
2237
|
},
|
|
2245
|
-
["INSTANCE_EVENT_EMITTER" /* INSTANCE_EVENT_EMITTER */]: {
|
|
2238
|
+
["INSTANCE_EVENT_EMITTER" /* DeprecationTypes.INSTANCE_EVENT_EMITTER */]: {
|
|
2246
2239
|
message: `vm.$on/$once/$off() have been removed. ` +
|
|
2247
2240
|
`Use an external event emitter library instead.`,
|
|
2248
2241
|
link: `https://v3-migration.vuejs.org/breaking-changes/events-api.html`
|
|
2249
2242
|
},
|
|
2250
|
-
["INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */]: {
|
|
2243
|
+
["INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */]: {
|
|
2251
2244
|
message: event => `"${event}" lifecycle events are no longer supported. From templates, ` +
|
|
2252
2245
|
`use the "vnode" prefix instead of "hook:". For example, @${event} ` +
|
|
2253
2246
|
`should be changed to @vnode-${event.slice(5)}. ` +
|
|
@@ -2255,23 +2248,23 @@ var Vue = (function () {
|
|
|
2255
2248
|
`hooks.`,
|
|
2256
2249
|
link: `https://v3-migration.vuejs.org/breaking-changes/vnode-lifecycle-events.html`
|
|
2257
2250
|
},
|
|
2258
|
-
["INSTANCE_CHILDREN" /* INSTANCE_CHILDREN */]: {
|
|
2251
|
+
["INSTANCE_CHILDREN" /* DeprecationTypes.INSTANCE_CHILDREN */]: {
|
|
2259
2252
|
message: `vm.$children has been removed. Consider refactoring your logic ` +
|
|
2260
2253
|
`to avoid relying on direct access to child components.`,
|
|
2261
2254
|
link: `https://v3-migration.vuejs.org/breaking-changes/children.html`
|
|
2262
2255
|
},
|
|
2263
|
-
["INSTANCE_LISTENERS" /* INSTANCE_LISTENERS */]: {
|
|
2256
|
+
["INSTANCE_LISTENERS" /* DeprecationTypes.INSTANCE_LISTENERS */]: {
|
|
2264
2257
|
message: `vm.$listeners has been removed. In Vue 3, parent v-on listeners are ` +
|
|
2265
2258
|
`included in vm.$attrs and it is no longer necessary to separately use ` +
|
|
2266
2259
|
`v-on="$listeners" if you are already using v-bind="$attrs". ` +
|
|
2267
2260
|
`(Note: the Vue 3 behavior only applies if this compat config is disabled)`,
|
|
2268
2261
|
link: `https://v3-migration.vuejs.org/breaking-changes/listeners-removed.html`
|
|
2269
2262
|
},
|
|
2270
|
-
["INSTANCE_SCOPED_SLOTS" /* INSTANCE_SCOPED_SLOTS */]: {
|
|
2263
|
+
["INSTANCE_SCOPED_SLOTS" /* DeprecationTypes.INSTANCE_SCOPED_SLOTS */]: {
|
|
2271
2264
|
message: `vm.$scopedSlots has been removed. Use vm.$slots instead.`,
|
|
2272
2265
|
link: `https://v3-migration.vuejs.org/breaking-changes/slots-unification.html`
|
|
2273
2266
|
},
|
|
2274
|
-
["INSTANCE_ATTRS_CLASS_STYLE" /* INSTANCE_ATTRS_CLASS_STYLE */]: {
|
|
2267
|
+
["INSTANCE_ATTRS_CLASS_STYLE" /* DeprecationTypes.INSTANCE_ATTRS_CLASS_STYLE */]: {
|
|
2275
2268
|
message: componentName => `Component <${componentName || 'Anonymous'}> has \`inheritAttrs: false\` but is ` +
|
|
2276
2269
|
`relying on class/style fallthrough from parent. In Vue 3, class/style ` +
|
|
2277
2270
|
`are now included in $attrs and will no longer fallthrough when ` +
|
|
@@ -2282,75 +2275,75 @@ var Vue = (function () {
|
|
|
2282
2275
|
`them on root via :class="$attrs.class".`,
|
|
2283
2276
|
link: `https://v3-migration.vuejs.org/breaking-changes/attrs-includes-class-style.html`
|
|
2284
2277
|
},
|
|
2285
|
-
["OPTIONS_DATA_FN" /* OPTIONS_DATA_FN */]: {
|
|
2278
|
+
["OPTIONS_DATA_FN" /* DeprecationTypes.OPTIONS_DATA_FN */]: {
|
|
2286
2279
|
message: `The "data" option can no longer be a plain object. ` +
|
|
2287
2280
|
`Always use a function.`,
|
|
2288
2281
|
link: `https://v3-migration.vuejs.org/breaking-changes/data-option.html`
|
|
2289
2282
|
},
|
|
2290
|
-
["OPTIONS_DATA_MERGE" /* OPTIONS_DATA_MERGE */]: {
|
|
2283
|
+
["OPTIONS_DATA_MERGE" /* DeprecationTypes.OPTIONS_DATA_MERGE */]: {
|
|
2291
2284
|
message: (key) => `Detected conflicting key "${key}" when merging data option values. ` +
|
|
2292
2285
|
`In Vue 3, data keys are merged shallowly and will override one another.`,
|
|
2293
2286
|
link: `https://v3-migration.vuejs.org/breaking-changes/data-option.html#mixin-merge-behavior-change`
|
|
2294
2287
|
},
|
|
2295
|
-
["OPTIONS_BEFORE_DESTROY" /* OPTIONS_BEFORE_DESTROY */]: {
|
|
2288
|
+
["OPTIONS_BEFORE_DESTROY" /* DeprecationTypes.OPTIONS_BEFORE_DESTROY */]: {
|
|
2296
2289
|
message: `\`beforeDestroy\` has been renamed to \`beforeUnmount\`.`
|
|
2297
2290
|
},
|
|
2298
|
-
["OPTIONS_DESTROYED" /* OPTIONS_DESTROYED */]: {
|
|
2291
|
+
["OPTIONS_DESTROYED" /* DeprecationTypes.OPTIONS_DESTROYED */]: {
|
|
2299
2292
|
message: `\`destroyed\` has been renamed to \`unmounted\`.`
|
|
2300
2293
|
},
|
|
2301
|
-
["WATCH_ARRAY" /* WATCH_ARRAY */]: {
|
|
2294
|
+
["WATCH_ARRAY" /* DeprecationTypes.WATCH_ARRAY */]: {
|
|
2302
2295
|
message: `"watch" option or vm.$watch on an array value will no longer ` +
|
|
2303
2296
|
`trigger on array mutation unless the "deep" option is specified. ` +
|
|
2304
2297
|
`If current usage is intended, you can disable the compat behavior and ` +
|
|
2305
2298
|
`suppress this warning with:` +
|
|
2306
|
-
`\n\n configureCompat({ ${"WATCH_ARRAY" /* WATCH_ARRAY */}: false })\n`,
|
|
2299
|
+
`\n\n configureCompat({ ${"WATCH_ARRAY" /* DeprecationTypes.WATCH_ARRAY */}: false })\n`,
|
|
2307
2300
|
link: `https://v3-migration.vuejs.org/breaking-changes/watch.html`
|
|
2308
2301
|
},
|
|
2309
|
-
["PROPS_DEFAULT_THIS" /* PROPS_DEFAULT_THIS */]: {
|
|
2302
|
+
["PROPS_DEFAULT_THIS" /* DeprecationTypes.PROPS_DEFAULT_THIS */]: {
|
|
2310
2303
|
message: (key) => `props default value function no longer has access to "this". The compat ` +
|
|
2311
2304
|
`build only offers access to this.$options.` +
|
|
2312
2305
|
`(found in prop "${key}")`,
|
|
2313
2306
|
link: `https://v3-migration.vuejs.org/breaking-changes/props-default-this.html`
|
|
2314
2307
|
},
|
|
2315
|
-
["CUSTOM_DIR" /* CUSTOM_DIR */]: {
|
|
2308
|
+
["CUSTOM_DIR" /* DeprecationTypes.CUSTOM_DIR */]: {
|
|
2316
2309
|
message: (legacyHook, newHook) => `Custom directive hook "${legacyHook}" has been removed. ` +
|
|
2317
2310
|
`Use "${newHook}" instead.`,
|
|
2318
2311
|
link: `https://v3-migration.vuejs.org/breaking-changes/custom-directives.html`
|
|
2319
2312
|
},
|
|
2320
|
-
["V_ON_KEYCODE_MODIFIER" /* V_ON_KEYCODE_MODIFIER */]: {
|
|
2313
|
+
["V_ON_KEYCODE_MODIFIER" /* DeprecationTypes.V_ON_KEYCODE_MODIFIER */]: {
|
|
2321
2314
|
message: `Using keyCode as v-on modifier is no longer supported. ` +
|
|
2322
2315
|
`Use kebab-case key name modifiers instead.`,
|
|
2323
2316
|
link: `https://v3-migration.vuejs.org/breaking-changes/keycode-modifiers.html`
|
|
2324
2317
|
},
|
|
2325
|
-
["ATTR_FALSE_VALUE" /* ATTR_FALSE_VALUE */]: {
|
|
2318
|
+
["ATTR_FALSE_VALUE" /* DeprecationTypes.ATTR_FALSE_VALUE */]: {
|
|
2326
2319
|
message: (name) => `Attribute "${name}" with v-bind value \`false\` will render ` +
|
|
2327
2320
|
`${name}="false" instead of removing it in Vue 3. To remove the attribute, ` +
|
|
2328
2321
|
`use \`null\` or \`undefined\` instead. If the usage is intended, ` +
|
|
2329
2322
|
`you can disable the compat behavior and suppress this warning with:` +
|
|
2330
|
-
`\n\n configureCompat({ ${"ATTR_FALSE_VALUE" /* ATTR_FALSE_VALUE */}: false })\n`,
|
|
2323
|
+
`\n\n configureCompat({ ${"ATTR_FALSE_VALUE" /* DeprecationTypes.ATTR_FALSE_VALUE */}: false })\n`,
|
|
2331
2324
|
link: `https://v3-migration.vuejs.org/breaking-changes/attribute-coercion.html`
|
|
2332
2325
|
},
|
|
2333
|
-
["ATTR_ENUMERATED_COERCION" /* ATTR_ENUMERATED_COERCION */]: {
|
|
2326
|
+
["ATTR_ENUMERATED_COERCION" /* DeprecationTypes.ATTR_ENUMERATED_COERCION */]: {
|
|
2334
2327
|
message: (name, value, coerced) => `Enumerated attribute "${name}" with v-bind value \`${value}\` will ` +
|
|
2335
2328
|
`${value === null ? `be removed` : `render the value as-is`} instead of coercing the value to "${coerced}" in Vue 3. ` +
|
|
2336
2329
|
`Always use explicit "true" or "false" values for enumerated attributes. ` +
|
|
2337
2330
|
`If the usage is intended, ` +
|
|
2338
2331
|
`you can disable the compat behavior and suppress this warning with:` +
|
|
2339
|
-
`\n\n configureCompat({ ${"ATTR_ENUMERATED_COERCION" /* ATTR_ENUMERATED_COERCION */}: false })\n`,
|
|
2332
|
+
`\n\n configureCompat({ ${"ATTR_ENUMERATED_COERCION" /* DeprecationTypes.ATTR_ENUMERATED_COERCION */}: false })\n`,
|
|
2340
2333
|
link: `https://v3-migration.vuejs.org/breaking-changes/attribute-coercion.html`
|
|
2341
2334
|
},
|
|
2342
|
-
["TRANSITION_CLASSES" /* TRANSITION_CLASSES */]: {
|
|
2335
|
+
["TRANSITION_CLASSES" /* DeprecationTypes.TRANSITION_CLASSES */]: {
|
|
2343
2336
|
message: `` // this feature cannot be runtime-detected
|
|
2344
2337
|
},
|
|
2345
|
-
["TRANSITION_GROUP_ROOT" /* TRANSITION_GROUP_ROOT */]: {
|
|
2338
|
+
["TRANSITION_GROUP_ROOT" /* DeprecationTypes.TRANSITION_GROUP_ROOT */]: {
|
|
2346
2339
|
message: `<TransitionGroup> no longer renders a root <span> element by ` +
|
|
2347
2340
|
`default if no "tag" prop is specified. If you do not rely on the span ` +
|
|
2348
2341
|
`for styling, you can disable the compat behavior and suppress this ` +
|
|
2349
2342
|
`warning with:` +
|
|
2350
|
-
`\n\n configureCompat({ ${"TRANSITION_GROUP_ROOT" /* TRANSITION_GROUP_ROOT */}: false })\n`,
|
|
2343
|
+
`\n\n configureCompat({ ${"TRANSITION_GROUP_ROOT" /* DeprecationTypes.TRANSITION_GROUP_ROOT */}: false })\n`,
|
|
2351
2344
|
link: `https://v3-migration.vuejs.org/breaking-changes/transition-group.html`
|
|
2352
2345
|
},
|
|
2353
|
-
["COMPONENT_ASYNC" /* COMPONENT_ASYNC */]: {
|
|
2346
|
+
["COMPONENT_ASYNC" /* DeprecationTypes.COMPONENT_ASYNC */]: {
|
|
2354
2347
|
message: (comp) => {
|
|
2355
2348
|
const name = getComponentName(comp);
|
|
2356
2349
|
return (`Async component${name ? ` <${name}>` : `s`} should be explicitly created via \`defineAsyncComponent()\` ` +
|
|
@@ -2359,11 +2352,11 @@ var Vue = (function () {
|
|
|
2359
2352
|
`usage and intend to use plain functions for functional components, ` +
|
|
2360
2353
|
`you can disable the compat behavior and suppress this ` +
|
|
2361
2354
|
`warning with:` +
|
|
2362
|
-
`\n\n configureCompat({ ${"COMPONENT_ASYNC" /* COMPONENT_ASYNC */}: false })\n`);
|
|
2355
|
+
`\n\n configureCompat({ ${"COMPONENT_ASYNC" /* DeprecationTypes.COMPONENT_ASYNC */}: false })\n`);
|
|
2363
2356
|
},
|
|
2364
2357
|
link: `https://v3-migration.vuejs.org/breaking-changes/async-components.html`
|
|
2365
2358
|
},
|
|
2366
|
-
["COMPONENT_FUNCTIONAL" /* COMPONENT_FUNCTIONAL */]: {
|
|
2359
|
+
["COMPONENT_FUNCTIONAL" /* DeprecationTypes.COMPONENT_FUNCTIONAL */]: {
|
|
2367
2360
|
message: (comp) => {
|
|
2368
2361
|
const name = getComponentName(comp);
|
|
2369
2362
|
return (`Functional component${name ? ` <${name}>` : `s`} should be defined as a plain function in Vue 3. The "functional" ` +
|
|
@@ -2374,10 +2367,10 @@ var Vue = (function () {
|
|
|
2374
2367
|
},
|
|
2375
2368
|
link: `https://v3-migration.vuejs.org/breaking-changes/functional-components.html`
|
|
2376
2369
|
},
|
|
2377
|
-
["COMPONENT_V_MODEL" /* COMPONENT_V_MODEL */]: {
|
|
2370
|
+
["COMPONENT_V_MODEL" /* DeprecationTypes.COMPONENT_V_MODEL */]: {
|
|
2378
2371
|
message: (comp) => {
|
|
2379
2372
|
const configMsg = `opt-in to ` +
|
|
2380
|
-
`Vue 3 behavior on a per-component basis with \`compatConfig: { ${"COMPONENT_V_MODEL" /* COMPONENT_V_MODEL */}: false }\`.`;
|
|
2373
|
+
`Vue 3 behavior on a per-component basis with \`compatConfig: { ${"COMPONENT_V_MODEL" /* DeprecationTypes.COMPONENT_V_MODEL */}: false }\`.`;
|
|
2381
2374
|
if (comp.props &&
|
|
2382
2375
|
(isArray(comp.props)
|
|
2383
2376
|
? comp.props.includes('modelValue')
|
|
@@ -2391,20 +2384,20 @@ var Vue = (function () {
|
|
|
2391
2384
|
},
|
|
2392
2385
|
link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html`
|
|
2393
2386
|
},
|
|
2394
|
-
["RENDER_FUNCTION" /* RENDER_FUNCTION */]: {
|
|
2387
|
+
["RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */]: {
|
|
2395
2388
|
message: `Vue 3's render function API has changed. ` +
|
|
2396
2389
|
`You can opt-in to the new API with:` +
|
|
2397
|
-
`\n\n configureCompat({ ${"RENDER_FUNCTION" /* RENDER_FUNCTION */}: false })\n` +
|
|
2390
|
+
`\n\n configureCompat({ ${"RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */}: false })\n` +
|
|
2398
2391
|
`\n (This can also be done per-component via the "compatConfig" option.)`,
|
|
2399
2392
|
link: `https://v3-migration.vuejs.org/breaking-changes/render-function-api.html`
|
|
2400
2393
|
},
|
|
2401
|
-
["FILTERS" /* FILTERS */]: {
|
|
2394
|
+
["FILTERS" /* DeprecationTypes.FILTERS */]: {
|
|
2402
2395
|
message: `filters have been removed in Vue 3. ` +
|
|
2403
2396
|
`The "|" symbol will be treated as native JavaScript bitwise OR operator. ` +
|
|
2404
2397
|
`Use method calls or computed properties instead.`,
|
|
2405
2398
|
link: `https://v3-migration.vuejs.org/breaking-changes/filters.html`
|
|
2406
2399
|
},
|
|
2407
|
-
["PRIVATE_APIS" /* PRIVATE_APIS */]: {
|
|
2400
|
+
["PRIVATE_APIS" /* DeprecationTypes.PRIVATE_APIS */]: {
|
|
2408
2401
|
message: name => `"${name}" is a Vue 2 private API that no longer exists in Vue 3. ` +
|
|
2409
2402
|
`If you are seeing this warning only due to a dependency, you can ` +
|
|
2410
2403
|
`suppress this warning via { PRIVATE_APIS: 'suppress-warning' }.`
|
|
@@ -2479,8 +2472,8 @@ var Vue = (function () {
|
|
|
2479
2472
|
warnedInvalidKeys[key] = true;
|
|
2480
2473
|
}
|
|
2481
2474
|
}
|
|
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.`);
|
|
2475
|
+
if (instance && config["OPTIONS_DATA_MERGE" /* DeprecationTypes.OPTIONS_DATA_MERGE */] != null) {
|
|
2476
|
+
warn$1(`Deprecation config "${"OPTIONS_DATA_MERGE" /* DeprecationTypes.OPTIONS_DATA_MERGE */}" can only be configured globally.`);
|
|
2484
2477
|
}
|
|
2485
2478
|
}
|
|
2486
2479
|
function getCompatConfigForKey(key, instance) {
|
|
@@ -2555,10 +2548,10 @@ var Vue = (function () {
|
|
|
2555
2548
|
}
|
|
2556
2549
|
else {
|
|
2557
2550
|
if (event.startsWith('hook:')) {
|
|
2558
|
-
assertCompatEnabled("INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */, instance, event);
|
|
2551
|
+
assertCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance, event);
|
|
2559
2552
|
}
|
|
2560
2553
|
else {
|
|
2561
|
-
assertCompatEnabled("INSTANCE_EVENT_EMITTER" /* INSTANCE_EVENT_EMITTER */, instance);
|
|
2554
|
+
assertCompatEnabled("INSTANCE_EVENT_EMITTER" /* DeprecationTypes.INSTANCE_EVENT_EMITTER */, instance);
|
|
2562
2555
|
}
|
|
2563
2556
|
const events = getRegistry(instance);
|
|
2564
2557
|
(events[event] || (events[event] = [])).push(fn);
|
|
@@ -2575,7 +2568,7 @@ var Vue = (function () {
|
|
|
2575
2568
|
return instance.proxy;
|
|
2576
2569
|
}
|
|
2577
2570
|
function off(instance, event, fn) {
|
|
2578
|
-
assertCompatEnabled("INSTANCE_EVENT_EMITTER" /* INSTANCE_EVENT_EMITTER */, instance);
|
|
2571
|
+
assertCompatEnabled("INSTANCE_EVENT_EMITTER" /* DeprecationTypes.INSTANCE_EVENT_EMITTER */, instance);
|
|
2579
2572
|
const vm = instance.proxy;
|
|
2580
2573
|
// all
|
|
2581
2574
|
if (!event) {
|
|
@@ -2603,7 +2596,7 @@ var Vue = (function () {
|
|
|
2603
2596
|
function emit$1(instance, event, args) {
|
|
2604
2597
|
const cbs = getRegistry(instance)[event];
|
|
2605
2598
|
if (cbs) {
|
|
2606
|
-
callWithAsyncErrorHandling(cbs.map(cb => cb.bind(instance.proxy)), instance, 6 /* COMPONENT_EVENT_HANDLER */, args);
|
|
2599
|
+
callWithAsyncErrorHandling(cbs.map(cb => cb.bind(instance.proxy)), instance, 6 /* ErrorCodes.COMPONENT_EVENT_HANDLER */, args);
|
|
2607
2600
|
}
|
|
2608
2601
|
return instance.proxy;
|
|
2609
2602
|
}
|
|
@@ -2613,8 +2606,8 @@ var Vue = (function () {
|
|
|
2613
2606
|
function convertLegacyVModelProps(vnode) {
|
|
2614
2607
|
const { type, shapeFlag, props, dynamicProps } = vnode;
|
|
2615
2608
|
const comp = type;
|
|
2616
|
-
if (shapeFlag & 6 /* COMPONENT */ && props && 'modelValue' in props) {
|
|
2617
|
-
if (!isCompatEnabled("COMPONENT_V_MODEL" /* COMPONENT_V_MODEL */,
|
|
2609
|
+
if (shapeFlag & 6 /* ShapeFlags.COMPONENT */ && props && 'modelValue' in props) {
|
|
2610
|
+
if (!isCompatEnabled("COMPONENT_V_MODEL" /* DeprecationTypes.COMPONENT_V_MODEL */,
|
|
2618
2611
|
// this is a special case where we want to use the vnode component's
|
|
2619
2612
|
// compat config instead of the current rendering instance (which is the
|
|
2620
2613
|
// parent of the component that exposes v-model)
|
|
@@ -2623,7 +2616,7 @@ var Vue = (function () {
|
|
|
2623
2616
|
}
|
|
2624
2617
|
if (!warnedTypes.has(comp)) {
|
|
2625
2618
|
pushWarningContext(vnode);
|
|
2626
|
-
warnDeprecation("COMPONENT_V_MODEL" /* COMPONENT_V_MODEL */, { type }, comp);
|
|
2619
|
+
warnDeprecation("COMPONENT_V_MODEL" /* DeprecationTypes.COMPONENT_V_MODEL */, { type }, comp);
|
|
2627
2620
|
popWarningContext();
|
|
2628
2621
|
warnedTypes.add(comp);
|
|
2629
2622
|
}
|
|
@@ -2656,13 +2649,13 @@ var Vue = (function () {
|
|
|
2656
2649
|
}
|
|
2657
2650
|
}
|
|
2658
2651
|
function compatModelEmit(instance, event, args) {
|
|
2659
|
-
if (!isCompatEnabled("COMPONENT_V_MODEL" /* COMPONENT_V_MODEL */, instance)) {
|
|
2652
|
+
if (!isCompatEnabled("COMPONENT_V_MODEL" /* DeprecationTypes.COMPONENT_V_MODEL */, instance)) {
|
|
2660
2653
|
return;
|
|
2661
2654
|
}
|
|
2662
2655
|
const props = instance.vnode.props;
|
|
2663
2656
|
const modelHandler = props && props[compatModelEventPrefix + event];
|
|
2664
2657
|
if (modelHandler) {
|
|
2665
|
-
callWithErrorHandling(modelHandler, instance, 6 /* COMPONENT_EVENT_HANDLER */, args);
|
|
2658
|
+
callWithErrorHandling(modelHandler, instance, 6 /* ErrorCodes.COMPONENT_EVENT_HANDLER */, args);
|
|
2666
2659
|
}
|
|
2667
2660
|
}
|
|
2668
2661
|
|
|
@@ -2729,7 +2722,7 @@ var Vue = (function () {
|
|
|
2729
2722
|
handler = props[(handlerName = toHandlerKey(hyphenate(event)))];
|
|
2730
2723
|
}
|
|
2731
2724
|
if (handler) {
|
|
2732
|
-
callWithAsyncErrorHandling(handler, instance, 6 /* COMPONENT_EVENT_HANDLER */, args);
|
|
2725
|
+
callWithAsyncErrorHandling(handler, instance, 6 /* ErrorCodes.COMPONENT_EVENT_HANDLER */, args);
|
|
2733
2726
|
}
|
|
2734
2727
|
const onceHandler = props[handlerName + `Once`];
|
|
2735
2728
|
if (onceHandler) {
|
|
@@ -2740,7 +2733,7 @@ var Vue = (function () {
|
|
|
2740
2733
|
return;
|
|
2741
2734
|
}
|
|
2742
2735
|
instance.emitted[handlerName] = true;
|
|
2743
|
-
callWithAsyncErrorHandling(onceHandler, instance, 6 /* COMPONENT_EVENT_HANDLER */, args);
|
|
2736
|
+
callWithAsyncErrorHandling(onceHandler, instance, 6 /* ErrorCodes.COMPONENT_EVENT_HANDLER */, args);
|
|
2744
2737
|
}
|
|
2745
2738
|
{
|
|
2746
2739
|
compatModelEmit(instance, event, args);
|
|
@@ -2776,7 +2769,9 @@ var Vue = (function () {
|
|
|
2776
2769
|
}
|
|
2777
2770
|
}
|
|
2778
2771
|
if (!raw && !hasExtends) {
|
|
2779
|
-
|
|
2772
|
+
if (isObject(comp)) {
|
|
2773
|
+
cache.set(comp, null);
|
|
2774
|
+
}
|
|
2780
2775
|
return null;
|
|
2781
2776
|
}
|
|
2782
2777
|
if (isArray(raw)) {
|
|
@@ -2785,7 +2780,9 @@ var Vue = (function () {
|
|
|
2785
2780
|
else {
|
|
2786
2781
|
extend(normalized, raw);
|
|
2787
2782
|
}
|
|
2788
|
-
|
|
2783
|
+
if (isObject(comp)) {
|
|
2784
|
+
cache.set(comp, normalized);
|
|
2785
|
+
}
|
|
2789
2786
|
return normalized;
|
|
2790
2787
|
}
|
|
2791
2788
|
// Check if an incoming prop key is a declared emit event listener.
|
|
@@ -2915,7 +2912,7 @@ var Vue = (function () {
|
|
|
2915
2912
|
accessedAttrs = false;
|
|
2916
2913
|
}
|
|
2917
2914
|
try {
|
|
2918
|
-
if (vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */) {
|
|
2915
|
+
if (vnode.shapeFlag & 4 /* ShapeFlags.STATEFUL_COMPONENT */) {
|
|
2919
2916
|
// withProxy is a proxy with a different `has` trap only for
|
|
2920
2917
|
// runtime-compiled render functions using `with` block.
|
|
2921
2918
|
const proxyToUse = withProxy || proxy;
|
|
@@ -2948,7 +2945,7 @@ var Vue = (function () {
|
|
|
2948
2945
|
}
|
|
2949
2946
|
catch (err) {
|
|
2950
2947
|
blockStack.length = 0;
|
|
2951
|
-
handleError(err, instance, 1 /* RENDER_FUNCTION */);
|
|
2948
|
+
handleError(err, instance, 1 /* ErrorCodes.RENDER_FUNCTION */);
|
|
2952
2949
|
result = createVNode(Comment);
|
|
2953
2950
|
}
|
|
2954
2951
|
// attr merging
|
|
@@ -2957,14 +2954,14 @@ var Vue = (function () {
|
|
|
2957
2954
|
let root = result;
|
|
2958
2955
|
let setRoot = undefined;
|
|
2959
2956
|
if (result.patchFlag > 0 &&
|
|
2960
|
-
result.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */) {
|
|
2957
|
+
result.patchFlag & 2048 /* PatchFlags.DEV_ROOT_FRAGMENT */) {
|
|
2961
2958
|
[root, setRoot] = getChildRoot(result);
|
|
2962
2959
|
}
|
|
2963
2960
|
if (fallthroughAttrs && inheritAttrs !== false) {
|
|
2964
2961
|
const keys = Object.keys(fallthroughAttrs);
|
|
2965
2962
|
const { shapeFlag } = root;
|
|
2966
2963
|
if (keys.length) {
|
|
2967
|
-
if (shapeFlag & (1 /* ELEMENT */ | 6 /* COMPONENT */)) {
|
|
2964
|
+
if (shapeFlag & (1 /* ShapeFlags.ELEMENT */ | 6 /* ShapeFlags.COMPONENT */)) {
|
|
2968
2965
|
if (propsOptions && keys.some(isModelListener)) {
|
|
2969
2966
|
// If a v-model listener (onUpdate:xxx) has a corresponding declared
|
|
2970
2967
|
// prop, it indicates this component expects to handle v-model and
|
|
@@ -3009,13 +3006,13 @@ var Vue = (function () {
|
|
|
3009
3006
|
}
|
|
3010
3007
|
}
|
|
3011
3008
|
}
|
|
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 */)) {
|
|
3009
|
+
if (isCompatEnabled("INSTANCE_ATTRS_CLASS_STYLE" /* DeprecationTypes.INSTANCE_ATTRS_CLASS_STYLE */, instance) &&
|
|
3010
|
+
vnode.shapeFlag & 4 /* ShapeFlags.STATEFUL_COMPONENT */ &&
|
|
3011
|
+
root.shapeFlag & (1 /* ShapeFlags.ELEMENT */ | 6 /* ShapeFlags.COMPONENT */)) {
|
|
3015
3012
|
const { class: cls, style } = vnode.props || {};
|
|
3016
3013
|
if (cls || style) {
|
|
3017
3014
|
if (inheritAttrs === false) {
|
|
3018
|
-
warnDeprecation("INSTANCE_ATTRS_CLASS_STYLE" /* INSTANCE_ATTRS_CLASS_STYLE */, instance, getComponentName(instance.type));
|
|
3015
|
+
warnDeprecation("INSTANCE_ATTRS_CLASS_STYLE" /* DeprecationTypes.INSTANCE_ATTRS_CLASS_STYLE */, instance, getComponentName(instance.type));
|
|
3019
3016
|
}
|
|
3020
3017
|
root = cloneVNode(root, {
|
|
3021
3018
|
class: cls,
|
|
@@ -3119,7 +3116,7 @@ var Vue = (function () {
|
|
|
3119
3116
|
return res;
|
|
3120
3117
|
};
|
|
3121
3118
|
const isElementRoot = (vnode) => {
|
|
3122
|
-
return (vnode.shapeFlag & (6 /* COMPONENT */ | 1 /* ELEMENT */) ||
|
|
3119
|
+
return (vnode.shapeFlag & (6 /* ShapeFlags.COMPONENT */ | 1 /* ShapeFlags.ELEMENT */) ||
|
|
3123
3120
|
vnode.type === Comment // potential v-if branch switch
|
|
3124
3121
|
);
|
|
3125
3122
|
};
|
|
@@ -3138,19 +3135,19 @@ var Vue = (function () {
|
|
|
3138
3135
|
return true;
|
|
3139
3136
|
}
|
|
3140
3137
|
if (optimized && patchFlag >= 0) {
|
|
3141
|
-
if (patchFlag & 1024 /* DYNAMIC_SLOTS */) {
|
|
3138
|
+
if (patchFlag & 1024 /* PatchFlags.DYNAMIC_SLOTS */) {
|
|
3142
3139
|
// slot content that references values that might have changed,
|
|
3143
3140
|
// e.g. in a v-for
|
|
3144
3141
|
return true;
|
|
3145
3142
|
}
|
|
3146
|
-
if (patchFlag & 16 /* FULL_PROPS */) {
|
|
3143
|
+
if (patchFlag & 16 /* PatchFlags.FULL_PROPS */) {
|
|
3147
3144
|
if (!prevProps) {
|
|
3148
3145
|
return !!nextProps;
|
|
3149
3146
|
}
|
|
3150
3147
|
// presence of this flag indicates props are always non-null
|
|
3151
3148
|
return hasPropsChanged(prevProps, nextProps, emits);
|
|
3152
3149
|
}
|
|
3153
|
-
else if (patchFlag & 8 /* PROPS */) {
|
|
3150
|
+
else if (patchFlag & 8 /* PatchFlags.PROPS */) {
|
|
3154
3151
|
const dynamicProps = nextVNode.dynamicProps;
|
|
3155
3152
|
for (let i = 0; i < dynamicProps.length; i++) {
|
|
3156
3153
|
const key = dynamicProps[i];
|
|
@@ -3408,7 +3405,7 @@ var Vue = (function () {
|
|
|
3408
3405
|
if (delayEnter) {
|
|
3409
3406
|
activeBranch.transition.afterLeave = () => {
|
|
3410
3407
|
if (pendingId === suspense.pendingId) {
|
|
3411
|
-
move(pendingBranch, container, anchor, 0 /* ENTER */);
|
|
3408
|
+
move(pendingBranch, container, anchor, 0 /* MoveType.ENTER */);
|
|
3412
3409
|
}
|
|
3413
3410
|
};
|
|
3414
3411
|
}
|
|
@@ -3423,7 +3420,7 @@ var Vue = (function () {
|
|
|
3423
3420
|
}
|
|
3424
3421
|
if (!delayEnter) {
|
|
3425
3422
|
// move content from off-dom container to actual container
|
|
3426
|
-
move(pendingBranch, container, anchor, 0 /* ENTER */);
|
|
3423
|
+
move(pendingBranch, container, anchor, 0 /* MoveType.ENTER */);
|
|
3427
3424
|
}
|
|
3428
3425
|
}
|
|
3429
3426
|
setActiveBranch(suspense, pendingBranch);
|
|
@@ -3497,7 +3494,7 @@ var Vue = (function () {
|
|
|
3497
3494
|
const hydratedEl = instance.vnode.el;
|
|
3498
3495
|
instance
|
|
3499
3496
|
.asyncDep.catch(err => {
|
|
3500
|
-
handleError(err, instance, 0 /* SETUP_FUNCTION */);
|
|
3497
|
+
handleError(err, instance, 0 /* ErrorCodes.SETUP_FUNCTION */);
|
|
3501
3498
|
})
|
|
3502
3499
|
.then(asyncSetupResult => {
|
|
3503
3500
|
// retry when the setup() promise resolves.
|
|
@@ -3571,7 +3568,7 @@ var Vue = (function () {
|
|
|
3571
3568
|
}
|
|
3572
3569
|
function normalizeSuspenseChildren(vnode) {
|
|
3573
3570
|
const { shapeFlag, children } = vnode;
|
|
3574
|
-
const isSlotChildren = shapeFlag & 32 /* SLOTS_CHILDREN */;
|
|
3571
|
+
const isSlotChildren = shapeFlag & 32 /* ShapeFlags.SLOTS_CHILDREN */;
|
|
3575
3572
|
vnode.ssContent = normalizeSuspenseSlot(isSlotChildren ? children.default : children);
|
|
3576
3573
|
vnode.ssFallback = isSlotChildren
|
|
3577
3574
|
? normalizeSuspenseSlot(children.fallback)
|
|
@@ -3742,7 +3739,7 @@ var Vue = (function () {
|
|
|
3742
3739
|
return traverse(s);
|
|
3743
3740
|
}
|
|
3744
3741
|
else if (isFunction(s)) {
|
|
3745
|
-
return callWithErrorHandling(s, instance, 2 /* WATCH_GETTER */);
|
|
3742
|
+
return callWithErrorHandling(s, instance, 2 /* ErrorCodes.WATCH_GETTER */);
|
|
3746
3743
|
}
|
|
3747
3744
|
else {
|
|
3748
3745
|
warnInvalidSource(s);
|
|
@@ -3752,7 +3749,7 @@ var Vue = (function () {
|
|
|
3752
3749
|
else if (isFunction(source)) {
|
|
3753
3750
|
if (cb) {
|
|
3754
3751
|
// getter with cb
|
|
3755
|
-
getter = () => callWithErrorHandling(source, instance, 2 /* WATCH_GETTER */);
|
|
3752
|
+
getter = () => callWithErrorHandling(source, instance, 2 /* ErrorCodes.WATCH_GETTER */);
|
|
3756
3753
|
}
|
|
3757
3754
|
else {
|
|
3758
3755
|
// no cb -> simple effect
|
|
@@ -3763,7 +3760,7 @@ var Vue = (function () {
|
|
|
3763
3760
|
if (cleanup) {
|
|
3764
3761
|
cleanup();
|
|
3765
3762
|
}
|
|
3766
|
-
return callWithAsyncErrorHandling(source, instance, 3 /* WATCH_CALLBACK */, [onCleanup]);
|
|
3763
|
+
return callWithAsyncErrorHandling(source, instance, 3 /* ErrorCodes.WATCH_CALLBACK */, [onCleanup]);
|
|
3767
3764
|
};
|
|
3768
3765
|
}
|
|
3769
3766
|
}
|
|
@@ -3777,7 +3774,7 @@ var Vue = (function () {
|
|
|
3777
3774
|
getter = () => {
|
|
3778
3775
|
const val = baseGetter();
|
|
3779
3776
|
if (isArray(val) &&
|
|
3780
|
-
checkCompatEnabled("WATCH_ARRAY" /* WATCH_ARRAY */, instance)) {
|
|
3777
|
+
checkCompatEnabled("WATCH_ARRAY" /* DeprecationTypes.WATCH_ARRAY */, instance)) {
|
|
3781
3778
|
traverse(val);
|
|
3782
3779
|
}
|
|
3783
3780
|
return val;
|
|
@@ -3790,7 +3787,7 @@ var Vue = (function () {
|
|
|
3790
3787
|
let cleanup;
|
|
3791
3788
|
let onCleanup = (fn) => {
|
|
3792
3789
|
cleanup = effect.onStop = () => {
|
|
3793
|
-
callWithErrorHandling(fn, instance, 4 /* WATCH_CLEANUP */);
|
|
3790
|
+
callWithErrorHandling(fn, instance, 4 /* ErrorCodes.WATCH_CLEANUP */);
|
|
3794
3791
|
};
|
|
3795
3792
|
};
|
|
3796
3793
|
let oldValue = isMultiSource ? [] : INITIAL_WATCHER_VALUE;
|
|
@@ -3807,12 +3804,12 @@ var Vue = (function () {
|
|
|
3807
3804
|
? newValue.some((v, i) => hasChanged(v, oldValue[i]))
|
|
3808
3805
|
: hasChanged(newValue, oldValue)) ||
|
|
3809
3806
|
(isArray(newValue) &&
|
|
3810
|
-
isCompatEnabled("WATCH_ARRAY" /* WATCH_ARRAY */, instance))) {
|
|
3807
|
+
isCompatEnabled("WATCH_ARRAY" /* DeprecationTypes.WATCH_ARRAY */, instance))) {
|
|
3811
3808
|
// cleanup before running cb again
|
|
3812
3809
|
if (cleanup) {
|
|
3813
3810
|
cleanup();
|
|
3814
3811
|
}
|
|
3815
|
-
callWithAsyncErrorHandling(cb, instance, 3 /* WATCH_CALLBACK */, [
|
|
3812
|
+
callWithAsyncErrorHandling(cb, instance, 3 /* ErrorCodes.WATCH_CALLBACK */, [
|
|
3816
3813
|
newValue,
|
|
3817
3814
|
// pass undefined as the old value when it's changed for the first time
|
|
3818
3815
|
oldValue === INITIAL_WATCHER_VALUE ? undefined : oldValue,
|
|
@@ -3838,7 +3835,10 @@ var Vue = (function () {
|
|
|
3838
3835
|
}
|
|
3839
3836
|
else {
|
|
3840
3837
|
// default: 'pre'
|
|
3841
|
-
|
|
3838
|
+
job.pre = true;
|
|
3839
|
+
if (instance)
|
|
3840
|
+
job.id = instance.uid;
|
|
3841
|
+
scheduler = () => queueJob(job);
|
|
3842
3842
|
}
|
|
3843
3843
|
const effect = new ReactiveEffect(getter, scheduler);
|
|
3844
3844
|
{
|
|
@@ -3905,7 +3905,7 @@ var Vue = (function () {
|
|
|
3905
3905
|
};
|
|
3906
3906
|
}
|
|
3907
3907
|
function traverse(value, seen) {
|
|
3908
|
-
if (!isObject(value) || value["__v_skip" /* SKIP */]) {
|
|
3908
|
+
if (!isObject(value) || value["__v_skip" /* ReactiveFlags.SKIP */]) {
|
|
3909
3909
|
return value;
|
|
3910
3910
|
}
|
|
3911
3911
|
seen = seen || new Set();
|
|
@@ -4092,7 +4092,7 @@ var Vue = (function () {
|
|
|
4092
4092
|
const leavingVNodesCache = getLeavingNodesForType(state, vnode);
|
|
4093
4093
|
const callHook = (hook, args) => {
|
|
4094
4094
|
hook &&
|
|
4095
|
-
callWithAsyncErrorHandling(hook, instance, 9 /* TRANSITION_HOOK */, args);
|
|
4095
|
+
callWithAsyncErrorHandling(hook, instance, 9 /* ErrorCodes.TRANSITION_HOOK */, args);
|
|
4096
4096
|
};
|
|
4097
4097
|
const callAsyncHook = (hook, args) => {
|
|
4098
4098
|
const done = args[1];
|
|
@@ -4228,10 +4228,10 @@ var Vue = (function () {
|
|
|
4228
4228
|
: vnode;
|
|
4229
4229
|
}
|
|
4230
4230
|
function setTransitionHooks(vnode, hooks) {
|
|
4231
|
-
if (vnode.shapeFlag & 6 /* COMPONENT */ && vnode.component) {
|
|
4231
|
+
if (vnode.shapeFlag & 6 /* ShapeFlags.COMPONENT */ && vnode.component) {
|
|
4232
4232
|
setTransitionHooks(vnode.component.subTree, hooks);
|
|
4233
4233
|
}
|
|
4234
|
-
else if (vnode.shapeFlag & 128 /* SUSPENSE */) {
|
|
4234
|
+
else if (vnode.shapeFlag & 128 /* ShapeFlags.SUSPENSE */) {
|
|
4235
4235
|
vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
4236
4236
|
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
4237
4237
|
}
|
|
@@ -4250,7 +4250,7 @@ var Vue = (function () {
|
|
|
4250
4250
|
: String(parentKey) + String(child.key != null ? child.key : i);
|
|
4251
4251
|
// handle fragment children case, e.g. v-for
|
|
4252
4252
|
if (child.type === Fragment) {
|
|
4253
|
-
if (child.patchFlag & 128 /* KEYED_FRAGMENT */)
|
|
4253
|
+
if (child.patchFlag & 128 /* PatchFlags.KEYED_FRAGMENT */)
|
|
4254
4254
|
keyedFragmentCount++;
|
|
4255
4255
|
ret = ret.concat(getTransitionRawChildren(child.children, keepComment, key));
|
|
4256
4256
|
}
|
|
@@ -4265,7 +4265,7 @@ var Vue = (function () {
|
|
|
4265
4265
|
// these children to force full diffs to ensure correct behavior.
|
|
4266
4266
|
if (keyedFragmentCount > 1) {
|
|
4267
4267
|
for (let i = 0; i < ret.length; i++) {
|
|
4268
|
-
ret[i].patchFlag = -2 /* BAIL */;
|
|
4268
|
+
ret[i].patchFlag = -2 /* PatchFlags.BAIL */;
|
|
4269
4269
|
}
|
|
4270
4270
|
}
|
|
4271
4271
|
return ret;
|
|
@@ -4343,7 +4343,7 @@ var Vue = (function () {
|
|
|
4343
4343
|
}
|
|
4344
4344
|
const onError = (err) => {
|
|
4345
4345
|
pendingRequest = null;
|
|
4346
|
-
handleError(err, instance, 13 /* ASYNC_COMPONENT_LOADER */, !errorComponent /* do not throw in dev if user provided error component */);
|
|
4346
|
+
handleError(err, instance, 13 /* ErrorCodes.ASYNC_COMPONENT_LOADER */, !errorComponent /* do not throw in dev if user provided error component */);
|
|
4347
4347
|
};
|
|
4348
4348
|
// suspense-controlled or SSR.
|
|
4349
4349
|
if ((suspensible && instance.suspense) ||
|
|
@@ -4445,7 +4445,7 @@ var Vue = (function () {
|
|
|
4445
4445
|
const storageContainer = createElement('div');
|
|
4446
4446
|
sharedContext.activate = (vnode, container, anchor, isSVG, optimized) => {
|
|
4447
4447
|
const instance = vnode.component;
|
|
4448
|
-
move(vnode, container, anchor, 0 /* ENTER */, parentSuspense);
|
|
4448
|
+
move(vnode, container, anchor, 0 /* MoveType.ENTER */, parentSuspense);
|
|
4449
4449
|
// in case props have changed
|
|
4450
4450
|
patch(instance.vnode, vnode, container, anchor, instance, parentSuspense, isSVG, vnode.slotScopeIds, optimized);
|
|
4451
4451
|
queuePostRenderEffect(() => {
|
|
@@ -4465,7 +4465,7 @@ var Vue = (function () {
|
|
|
4465
4465
|
};
|
|
4466
4466
|
sharedContext.deactivate = (vnode) => {
|
|
4467
4467
|
const instance = vnode.component;
|
|
4468
|
-
move(vnode, storageContainer, null, 1 /* LEAVE */, parentSuspense);
|
|
4468
|
+
move(vnode, storageContainer, null, 1 /* MoveType.LEAVE */, parentSuspense);
|
|
4469
4469
|
queuePostRenderEffect(() => {
|
|
4470
4470
|
if (instance.da) {
|
|
4471
4471
|
invokeArrayFns(instance.da);
|
|
@@ -4554,8 +4554,8 @@ var Vue = (function () {
|
|
|
4554
4554
|
return children;
|
|
4555
4555
|
}
|
|
4556
4556
|
else if (!isVNode(rawVNode) ||
|
|
4557
|
-
(!(rawVNode.shapeFlag & 4 /* STATEFUL_COMPONENT */) &&
|
|
4558
|
-
!(rawVNode.shapeFlag & 128 /* SUSPENSE */))) {
|
|
4557
|
+
(!(rawVNode.shapeFlag & 4 /* ShapeFlags.STATEFUL_COMPONENT */) &&
|
|
4558
|
+
!(rawVNode.shapeFlag & 128 /* ShapeFlags.SUSPENSE */))) {
|
|
4559
4559
|
current = null;
|
|
4560
4560
|
return rawVNode;
|
|
4561
4561
|
}
|
|
@@ -4577,7 +4577,7 @@ var Vue = (function () {
|
|
|
4577
4577
|
// clone vnode if it's reused because we are going to mutate it
|
|
4578
4578
|
if (vnode.el) {
|
|
4579
4579
|
vnode = cloneVNode(vnode);
|
|
4580
|
-
if (rawVNode.shapeFlag & 128 /* SUSPENSE */) {
|
|
4580
|
+
if (rawVNode.shapeFlag & 128 /* ShapeFlags.SUSPENSE */) {
|
|
4581
4581
|
rawVNode.ssContent = vnode;
|
|
4582
4582
|
}
|
|
4583
4583
|
}
|
|
@@ -4596,7 +4596,7 @@ var Vue = (function () {
|
|
|
4596
4596
|
setTransitionHooks(vnode, vnode.transition);
|
|
4597
4597
|
}
|
|
4598
4598
|
// avoid vnode being mounted as fresh
|
|
4599
|
-
vnode.shapeFlag |= 512 /* COMPONENT_KEPT_ALIVE */;
|
|
4599
|
+
vnode.shapeFlag |= 512 /* ShapeFlags.COMPONENT_KEPT_ALIVE */;
|
|
4600
4600
|
// make this key the freshest
|
|
4601
4601
|
keys.delete(key);
|
|
4602
4602
|
keys.add(key);
|
|
@@ -4609,7 +4609,7 @@ var Vue = (function () {
|
|
|
4609
4609
|
}
|
|
4610
4610
|
}
|
|
4611
4611
|
// avoid vnode being unmounted
|
|
4612
|
-
vnode.shapeFlag |= 256 /* COMPONENT_SHOULD_KEEP_ALIVE */;
|
|
4612
|
+
vnode.shapeFlag |= 256 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */;
|
|
4613
4613
|
current = vnode;
|
|
4614
4614
|
return isSuspense(rawVNode.type) ? rawVNode : vnode;
|
|
4615
4615
|
};
|
|
@@ -4635,10 +4635,10 @@ var Vue = (function () {
|
|
|
4635
4635
|
return false;
|
|
4636
4636
|
}
|
|
4637
4637
|
function onActivated(hook, target) {
|
|
4638
|
-
registerKeepAliveHook(hook, "a" /* ACTIVATED */, target);
|
|
4638
|
+
registerKeepAliveHook(hook, "a" /* LifecycleHooks.ACTIVATED */, target);
|
|
4639
4639
|
}
|
|
4640
4640
|
function onDeactivated(hook, target) {
|
|
4641
|
-
registerKeepAliveHook(hook, "da" /* DEACTIVATED */, target);
|
|
4641
|
+
registerKeepAliveHook(hook, "da" /* LifecycleHooks.DEACTIVATED */, target);
|
|
4642
4642
|
}
|
|
4643
4643
|
function registerKeepAliveHook(hook, type, target = currentInstance) {
|
|
4644
4644
|
// cache the deactivate branch check wrapper for injected hooks so the same
|
|
@@ -4682,16 +4682,16 @@ var Vue = (function () {
|
|
|
4682
4682
|
}
|
|
4683
4683
|
function resetShapeFlag(vnode) {
|
|
4684
4684
|
let shapeFlag = vnode.shapeFlag;
|
|
4685
|
-
if (shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */) {
|
|
4686
|
-
shapeFlag -= 256 /* COMPONENT_SHOULD_KEEP_ALIVE */;
|
|
4685
|
+
if (shapeFlag & 256 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */) {
|
|
4686
|
+
shapeFlag -= 256 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */;
|
|
4687
4687
|
}
|
|
4688
|
-
if (shapeFlag & 512 /* COMPONENT_KEPT_ALIVE */) {
|
|
4689
|
-
shapeFlag -= 512 /* COMPONENT_KEPT_ALIVE */;
|
|
4688
|
+
if (shapeFlag & 512 /* ShapeFlags.COMPONENT_KEPT_ALIVE */) {
|
|
4689
|
+
shapeFlag -= 512 /* ShapeFlags.COMPONENT_KEPT_ALIVE */;
|
|
4690
4690
|
}
|
|
4691
4691
|
vnode.shapeFlag = shapeFlag;
|
|
4692
4692
|
}
|
|
4693
4693
|
function getInnerChild(vnode) {
|
|
4694
|
-
return vnode.shapeFlag & 128 /* SUSPENSE */ ? vnode.ssContent : vnode;
|
|
4694
|
+
return vnode.shapeFlag & 128 /* ShapeFlags.SUSPENSE */ ? vnode.ssContent : vnode;
|
|
4695
4695
|
}
|
|
4696
4696
|
|
|
4697
4697
|
function injectHook(type, hook, target = currentInstance, prepend = false) {
|
|
@@ -4737,23 +4737,23 @@ var Vue = (function () {
|
|
|
4737
4737
|
}
|
|
4738
4738
|
const createHook = (lifecycle) => (hook, target = currentInstance) =>
|
|
4739
4739
|
// post-create lifecycle registrations are noops during SSR (except for serverPrefetch)
|
|
4740
|
-
(!isInSSRComponentSetup || lifecycle === "sp" /* SERVER_PREFETCH */) &&
|
|
4740
|
+
(!isInSSRComponentSetup || lifecycle === "sp" /* LifecycleHooks.SERVER_PREFETCH */) &&
|
|
4741
4741
|
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 */);
|
|
4742
|
+
const onBeforeMount = createHook("bm" /* LifecycleHooks.BEFORE_MOUNT */);
|
|
4743
|
+
const onMounted = createHook("m" /* LifecycleHooks.MOUNTED */);
|
|
4744
|
+
const onBeforeUpdate = createHook("bu" /* LifecycleHooks.BEFORE_UPDATE */);
|
|
4745
|
+
const onUpdated = createHook("u" /* LifecycleHooks.UPDATED */);
|
|
4746
|
+
const onBeforeUnmount = createHook("bum" /* LifecycleHooks.BEFORE_UNMOUNT */);
|
|
4747
|
+
const onUnmounted = createHook("um" /* LifecycleHooks.UNMOUNTED */);
|
|
4748
|
+
const onServerPrefetch = createHook("sp" /* LifecycleHooks.SERVER_PREFETCH */);
|
|
4749
|
+
const onRenderTriggered = createHook("rtg" /* LifecycleHooks.RENDER_TRIGGERED */);
|
|
4750
|
+
const onRenderTracked = createHook("rtc" /* LifecycleHooks.RENDER_TRACKED */);
|
|
4751
4751
|
function onErrorCaptured(hook, target = currentInstance) {
|
|
4752
|
-
injectHook("ec" /* ERROR_CAPTURED */, hook, target);
|
|
4752
|
+
injectHook("ec" /* LifecycleHooks.ERROR_CAPTURED */, hook, target);
|
|
4753
4753
|
}
|
|
4754
4754
|
|
|
4755
4755
|
function getCompatChildren(instance) {
|
|
4756
|
-
assertCompatEnabled("INSTANCE_CHILDREN" /* INSTANCE_CHILDREN */, instance);
|
|
4756
|
+
assertCompatEnabled("INSTANCE_CHILDREN" /* DeprecationTypes.INSTANCE_CHILDREN */, instance);
|
|
4757
4757
|
const root = instance.subTree;
|
|
4758
4758
|
const children = [];
|
|
4759
4759
|
if (root) {
|
|
@@ -4765,7 +4765,7 @@ var Vue = (function () {
|
|
|
4765
4765
|
if (vnode.component) {
|
|
4766
4766
|
children.push(vnode.component.proxy);
|
|
4767
4767
|
}
|
|
4768
|
-
else if (vnode.shapeFlag & 16 /* ARRAY_CHILDREN */) {
|
|
4768
|
+
else if (vnode.shapeFlag & 16 /* ShapeFlags.ARRAY_CHILDREN */) {
|
|
4769
4769
|
const vnodes = vnode.children;
|
|
4770
4770
|
for (let i = 0; i < vnodes.length; i++) {
|
|
4771
4771
|
walk(vnodes[i], children);
|
|
@@ -4774,7 +4774,7 @@ var Vue = (function () {
|
|
|
4774
4774
|
}
|
|
4775
4775
|
|
|
4776
4776
|
function getCompatListeners(instance) {
|
|
4777
|
-
assertCompatEnabled("INSTANCE_LISTENERS" /* INSTANCE_LISTENERS */, instance);
|
|
4777
|
+
assertCompatEnabled("INSTANCE_LISTENERS" /* DeprecationTypes.INSTANCE_LISTENERS */, instance);
|
|
4778
4778
|
const listeners = {};
|
|
4779
4779
|
const rawProps = instance.vnode.props;
|
|
4780
4780
|
if (!rawProps) {
|
|
@@ -4802,7 +4802,7 @@ var Vue = (function () {
|
|
|
4802
4802
|
mappedName.forEach(mapped => {
|
|
4803
4803
|
const mappedHook = dir[mapped];
|
|
4804
4804
|
if (mappedHook) {
|
|
4805
|
-
softAssertCompatEnabled("CUSTOM_DIR" /* CUSTOM_DIR */, instance, mapped, name);
|
|
4805
|
+
softAssertCompatEnabled("CUSTOM_DIR" /* DeprecationTypes.CUSTOM_DIR */, instance, mapped, name);
|
|
4806
4806
|
hook.push(mappedHook);
|
|
4807
4807
|
}
|
|
4808
4808
|
});
|
|
@@ -4810,7 +4810,7 @@ var Vue = (function () {
|
|
|
4810
4810
|
}
|
|
4811
4811
|
else {
|
|
4812
4812
|
if (dir[mappedName]) {
|
|
4813
|
-
softAssertCompatEnabled("CUSTOM_DIR" /* CUSTOM_DIR */, instance, mappedName, name);
|
|
4813
|
+
softAssertCompatEnabled("CUSTOM_DIR" /* DeprecationTypes.CUSTOM_DIR */, instance, mappedName, name);
|
|
4814
4814
|
}
|
|
4815
4815
|
return dir[mappedName];
|
|
4816
4816
|
}
|
|
@@ -4884,7 +4884,7 @@ var Vue = (function () {
|
|
|
4884
4884
|
// disable tracking inside all lifecycle hooks
|
|
4885
4885
|
// since they can potentially be called inside effects.
|
|
4886
4886
|
pauseTracking();
|
|
4887
|
-
callWithAsyncErrorHandling(hook, instance, 8 /* DIRECTIVE_HOOK */, [
|
|
4887
|
+
callWithAsyncErrorHandling(hook, instance, 8 /* ErrorCodes.DIRECTIVE_HOOK */, [
|
|
4888
4888
|
vnode.el,
|
|
4889
4889
|
binding,
|
|
4890
4890
|
vnode,
|
|
@@ -4991,7 +4991,7 @@ var Vue = (function () {
|
|
|
4991
4991
|
return;
|
|
4992
4992
|
}
|
|
4993
4993
|
// v2 render function, try to provide compat
|
|
4994
|
-
if (checkCompatEnabled("RENDER_FUNCTION" /* RENDER_FUNCTION */, instance)) {
|
|
4994
|
+
if (checkCompatEnabled("RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */, instance)) {
|
|
4995
4995
|
const wrapped = (Component.render = function compatRender() {
|
|
4996
4996
|
// @ts-ignore
|
|
4997
4997
|
return render.call(this, compatH);
|
|
@@ -5113,7 +5113,7 @@ var Vue = (function () {
|
|
|
5113
5113
|
function convertLegacySlots(vnode) {
|
|
5114
5114
|
const { props, children } = vnode;
|
|
5115
5115
|
let slots;
|
|
5116
|
-
if (vnode.shapeFlag & 6 /* COMPONENT */ && isArray(children)) {
|
|
5116
|
+
if (vnode.shapeFlag & 6 /* ShapeFlags.COMPONENT */ && isArray(children)) {
|
|
5117
5117
|
slots = {};
|
|
5118
5118
|
// check "slot" property on vnodes and turn them into v3 function slots
|
|
5119
5119
|
for (let i = 0; i < children.length; i++) {
|
|
@@ -5152,8 +5152,8 @@ var Vue = (function () {
|
|
|
5152
5152
|
}
|
|
5153
5153
|
function defineLegacyVNodeProperties(vnode) {
|
|
5154
5154
|
/* 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 */)) {
|
|
5155
|
+
if (isCompatEnabled("RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */, currentRenderingInstance, true /* enable for built-ins */) &&
|
|
5156
|
+
isCompatEnabled("PRIVATE_APIS" /* DeprecationTypes.PRIVATE_APIS */, currentRenderingInstance, true /* enable for built-ins */)) {
|
|
5157
5157
|
const context = currentRenderingInstance;
|
|
5158
5158
|
const getInstance = () => vnode.component && vnode.component.proxy;
|
|
5159
5159
|
let componentOptions;
|
|
@@ -5167,7 +5167,7 @@ var Vue = (function () {
|
|
|
5167
5167
|
context: { get: () => context && context.proxy },
|
|
5168
5168
|
componentOptions: {
|
|
5169
5169
|
get: () => {
|
|
5170
|
-
if (vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */) {
|
|
5170
|
+
if (vnode.shapeFlag & 4 /* ShapeFlags.STATEFUL_COMPONENT */) {
|
|
5171
5171
|
if (componentOptions) {
|
|
5172
5172
|
return componentOptions;
|
|
5173
5173
|
}
|
|
@@ -5287,7 +5287,13 @@ var Vue = (function () {
|
|
|
5287
5287
|
}
|
|
5288
5288
|
else if (slot) {
|
|
5289
5289
|
// conditional single slot generated by <template v-if="..." #foo>
|
|
5290
|
-
slots[slot.name] = slot.
|
|
5290
|
+
slots[slot.name] = slot.key
|
|
5291
|
+
? (...args) => {
|
|
5292
|
+
const res = slot.fn(...args);
|
|
5293
|
+
res.key = slot.key;
|
|
5294
|
+
return res;
|
|
5295
|
+
}
|
|
5296
|
+
: slot.fn;
|
|
5291
5297
|
}
|
|
5292
5298
|
}
|
|
5293
5299
|
return slots;
|
|
@@ -5323,9 +5329,15 @@ var Vue = (function () {
|
|
|
5323
5329
|
}
|
|
5324
5330
|
openBlock();
|
|
5325
5331
|
const validSlotContent = slot && ensureValidVNode(slot(props));
|
|
5326
|
-
const rendered = createBlock(Fragment, {
|
|
5327
|
-
|
|
5328
|
-
|
|
5332
|
+
const rendered = createBlock(Fragment, {
|
|
5333
|
+
key: props.key ||
|
|
5334
|
+
// slot content array of a dynamic conditional slot may have a branch
|
|
5335
|
+
// key attached in the `createSlots` helper, respect that
|
|
5336
|
+
(validSlotContent && validSlotContent.key) ||
|
|
5337
|
+
`_${name}`
|
|
5338
|
+
}, validSlotContent || (fallback ? fallback() : []), validSlotContent && slots._ === 1 /* SlotFlags.STABLE */
|
|
5339
|
+
? 64 /* PatchFlags.STABLE_FRAGMENT */
|
|
5340
|
+
: -2 /* PatchFlags.BAIL */);
|
|
5329
5341
|
if (!noSlotted && rendered.scopeId) {
|
|
5330
5342
|
rendered.slotScopeIds = [rendered.scopeId + '-s'];
|
|
5331
5343
|
}
|
|
@@ -5353,14 +5365,16 @@ var Vue = (function () {
|
|
|
5353
5365
|
* For prefixing keys in v-on="obj" with "on"
|
|
5354
5366
|
* @private
|
|
5355
5367
|
*/
|
|
5356
|
-
function toHandlers(obj) {
|
|
5368
|
+
function toHandlers(obj, preserveCaseIfNecessary) {
|
|
5357
5369
|
const ret = {};
|
|
5358
5370
|
if (!isObject(obj)) {
|
|
5359
5371
|
warn$1(`v-on with no argument expects an object value.`);
|
|
5360
5372
|
return ret;
|
|
5361
5373
|
}
|
|
5362
5374
|
for (const key in obj) {
|
|
5363
|
-
ret[
|
|
5375
|
+
ret[preserveCaseIfNecessary && /[A-Z]/.test(key)
|
|
5376
|
+
? `on:${key}`
|
|
5377
|
+
: toHandlerKey(key)] = obj[key];
|
|
5364
5378
|
}
|
|
5365
5379
|
return ret;
|
|
5366
5380
|
}
|
|
@@ -5496,26 +5510,26 @@ var Vue = (function () {
|
|
|
5496
5510
|
};
|
|
5497
5511
|
extend(map, {
|
|
5498
5512
|
$set: i => {
|
|
5499
|
-
assertCompatEnabled("INSTANCE_SET" /* INSTANCE_SET */, i);
|
|
5513
|
+
assertCompatEnabled("INSTANCE_SET" /* DeprecationTypes.INSTANCE_SET */, i);
|
|
5500
5514
|
return set;
|
|
5501
5515
|
},
|
|
5502
5516
|
$delete: i => {
|
|
5503
|
-
assertCompatEnabled("INSTANCE_DELETE" /* INSTANCE_DELETE */, i);
|
|
5517
|
+
assertCompatEnabled("INSTANCE_DELETE" /* DeprecationTypes.INSTANCE_DELETE */, i);
|
|
5504
5518
|
return del;
|
|
5505
5519
|
},
|
|
5506
5520
|
$mount: i => {
|
|
5507
|
-
assertCompatEnabled("GLOBAL_MOUNT" /* GLOBAL_MOUNT */, null /* this warning is global */);
|
|
5521
|
+
assertCompatEnabled("GLOBAL_MOUNT" /* DeprecationTypes.GLOBAL_MOUNT */, null /* this warning is global */);
|
|
5508
5522
|
// root mount override from ./global.ts in installCompatMount
|
|
5509
5523
|
return i.ctx._compat_mount || NOOP;
|
|
5510
5524
|
},
|
|
5511
5525
|
$destroy: i => {
|
|
5512
|
-
assertCompatEnabled("INSTANCE_DESTROY" /* INSTANCE_DESTROY */, i);
|
|
5526
|
+
assertCompatEnabled("INSTANCE_DESTROY" /* DeprecationTypes.INSTANCE_DESTROY */, i);
|
|
5513
5527
|
// root destroy override from ./global.ts in installCompatMount
|
|
5514
5528
|
return i.ctx._compat_destroy || NOOP;
|
|
5515
5529
|
},
|
|
5516
5530
|
// overrides existing accessor
|
|
5517
5531
|
$slots: i => {
|
|
5518
|
-
if (isCompatEnabled("RENDER_FUNCTION" /* RENDER_FUNCTION */, i) &&
|
|
5532
|
+
if (isCompatEnabled("RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */, i) &&
|
|
5519
5533
|
i.render &&
|
|
5520
5534
|
i.render._compatWrapped) {
|
|
5521
5535
|
return new Proxy(i.slots, legacySlotProxyHandlers);
|
|
@@ -5523,7 +5537,7 @@ var Vue = (function () {
|
|
|
5523
5537
|
return shallowReadonly(i.slots) ;
|
|
5524
5538
|
},
|
|
5525
5539
|
$scopedSlots: i => {
|
|
5526
|
-
assertCompatEnabled("INSTANCE_SCOPED_SLOTS" /* INSTANCE_SCOPED_SLOTS */, i);
|
|
5540
|
+
assertCompatEnabled("INSTANCE_SCOPED_SLOTS" /* DeprecationTypes.INSTANCE_SCOPED_SLOTS */, i);
|
|
5527
5541
|
const res = {};
|
|
5528
5542
|
for (const key in i.slots) {
|
|
5529
5543
|
const fn = i.slots[key];
|
|
@@ -5540,7 +5554,7 @@ var Vue = (function () {
|
|
|
5540
5554
|
$listeners: getCompatListeners
|
|
5541
5555
|
});
|
|
5542
5556
|
/* istanbul ignore if */
|
|
5543
|
-
if (isCompatEnabled("PRIVATE_APIS" /* PRIVATE_APIS */, null)) {
|
|
5557
|
+
if (isCompatEnabled("PRIVATE_APIS" /* DeprecationTypes.PRIVATE_APIS */, null)) {
|
|
5544
5558
|
extend(map, {
|
|
5545
5559
|
// needed by many libs / render fns
|
|
5546
5560
|
$vnode: i => i.vnode,
|
|
@@ -5644,23 +5658,23 @@ var Vue = (function () {
|
|
|
5644
5658
|
const n = accessCache[key];
|
|
5645
5659
|
if (n !== undefined) {
|
|
5646
5660
|
switch (n) {
|
|
5647
|
-
case 1 /* SETUP */:
|
|
5661
|
+
case 1 /* AccessTypes.SETUP */:
|
|
5648
5662
|
return setupState[key];
|
|
5649
|
-
case 2 /* DATA */:
|
|
5663
|
+
case 2 /* AccessTypes.DATA */:
|
|
5650
5664
|
return data[key];
|
|
5651
|
-
case 4 /* CONTEXT */:
|
|
5665
|
+
case 4 /* AccessTypes.CONTEXT */:
|
|
5652
5666
|
return ctx[key];
|
|
5653
|
-
case 3 /* PROPS */:
|
|
5667
|
+
case 3 /* AccessTypes.PROPS */:
|
|
5654
5668
|
return props[key];
|
|
5655
5669
|
// default: just fallthrough
|
|
5656
5670
|
}
|
|
5657
5671
|
}
|
|
5658
5672
|
else if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) {
|
|
5659
|
-
accessCache[key] = 1 /* SETUP */;
|
|
5673
|
+
accessCache[key] = 1 /* AccessTypes.SETUP */;
|
|
5660
5674
|
return setupState[key];
|
|
5661
5675
|
}
|
|
5662
5676
|
else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
|
|
5663
|
-
accessCache[key] = 2 /* DATA */;
|
|
5677
|
+
accessCache[key] = 2 /* AccessTypes.DATA */;
|
|
5664
5678
|
return data[key];
|
|
5665
5679
|
}
|
|
5666
5680
|
else if (
|
|
@@ -5668,15 +5682,15 @@ var Vue = (function () {
|
|
|
5668
5682
|
// props
|
|
5669
5683
|
(normalizedProps = instance.propsOptions[0]) &&
|
|
5670
5684
|
hasOwn(normalizedProps, key)) {
|
|
5671
|
-
accessCache[key] = 3 /* PROPS */;
|
|
5685
|
+
accessCache[key] = 3 /* AccessTypes.PROPS */;
|
|
5672
5686
|
return props[key];
|
|
5673
5687
|
}
|
|
5674
5688
|
else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
|
|
5675
|
-
accessCache[key] = 4 /* CONTEXT */;
|
|
5689
|
+
accessCache[key] = 4 /* AccessTypes.CONTEXT */;
|
|
5676
5690
|
return ctx[key];
|
|
5677
5691
|
}
|
|
5678
5692
|
else if (shouldCacheAccess) {
|
|
5679
|
-
accessCache[key] = 0 /* OTHER */;
|
|
5693
|
+
accessCache[key] = 0 /* AccessTypes.OTHER */;
|
|
5680
5694
|
}
|
|
5681
5695
|
}
|
|
5682
5696
|
const publicGetter = publicPropertiesMap[key];
|
|
@@ -5684,7 +5698,7 @@ var Vue = (function () {
|
|
|
5684
5698
|
// public $xxx properties
|
|
5685
5699
|
if (publicGetter) {
|
|
5686
5700
|
if (key === '$attrs') {
|
|
5687
|
-
track(instance, "get" /* GET */, key);
|
|
5701
|
+
track(instance, "get" /* TrackOpTypes.GET */, key);
|
|
5688
5702
|
markAttrsAccessed();
|
|
5689
5703
|
}
|
|
5690
5704
|
return publicGetter(instance);
|
|
@@ -5697,7 +5711,7 @@ var Vue = (function () {
|
|
|
5697
5711
|
}
|
|
5698
5712
|
else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
|
|
5699
5713
|
// user may set custom properties to `this` that start with `$`
|
|
5700
|
-
accessCache[key] = 4 /* CONTEXT */;
|
|
5714
|
+
accessCache[key] = 4 /* AccessTypes.CONTEXT */;
|
|
5701
5715
|
return ctx[key];
|
|
5702
5716
|
}
|
|
5703
5717
|
else if (
|
|
@@ -5873,7 +5887,7 @@ var Vue = (function () {
|
|
|
5873
5887
|
const toVal = to[key];
|
|
5874
5888
|
const fromVal = from[key];
|
|
5875
5889
|
if (key in to && isPlainObject(toVal) && isPlainObject(fromVal)) {
|
|
5876
|
-
warnDeprecation("OPTIONS_DATA_MERGE" /* OPTIONS_DATA_MERGE */, null, key);
|
|
5890
|
+
warnDeprecation("OPTIONS_DATA_MERGE" /* DeprecationTypes.OPTIONS_DATA_MERGE */, null, key);
|
|
5877
5891
|
deepMergeData(toVal, fromVal);
|
|
5878
5892
|
}
|
|
5879
5893
|
else {
|
|
@@ -5904,7 +5918,7 @@ var Vue = (function () {
|
|
|
5904
5918
|
// call beforeCreate first before accessing other options since
|
|
5905
5919
|
// the hook may mutate resolved options (#2791)
|
|
5906
5920
|
if (options.beforeCreate) {
|
|
5907
|
-
callHook(options.beforeCreate, instance, "bc" /* BEFORE_CREATE */);
|
|
5921
|
+
callHook(options.beforeCreate, instance, "bc" /* LifecycleHooks.BEFORE_CREATE */);
|
|
5908
5922
|
}
|
|
5909
5923
|
const {
|
|
5910
5924
|
// state
|
|
@@ -5920,7 +5934,7 @@ var Vue = (function () {
|
|
|
5920
5934
|
const [propsOptions] = instance.propsOptions;
|
|
5921
5935
|
if (propsOptions) {
|
|
5922
5936
|
for (const key in propsOptions) {
|
|
5923
|
-
checkDuplicateProperties("Props" /* PROPS */, key);
|
|
5937
|
+
checkDuplicateProperties("Props" /* OptionTypes.PROPS */, key);
|
|
5924
5938
|
}
|
|
5925
5939
|
}
|
|
5926
5940
|
}
|
|
@@ -5950,7 +5964,7 @@ var Vue = (function () {
|
|
|
5950
5964
|
});
|
|
5951
5965
|
}
|
|
5952
5966
|
{
|
|
5953
|
-
checkDuplicateProperties("Methods" /* METHODS */, key);
|
|
5967
|
+
checkDuplicateProperties("Methods" /* OptionTypes.METHODS */, key);
|
|
5954
5968
|
}
|
|
5955
5969
|
}
|
|
5956
5970
|
else {
|
|
@@ -5977,7 +5991,7 @@ var Vue = (function () {
|
|
|
5977
5991
|
instance.data = reactive(data);
|
|
5978
5992
|
{
|
|
5979
5993
|
for (const key in data) {
|
|
5980
|
-
checkDuplicateProperties("Data" /* DATA */, key);
|
|
5994
|
+
checkDuplicateProperties("Data" /* OptionTypes.DATA */, key);
|
|
5981
5995
|
// expose data on ctx during dev
|
|
5982
5996
|
if (!isReservedPrefix(key[0])) {
|
|
5983
5997
|
Object.defineProperty(ctx, key, {
|
|
@@ -6021,7 +6035,7 @@ var Vue = (function () {
|
|
|
6021
6035
|
set: v => (c.value = v)
|
|
6022
6036
|
});
|
|
6023
6037
|
{
|
|
6024
|
-
checkDuplicateProperties("Computed" /* COMPUTED */, key);
|
|
6038
|
+
checkDuplicateProperties("Computed" /* OptionTypes.COMPUTED */, key);
|
|
6025
6039
|
}
|
|
6026
6040
|
}
|
|
6027
6041
|
}
|
|
@@ -6039,7 +6053,7 @@ var Vue = (function () {
|
|
|
6039
6053
|
});
|
|
6040
6054
|
}
|
|
6041
6055
|
if (created) {
|
|
6042
|
-
callHook(created, instance, "c" /* CREATED */);
|
|
6056
|
+
callHook(created, instance, "c" /* LifecycleHooks.CREATED */);
|
|
6043
6057
|
}
|
|
6044
6058
|
function registerLifecycleHook(register, hook) {
|
|
6045
6059
|
if (isArray(hook)) {
|
|
@@ -6063,11 +6077,11 @@ var Vue = (function () {
|
|
|
6063
6077
|
registerLifecycleHook(onServerPrefetch, serverPrefetch);
|
|
6064
6078
|
{
|
|
6065
6079
|
if (beforeDestroy &&
|
|
6066
|
-
softAssertCompatEnabled("OPTIONS_BEFORE_DESTROY" /* OPTIONS_BEFORE_DESTROY */, instance)) {
|
|
6080
|
+
softAssertCompatEnabled("OPTIONS_BEFORE_DESTROY" /* DeprecationTypes.OPTIONS_BEFORE_DESTROY */, instance)) {
|
|
6067
6081
|
registerLifecycleHook(onBeforeUnmount, beforeDestroy);
|
|
6068
6082
|
}
|
|
6069
6083
|
if (destroyed &&
|
|
6070
|
-
softAssertCompatEnabled("OPTIONS_DESTROYED" /* OPTIONS_DESTROYED */, instance)) {
|
|
6084
|
+
softAssertCompatEnabled("OPTIONS_DESTROYED" /* DeprecationTypes.OPTIONS_DESTROYED */, instance)) {
|
|
6071
6085
|
registerLifecycleHook(onUnmounted, destroyed);
|
|
6072
6086
|
}
|
|
6073
6087
|
}
|
|
@@ -6099,7 +6113,7 @@ var Vue = (function () {
|
|
|
6099
6113
|
if (directives)
|
|
6100
6114
|
instance.directives = directives;
|
|
6101
6115
|
if (filters &&
|
|
6102
|
-
isCompatEnabled("FILTERS" /* FILTERS */, instance)) {
|
|
6116
|
+
isCompatEnabled("FILTERS" /* DeprecationTypes.FILTERS */, instance)) {
|
|
6103
6117
|
instance.filters = filters;
|
|
6104
6118
|
}
|
|
6105
6119
|
}
|
|
@@ -6146,7 +6160,7 @@ var Vue = (function () {
|
|
|
6146
6160
|
ctx[key] = injected;
|
|
6147
6161
|
}
|
|
6148
6162
|
{
|
|
6149
|
-
checkDuplicateProperties("Inject" /* INJECT */, key);
|
|
6163
|
+
checkDuplicateProperties("Inject" /* OptionTypes.INJECT */, key);
|
|
6150
6164
|
}
|
|
6151
6165
|
}
|
|
6152
6166
|
}
|
|
@@ -6206,7 +6220,7 @@ var Vue = (function () {
|
|
|
6206
6220
|
resolved = cached;
|
|
6207
6221
|
}
|
|
6208
6222
|
else if (!globalMixins.length && !mixins && !extendsOptions) {
|
|
6209
|
-
if (isCompatEnabled("PRIVATE_APIS" /* PRIVATE_APIS */, instance)) {
|
|
6223
|
+
if (isCompatEnabled("PRIVATE_APIS" /* DeprecationTypes.PRIVATE_APIS */, instance)) {
|
|
6210
6224
|
resolved = extend({}, base);
|
|
6211
6225
|
resolved.parent = instance.parent && instance.parent.proxy;
|
|
6212
6226
|
resolved.propsData = instance.vnode.props;
|
|
@@ -6222,7 +6236,9 @@ var Vue = (function () {
|
|
|
6222
6236
|
}
|
|
6223
6237
|
mergeOptions(resolved, base, optionMergeStrategies);
|
|
6224
6238
|
}
|
|
6225
|
-
|
|
6239
|
+
if (isObject(base)) {
|
|
6240
|
+
cache.set(base, resolved);
|
|
6241
|
+
}
|
|
6226
6242
|
return resolved;
|
|
6227
6243
|
}
|
|
6228
6244
|
function mergeOptions(to, from, strats, asMixin = false) {
|
|
@@ -6290,7 +6306,7 @@ var Vue = (function () {
|
|
|
6290
6306
|
return from;
|
|
6291
6307
|
}
|
|
6292
6308
|
return function mergedDataFn() {
|
|
6293
|
-
return (isCompatEnabled("OPTIONS_DATA_MERGE" /* OPTIONS_DATA_MERGE */, null)
|
|
6309
|
+
return (isCompatEnabled("OPTIONS_DATA_MERGE" /* DeprecationTypes.OPTIONS_DATA_MERGE */, null)
|
|
6294
6310
|
? deepMergeData
|
|
6295
6311
|
: extend)(isFunction(to) ? to.call(this, this) : to, isFunction(from) ? from.call(this, this) : from);
|
|
6296
6312
|
};
|
|
@@ -6329,7 +6345,7 @@ var Vue = (function () {
|
|
|
6329
6345
|
function createPropsDefaultThis(instance, rawProps, propKey) {
|
|
6330
6346
|
return new Proxy({}, {
|
|
6331
6347
|
get(_, key) {
|
|
6332
|
-
warnDeprecation("PROPS_DEFAULT_THIS" /* PROPS_DEFAULT_THIS */, null, propKey);
|
|
6348
|
+
warnDeprecation("PROPS_DEFAULT_THIS" /* DeprecationTypes.PROPS_DEFAULT_THIS */, null, propKey);
|
|
6333
6349
|
// $options
|
|
6334
6350
|
if (key === '$options') {
|
|
6335
6351
|
return resolveMergedOptions(instance);
|
|
@@ -6359,11 +6375,11 @@ var Vue = (function () {
|
|
|
6359
6375
|
return true;
|
|
6360
6376
|
}
|
|
6361
6377
|
if ((key === 'class' || key === 'style') &&
|
|
6362
|
-
isCompatEnabled("INSTANCE_ATTRS_CLASS_STYLE" /* INSTANCE_ATTRS_CLASS_STYLE */, instance)) {
|
|
6378
|
+
isCompatEnabled("INSTANCE_ATTRS_CLASS_STYLE" /* DeprecationTypes.INSTANCE_ATTRS_CLASS_STYLE */, instance)) {
|
|
6363
6379
|
return true;
|
|
6364
6380
|
}
|
|
6365
6381
|
if (isOn(key) &&
|
|
6366
|
-
isCompatEnabled("INSTANCE_LISTENERS" /* INSTANCE_LISTENERS */, instance)) {
|
|
6382
|
+
isCompatEnabled("INSTANCE_LISTENERS" /* DeprecationTypes.INSTANCE_LISTENERS */, instance)) {
|
|
6367
6383
|
return true;
|
|
6368
6384
|
}
|
|
6369
6385
|
// vue-router
|
|
@@ -6406,6 +6422,13 @@ var Vue = (function () {
|
|
|
6406
6422
|
}
|
|
6407
6423
|
instance.attrs = attrs;
|
|
6408
6424
|
}
|
|
6425
|
+
function isInHmrContext(instance) {
|
|
6426
|
+
while (instance) {
|
|
6427
|
+
if (instance.type.__hmrId)
|
|
6428
|
+
return true;
|
|
6429
|
+
instance = instance.parent;
|
|
6430
|
+
}
|
|
6431
|
+
}
|
|
6409
6432
|
function updateProps(instance, rawProps, rawPrevProps, optimized) {
|
|
6410
6433
|
const { props, attrs, vnode: { patchFlag } } = instance;
|
|
6411
6434
|
const rawCurrentProps = toRaw(props);
|
|
@@ -6415,11 +6438,10 @@ var Vue = (function () {
|
|
|
6415
6438
|
// always force full diff in dev
|
|
6416
6439
|
// - #1942 if hmr is enabled with sfc component
|
|
6417
6440
|
// - vite#872 non-sfc component used by sfc component
|
|
6418
|
-
!((instance
|
|
6419
|
-
(instance.parent && instance.parent.type.__hmrId))) &&
|
|
6441
|
+
!(isInHmrContext(instance)) &&
|
|
6420
6442
|
(optimized || patchFlag > 0) &&
|
|
6421
|
-
!(patchFlag & 16 /* FULL_PROPS */)) {
|
|
6422
|
-
if (patchFlag & 8 /* PROPS */) {
|
|
6443
|
+
!(patchFlag & 16 /* PatchFlags.FULL_PROPS */)) {
|
|
6444
|
+
if (patchFlag & 8 /* PatchFlags.PROPS */) {
|
|
6423
6445
|
// Compiler-generated props & no keys change, just set the updated
|
|
6424
6446
|
// the props.
|
|
6425
6447
|
const propsToUpdate = instance.vnode.dynamicProps;
|
|
@@ -6506,7 +6528,7 @@ var Vue = (function () {
|
|
|
6506
6528
|
}
|
|
6507
6529
|
// trigger updates for $attrs in case it's used in component slots
|
|
6508
6530
|
if (hasAttrsChanged) {
|
|
6509
|
-
trigger(instance, "set" /* SET */, '$attrs');
|
|
6531
|
+
trigger(instance, "set" /* TriggerOpTypes.SET */, '$attrs');
|
|
6510
6532
|
}
|
|
6511
6533
|
{
|
|
6512
6534
|
validateProps(rawProps || {}, props, instance);
|
|
@@ -6524,7 +6546,7 @@ var Vue = (function () {
|
|
|
6524
6546
|
}
|
|
6525
6547
|
{
|
|
6526
6548
|
if (key.startsWith('onHook:')) {
|
|
6527
|
-
softAssertCompatEnabled("INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */, instance, key.slice(2).toLowerCase());
|
|
6549
|
+
softAssertCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance, key.slice(2).toLowerCase());
|
|
6528
6550
|
}
|
|
6529
6551
|
if (key === 'inline-template') {
|
|
6530
6552
|
continue;
|
|
@@ -6585,7 +6607,7 @@ var Vue = (function () {
|
|
|
6585
6607
|
}
|
|
6586
6608
|
else {
|
|
6587
6609
|
setCurrentInstance(instance);
|
|
6588
|
-
value = propsDefaults[key] = defaultValue.call(isCompatEnabled("PROPS_DEFAULT_THIS" /* PROPS_DEFAULT_THIS */, instance)
|
|
6610
|
+
value = propsDefaults[key] = defaultValue.call(isCompatEnabled("PROPS_DEFAULT_THIS" /* DeprecationTypes.PROPS_DEFAULT_THIS */, instance)
|
|
6589
6611
|
? createPropsDefaultThis(instance, props, key)
|
|
6590
6612
|
: null, props);
|
|
6591
6613
|
unsetCurrentInstance();
|
|
@@ -6596,11 +6618,11 @@ var Vue = (function () {
|
|
|
6596
6618
|
}
|
|
6597
6619
|
}
|
|
6598
6620
|
// boolean casting
|
|
6599
|
-
if (opt[0 /* shouldCast */]) {
|
|
6621
|
+
if (opt[0 /* BooleanFlags.shouldCast */]) {
|
|
6600
6622
|
if (isAbsent && !hasDefault) {
|
|
6601
6623
|
value = false;
|
|
6602
6624
|
}
|
|
6603
|
-
else if (opt[1 /* shouldCastTrue */] &&
|
|
6625
|
+
else if (opt[1 /* BooleanFlags.shouldCastTrue */] &&
|
|
6604
6626
|
(value === '' || value === hyphenate(key))) {
|
|
6605
6627
|
value = true;
|
|
6606
6628
|
}
|
|
@@ -6641,7 +6663,9 @@ var Vue = (function () {
|
|
|
6641
6663
|
}
|
|
6642
6664
|
}
|
|
6643
6665
|
if (!raw && !hasExtends) {
|
|
6644
|
-
|
|
6666
|
+
if (isObject(comp)) {
|
|
6667
|
+
cache.set(comp, EMPTY_ARR);
|
|
6668
|
+
}
|
|
6645
6669
|
return EMPTY_ARR;
|
|
6646
6670
|
}
|
|
6647
6671
|
if (isArray(raw)) {
|
|
@@ -6668,8 +6692,8 @@ var Vue = (function () {
|
|
|
6668
6692
|
if (prop) {
|
|
6669
6693
|
const booleanIndex = getTypeIndex(Boolean, prop.type);
|
|
6670
6694
|
const stringIndex = getTypeIndex(String, prop.type);
|
|
6671
|
-
prop[0 /* shouldCast */] = booleanIndex > -1;
|
|
6672
|
-
prop[1 /* shouldCastTrue */] =
|
|
6695
|
+
prop[0 /* BooleanFlags.shouldCast */] = booleanIndex > -1;
|
|
6696
|
+
prop[1 /* BooleanFlags.shouldCastTrue */] =
|
|
6673
6697
|
stringIndex < 0 || booleanIndex < stringIndex;
|
|
6674
6698
|
// if the prop needs boolean casting or default value
|
|
6675
6699
|
if (booleanIndex > -1 || hasOwn(prop, 'default')) {
|
|
@@ -6680,7 +6704,9 @@ var Vue = (function () {
|
|
|
6680
6704
|
}
|
|
6681
6705
|
}
|
|
6682
6706
|
const res = [normalized, needCastKeys];
|
|
6683
|
-
|
|
6707
|
+
if (isObject(comp)) {
|
|
6708
|
+
cache.set(comp, res);
|
|
6709
|
+
}
|
|
6684
6710
|
return res;
|
|
6685
6711
|
}
|
|
6686
6712
|
function validatePropName(key) {
|
|
@@ -6871,7 +6897,7 @@ var Vue = (function () {
|
|
|
6871
6897
|
slots[key] = normalizeSlot(key, value, ctx);
|
|
6872
6898
|
}
|
|
6873
6899
|
else if (value != null) {
|
|
6874
|
-
if (!(isCompatEnabled("RENDER_FUNCTION" /* RENDER_FUNCTION */, instance))) {
|
|
6900
|
+
if (!(isCompatEnabled("RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */, instance))) {
|
|
6875
6901
|
warn$1(`Non-function value encountered for slot "${key}". ` +
|
|
6876
6902
|
`Prefer function slots for better performance.`);
|
|
6877
6903
|
}
|
|
@@ -6882,7 +6908,7 @@ var Vue = (function () {
|
|
|
6882
6908
|
};
|
|
6883
6909
|
const normalizeVNodeSlots = (instance, children) => {
|
|
6884
6910
|
if (!isKeepAlive(instance.vnode) &&
|
|
6885
|
-
!(isCompatEnabled("RENDER_FUNCTION" /* RENDER_FUNCTION */, instance))) {
|
|
6911
|
+
!(isCompatEnabled("RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */, instance))) {
|
|
6886
6912
|
warn$1(`Non-function value encountered for default slot. ` +
|
|
6887
6913
|
`Prefer function slots for better performance.`);
|
|
6888
6914
|
}
|
|
@@ -6890,7 +6916,7 @@ var Vue = (function () {
|
|
|
6890
6916
|
instance.slots.default = () => normalized;
|
|
6891
6917
|
};
|
|
6892
6918
|
const initSlots = (instance, children) => {
|
|
6893
|
-
if (instance.vnode.shapeFlag & 32 /* SLOTS_CHILDREN */) {
|
|
6919
|
+
if (instance.vnode.shapeFlag & 32 /* ShapeFlags.SLOTS_CHILDREN */) {
|
|
6894
6920
|
const type = children._;
|
|
6895
6921
|
if (type) {
|
|
6896
6922
|
// users can get the shallow readonly version of the slots object through `this.$slots`,
|
|
@@ -6915,7 +6941,7 @@ var Vue = (function () {
|
|
|
6915
6941
|
const { vnode, slots } = instance;
|
|
6916
6942
|
let needDeletionCheck = true;
|
|
6917
6943
|
let deletionComparisonTarget = EMPTY_OBJ;
|
|
6918
|
-
if (vnode.shapeFlag & 32 /* SLOTS_CHILDREN */) {
|
|
6944
|
+
if (vnode.shapeFlag & 32 /* ShapeFlags.SLOTS_CHILDREN */) {
|
|
6919
6945
|
const type = children._;
|
|
6920
6946
|
if (type) {
|
|
6921
6947
|
// compiled slots.
|
|
@@ -6924,7 +6950,7 @@ var Vue = (function () {
|
|
|
6924
6950
|
// force update slots and mark instance for hmr as well
|
|
6925
6951
|
extend(slots, children);
|
|
6926
6952
|
}
|
|
6927
|
-
else if (optimized && type === 1 /* STABLE */) {
|
|
6953
|
+
else if (optimized && type === 1 /* SlotFlags.STABLE */) {
|
|
6928
6954
|
// compiled AND stable.
|
|
6929
6955
|
// no need to update, and skip stale slots removal.
|
|
6930
6956
|
needDeletionCheck = false;
|
|
@@ -6937,7 +6963,7 @@ var Vue = (function () {
|
|
|
6937
6963
|
// when rendering the optimized slots by manually written render function,
|
|
6938
6964
|
// we need to delete the `slots._` flag if necessary to make subsequent updates reliable,
|
|
6939
6965
|
// i.e. let the `renderSlot` create the bailed Fragment
|
|
6940
|
-
if (!optimized && type === 1 /* STABLE */) {
|
|
6966
|
+
if (!optimized && type === 1 /* SlotFlags.STABLE */) {
|
|
6941
6967
|
delete slots._;
|
|
6942
6968
|
}
|
|
6943
6969
|
}
|
|
@@ -6966,11 +6992,11 @@ var Vue = (function () {
|
|
|
6966
6992
|
// dev only
|
|
6967
6993
|
function installLegacyConfigWarnings(config) {
|
|
6968
6994
|
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 */
|
|
6995
|
+
silent: "CONFIG_SILENT" /* DeprecationTypes.CONFIG_SILENT */,
|
|
6996
|
+
devtools: "CONFIG_DEVTOOLS" /* DeprecationTypes.CONFIG_DEVTOOLS */,
|
|
6997
|
+
ignoredElements: "CONFIG_IGNORED_ELEMENTS" /* DeprecationTypes.CONFIG_IGNORED_ELEMENTS */,
|
|
6998
|
+
keyCodes: "CONFIG_KEY_CODES" /* DeprecationTypes.CONFIG_KEY_CODES */,
|
|
6999
|
+
productionTip: "CONFIG_PRODUCTION_TIP" /* DeprecationTypes.CONFIG_PRODUCTION_TIP */
|
|
6974
7000
|
};
|
|
6975
7001
|
Object.keys(legacyConfigOptions).forEach(key => {
|
|
6976
7002
|
let val = config[key];
|
|
@@ -6995,7 +7021,7 @@ var Vue = (function () {
|
|
|
6995
7021
|
return target[key];
|
|
6996
7022
|
}
|
|
6997
7023
|
if (key in internalOptionMergeStrats &&
|
|
6998
|
-
softAssertCompatEnabled("CONFIG_OPTION_MERGE_STRATS" /* CONFIG_OPTION_MERGE_STRATS */, null)) {
|
|
7024
|
+
softAssertCompatEnabled("CONFIG_OPTION_MERGE_STRATS" /* DeprecationTypes.CONFIG_OPTION_MERGE_STRATS */, null)) {
|
|
6999
7025
|
return internalOptionMergeStrats[key];
|
|
7000
7026
|
}
|
|
7001
7027
|
}
|
|
@@ -7013,11 +7039,11 @@ var Vue = (function () {
|
|
|
7013
7039
|
return createCompatApp(options, Vue);
|
|
7014
7040
|
});
|
|
7015
7041
|
function createCompatApp(options = {}, Ctor) {
|
|
7016
|
-
assertCompatEnabled("GLOBAL_MOUNT" /* GLOBAL_MOUNT */, null);
|
|
7042
|
+
assertCompatEnabled("GLOBAL_MOUNT" /* DeprecationTypes.GLOBAL_MOUNT */, null);
|
|
7017
7043
|
const { data } = options;
|
|
7018
7044
|
if (data &&
|
|
7019
7045
|
!isFunction(data) &&
|
|
7020
|
-
softAssertCompatEnabled("OPTIONS_DATA_FN" /* OPTIONS_DATA_FN */, null)) {
|
|
7046
|
+
softAssertCompatEnabled("OPTIONS_DATA_FN" /* DeprecationTypes.OPTIONS_DATA_FN */, null)) {
|
|
7021
7047
|
options.data = () => data;
|
|
7022
7048
|
}
|
|
7023
7049
|
const app = createApp(options);
|
|
@@ -7032,7 +7058,7 @@ var Vue = (function () {
|
|
|
7032
7058
|
return vm;
|
|
7033
7059
|
}
|
|
7034
7060
|
}
|
|
7035
|
-
Vue.version = `2.6.14-compat:${"3.2.
|
|
7061
|
+
Vue.version = `2.6.14-compat:${"3.2.38"}`;
|
|
7036
7062
|
Vue.config = singletonApp.config;
|
|
7037
7063
|
Vue.use = (p, ...options) => {
|
|
7038
7064
|
if (p && isFunction(p.install)) {
|
|
@@ -7071,7 +7097,7 @@ var Vue = (function () {
|
|
|
7071
7097
|
Vue.nextTick = nextTick;
|
|
7072
7098
|
const extendCache = new WeakMap();
|
|
7073
7099
|
function extendCtor(extendOptions = {}) {
|
|
7074
|
-
assertCompatEnabled("GLOBAL_EXTEND" /* GLOBAL_EXTEND */, null);
|
|
7100
|
+
assertCompatEnabled("GLOBAL_EXTEND" /* DeprecationTypes.GLOBAL_EXTEND */, null);
|
|
7075
7101
|
if (isFunction(extendOptions)) {
|
|
7076
7102
|
extendOptions = extendOptions.options;
|
|
7077
7103
|
}
|
|
@@ -7112,15 +7138,15 @@ var Vue = (function () {
|
|
|
7112
7138
|
}
|
|
7113
7139
|
Vue.extend = extendCtor.bind(Vue);
|
|
7114
7140
|
Vue.set = (target, key, value) => {
|
|
7115
|
-
assertCompatEnabled("GLOBAL_SET" /* GLOBAL_SET */, null);
|
|
7141
|
+
assertCompatEnabled("GLOBAL_SET" /* DeprecationTypes.GLOBAL_SET */, null);
|
|
7116
7142
|
target[key] = value;
|
|
7117
7143
|
};
|
|
7118
7144
|
Vue.delete = (target, key) => {
|
|
7119
|
-
assertCompatEnabled("GLOBAL_DELETE" /* GLOBAL_DELETE */, null);
|
|
7145
|
+
assertCompatEnabled("GLOBAL_DELETE" /* DeprecationTypes.GLOBAL_DELETE */, null);
|
|
7120
7146
|
delete target[key];
|
|
7121
7147
|
};
|
|
7122
7148
|
Vue.observable = (target) => {
|
|
7123
|
-
assertCompatEnabled("GLOBAL_OBSERVABLE" /* GLOBAL_OBSERVABLE */, null);
|
|
7149
|
+
assertCompatEnabled("GLOBAL_OBSERVABLE" /* DeprecationTypes.GLOBAL_OBSERVABLE */, null);
|
|
7124
7150
|
return reactive(target);
|
|
7125
7151
|
};
|
|
7126
7152
|
Vue.filter = ((name, filter) => {
|
|
@@ -7141,7 +7167,7 @@ var Vue = (function () {
|
|
|
7141
7167
|
};
|
|
7142
7168
|
Object.defineProperty(Vue, 'util', {
|
|
7143
7169
|
get() {
|
|
7144
|
-
assertCompatEnabled("GLOBAL_PRIVATE_UTIL" /* GLOBAL_PRIVATE_UTIL */, null);
|
|
7170
|
+
assertCompatEnabled("GLOBAL_PRIVATE_UTIL" /* DeprecationTypes.GLOBAL_PRIVATE_UTIL */, null);
|
|
7145
7171
|
return util;
|
|
7146
7172
|
}
|
|
7147
7173
|
});
|
|
@@ -7164,7 +7190,7 @@ var Vue = (function () {
|
|
|
7164
7190
|
function installFilterMethod(app, context) {
|
|
7165
7191
|
context.filters = {};
|
|
7166
7192
|
app.filter = (name, filter) => {
|
|
7167
|
-
assertCompatEnabled("FILTERS" /* FILTERS */, null);
|
|
7193
|
+
assertCompatEnabled("FILTERS" /* DeprecationTypes.FILTERS */, null);
|
|
7168
7194
|
if (!filter) {
|
|
7169
7195
|
return context.filters[name];
|
|
7170
7196
|
}
|
|
@@ -7181,7 +7207,7 @@ var Vue = (function () {
|
|
|
7181
7207
|
// so that app.use() can work with legacy plugins that extend prototypes
|
|
7182
7208
|
prototype: {
|
|
7183
7209
|
get() {
|
|
7184
|
-
warnDeprecation("GLOBAL_PROTOTYPE" /* GLOBAL_PROTOTYPE */, null);
|
|
7210
|
+
warnDeprecation("GLOBAL_PROTOTYPE" /* DeprecationTypes.GLOBAL_PROTOTYPE */, null);
|
|
7185
7211
|
return app.config.globalProperties;
|
|
7186
7212
|
}
|
|
7187
7213
|
},
|
|
@@ -7218,7 +7244,7 @@ var Vue = (function () {
|
|
|
7218
7244
|
app.config[key] = isObject(val) ? Object.create(val) : val;
|
|
7219
7245
|
// compat for runtime ignoredElements -> isCustomElement
|
|
7220
7246
|
if (key === 'ignoredElements' &&
|
|
7221
|
-
isCompatEnabled("CONFIG_IGNORED_ELEMENTS" /* CONFIG_IGNORED_ELEMENTS */, null) &&
|
|
7247
|
+
isCompatEnabled("CONFIG_IGNORED_ELEMENTS" /* DeprecationTypes.CONFIG_IGNORED_ELEMENTS */, null) &&
|
|
7222
7248
|
!isRuntimeOnly() &&
|
|
7223
7249
|
isArray(val)) {
|
|
7224
7250
|
app.config.compilerOptions.isCustomElement = tag => {
|
|
@@ -7231,7 +7257,7 @@ var Vue = (function () {
|
|
|
7231
7257
|
}
|
|
7232
7258
|
function applySingletonPrototype(app, Ctor) {
|
|
7233
7259
|
// copy prototype augmentations as config.globalProperties
|
|
7234
|
-
const enabled = isCompatEnabled("GLOBAL_PROTOTYPE" /* GLOBAL_PROTOTYPE */, null);
|
|
7260
|
+
const enabled = isCompatEnabled("GLOBAL_PROTOTYPE" /* DeprecationTypes.GLOBAL_PROTOTYPE */, null);
|
|
7235
7261
|
if (enabled) {
|
|
7236
7262
|
app.config.globalProperties = Object.create(Ctor.prototype);
|
|
7237
7263
|
}
|
|
@@ -7246,7 +7272,7 @@ var Vue = (function () {
|
|
|
7246
7272
|
}
|
|
7247
7273
|
}
|
|
7248
7274
|
if (hasPrototypeAugmentations) {
|
|
7249
|
-
warnDeprecation("GLOBAL_PROTOTYPE" /* GLOBAL_PROTOTYPE */, null);
|
|
7275
|
+
warnDeprecation("GLOBAL_PROTOTYPE" /* DeprecationTypes.GLOBAL_PROTOTYPE */, null);
|
|
7250
7276
|
}
|
|
7251
7277
|
}
|
|
7252
7278
|
function installCompatMount(app, context, render) {
|
|
@@ -7316,7 +7342,7 @@ var Vue = (function () {
|
|
|
7316
7342
|
for (let i = 0; i < container.attributes.length; i++) {
|
|
7317
7343
|
const attr = container.attributes[i];
|
|
7318
7344
|
if (attr.name !== 'v-cloak' && /^(v-|:|@)/.test(attr.name)) {
|
|
7319
|
-
warnDeprecation("GLOBAL_MOUNT_CONTAINER" /* GLOBAL_MOUNT_CONTAINER */, null);
|
|
7345
|
+
warnDeprecation("GLOBAL_MOUNT_CONTAINER" /* DeprecationTypes.GLOBAL_MOUNT_CONTAINER */, null);
|
|
7320
7346
|
break;
|
|
7321
7347
|
}
|
|
7322
7348
|
}
|
|
@@ -7355,7 +7381,7 @@ var Vue = (function () {
|
|
|
7355
7381
|
if (bum) {
|
|
7356
7382
|
invokeArrayFns(bum);
|
|
7357
7383
|
}
|
|
7358
|
-
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */, instance)) {
|
|
7384
|
+
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
7359
7385
|
instance.emit('hook:beforeDestroy');
|
|
7360
7386
|
}
|
|
7361
7387
|
// stop effects
|
|
@@ -7366,7 +7392,7 @@ var Vue = (function () {
|
|
|
7366
7392
|
if (um) {
|
|
7367
7393
|
invokeArrayFns(um);
|
|
7368
7394
|
}
|
|
7369
|
-
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */, instance)) {
|
|
7395
|
+
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
7370
7396
|
instance.emit('hook:destroyed');
|
|
7371
7397
|
}
|
|
7372
7398
|
}
|
|
@@ -7427,12 +7453,12 @@ var Vue = (function () {
|
|
|
7427
7453
|
enumerable: true,
|
|
7428
7454
|
configurable: true,
|
|
7429
7455
|
get() {
|
|
7430
|
-
track(obj, "get" /* GET */, key);
|
|
7456
|
+
track(obj, "get" /* TrackOpTypes.GET */, key);
|
|
7431
7457
|
return val;
|
|
7432
7458
|
},
|
|
7433
7459
|
set(newVal) {
|
|
7434
7460
|
val = isObject(newVal) ? reactive(newVal) : newVal;
|
|
7435
|
-
trigger(obj, "set" /* SET */, key, newVal);
|
|
7461
|
+
trigger(obj, "set" /* TriggerOpTypes.SET */, key, newVal);
|
|
7436
7462
|
}
|
|
7437
7463
|
});
|
|
7438
7464
|
}
|
|
@@ -7625,7 +7651,7 @@ var Vue = (function () {
|
|
|
7625
7651
|
// because the template ref is forwarded to inner component
|
|
7626
7652
|
return;
|
|
7627
7653
|
}
|
|
7628
|
-
const refValue = vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */
|
|
7654
|
+
const refValue = vnode.shapeFlag & 4 /* ShapeFlags.STATEFUL_COMPONENT */
|
|
7629
7655
|
? getExposeProxy(vnode.component) || vnode.component.proxy
|
|
7630
7656
|
: vnode.el;
|
|
7631
7657
|
const value = isUnmount ? null : refValue;
|
|
@@ -7651,7 +7677,7 @@ var Vue = (function () {
|
|
|
7651
7677
|
}
|
|
7652
7678
|
}
|
|
7653
7679
|
if (isFunction(ref)) {
|
|
7654
|
-
callWithErrorHandling(ref, owner, 12 /* FUNCTION_REF */, [value, refs]);
|
|
7680
|
+
callWithErrorHandling(ref, owner, 12 /* ErrorCodes.FUNCTION_REF */, [value, refs]);
|
|
7655
7681
|
}
|
|
7656
7682
|
else {
|
|
7657
7683
|
const _isString = isString(ref);
|
|
@@ -7713,7 +7739,7 @@ var Vue = (function () {
|
|
|
7713
7739
|
|
|
7714
7740
|
let hasMismatch = false;
|
|
7715
7741
|
const isSVGContainer = (container) => /svg/.test(container.namespaceURI) && container.tagName !== 'foreignObject';
|
|
7716
|
-
const isComment = (node) => node.nodeType === 8 /* COMMENT */;
|
|
7742
|
+
const isComment = (node) => node.nodeType === 8 /* DOMNodeTypes.COMMENT */;
|
|
7717
7743
|
// Note: hydration is DOM-specific
|
|
7718
7744
|
// But we have to place it in core due to tight coupling with core - splitting
|
|
7719
7745
|
// it out creates a ton of unnecessary complexity.
|
|
@@ -7745,14 +7771,14 @@ var Vue = (function () {
|
|
|
7745
7771
|
const { type, ref, shapeFlag, patchFlag } = vnode;
|
|
7746
7772
|
const domType = node.nodeType;
|
|
7747
7773
|
vnode.el = node;
|
|
7748
|
-
if (patchFlag === -2 /* BAIL */) {
|
|
7774
|
+
if (patchFlag === -2 /* PatchFlags.BAIL */) {
|
|
7749
7775
|
optimized = false;
|
|
7750
7776
|
vnode.dynamicChildren = null;
|
|
7751
7777
|
}
|
|
7752
7778
|
let nextNode = null;
|
|
7753
7779
|
switch (type) {
|
|
7754
7780
|
case Text:
|
|
7755
|
-
if (domType !== 3 /* TEXT */) {
|
|
7781
|
+
if (domType !== 3 /* DOMNodeTypes.TEXT */) {
|
|
7756
7782
|
// #5728 empty text node inside a slot can cause hydration failure
|
|
7757
7783
|
// because the server rendered HTML won't contain a text node
|
|
7758
7784
|
if (vnode.children === '') {
|
|
@@ -7775,7 +7801,7 @@ var Vue = (function () {
|
|
|
7775
7801
|
}
|
|
7776
7802
|
break;
|
|
7777
7803
|
case Comment:
|
|
7778
|
-
if (domType !== 8 /* COMMENT */ || isFragmentStart) {
|
|
7804
|
+
if (domType !== 8 /* DOMNodeTypes.COMMENT */ || isFragmentStart) {
|
|
7779
7805
|
nextNode = onMismatch();
|
|
7780
7806
|
}
|
|
7781
7807
|
else {
|
|
@@ -7783,7 +7809,7 @@ var Vue = (function () {
|
|
|
7783
7809
|
}
|
|
7784
7810
|
break;
|
|
7785
7811
|
case Static:
|
|
7786
|
-
if (domType !== 1 /* ELEMENT */ && domType !== 3 /* TEXT */) {
|
|
7812
|
+
if (domType !== 1 /* DOMNodeTypes.ELEMENT */ && domType !== 3 /* DOMNodeTypes.TEXT */) {
|
|
7787
7813
|
nextNode = onMismatch();
|
|
7788
7814
|
}
|
|
7789
7815
|
else {
|
|
@@ -7795,7 +7821,7 @@ var Vue = (function () {
|
|
|
7795
7821
|
for (let i = 0; i < vnode.staticCount; i++) {
|
|
7796
7822
|
if (needToAdoptContent)
|
|
7797
7823
|
vnode.children +=
|
|
7798
|
-
nextNode.nodeType === 1 /* ELEMENT */
|
|
7824
|
+
nextNode.nodeType === 1 /* DOMNodeTypes.ELEMENT */
|
|
7799
7825
|
? nextNode.outerHTML
|
|
7800
7826
|
: nextNode.data;
|
|
7801
7827
|
if (i === vnode.staticCount - 1) {
|
|
@@ -7815,8 +7841,8 @@ var Vue = (function () {
|
|
|
7815
7841
|
}
|
|
7816
7842
|
break;
|
|
7817
7843
|
default:
|
|
7818
|
-
if (shapeFlag & 1 /* ELEMENT */) {
|
|
7819
|
-
if (domType !== 1 /* ELEMENT */ ||
|
|
7844
|
+
if (shapeFlag & 1 /* ShapeFlags.ELEMENT */) {
|
|
7845
|
+
if (domType !== 1 /* DOMNodeTypes.ELEMENT */ ||
|
|
7820
7846
|
vnode.type.toLowerCase() !==
|
|
7821
7847
|
node.tagName.toLowerCase()) {
|
|
7822
7848
|
nextNode = onMismatch();
|
|
@@ -7825,7 +7851,7 @@ var Vue = (function () {
|
|
|
7825
7851
|
nextNode = hydrateElement(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
7826
7852
|
}
|
|
7827
7853
|
}
|
|
7828
|
-
else if (shapeFlag & 6 /* COMPONENT */) {
|
|
7854
|
+
else if (shapeFlag & 6 /* ShapeFlags.COMPONENT */) {
|
|
7829
7855
|
// when setting up the render effect, if the initial vnode already
|
|
7830
7856
|
// has .el set, the component will perform hydration instead of mount
|
|
7831
7857
|
// on its sub-tree.
|
|
@@ -7864,15 +7890,15 @@ var Vue = (function () {
|
|
|
7864
7890
|
vnode.component.subTree = subTree;
|
|
7865
7891
|
}
|
|
7866
7892
|
}
|
|
7867
|
-
else if (shapeFlag & 64 /* TELEPORT */) {
|
|
7868
|
-
if (domType !== 8 /* COMMENT */) {
|
|
7893
|
+
else if (shapeFlag & 64 /* ShapeFlags.TELEPORT */) {
|
|
7894
|
+
if (domType !== 8 /* DOMNodeTypes.COMMENT */) {
|
|
7869
7895
|
nextNode = onMismatch();
|
|
7870
7896
|
}
|
|
7871
7897
|
else {
|
|
7872
7898
|
nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, rendererInternals, hydrateChildren);
|
|
7873
7899
|
}
|
|
7874
7900
|
}
|
|
7875
|
-
else if (shapeFlag & 128 /* SUSPENSE */) {
|
|
7901
|
+
else if (shapeFlag & 128 /* ShapeFlags.SUSPENSE */) {
|
|
7876
7902
|
nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, isSVGContainer(parentNode(node)), slotScopeIds, optimized, rendererInternals, hydrateNode);
|
|
7877
7903
|
}
|
|
7878
7904
|
else {
|
|
@@ -7900,7 +7926,7 @@ var Vue = (function () {
|
|
|
7900
7926
|
if (props) {
|
|
7901
7927
|
if (forcePatchValue ||
|
|
7902
7928
|
!optimized ||
|
|
7903
|
-
patchFlag & (16 /* FULL_PROPS */ | 32 /* HYDRATE_EVENTS */)) {
|
|
7929
|
+
patchFlag & (16 /* PatchFlags.FULL_PROPS */ | 32 /* PatchFlags.HYDRATE_EVENTS */)) {
|
|
7904
7930
|
for (const key in props) {
|
|
7905
7931
|
if ((forcePatchValue && key.endsWith('value')) ||
|
|
7906
7932
|
(isOn(key) && !isReservedProp(key))) {
|
|
@@ -7929,7 +7955,7 @@ var Vue = (function () {
|
|
|
7929
7955
|
}, parentSuspense);
|
|
7930
7956
|
}
|
|
7931
7957
|
// children
|
|
7932
|
-
if (shapeFlag & 16 /* ARRAY_CHILDREN */ &&
|
|
7958
|
+
if (shapeFlag & 16 /* ShapeFlags.ARRAY_CHILDREN */ &&
|
|
7933
7959
|
// skip if element has innerHTML / textContent
|
|
7934
7960
|
!(props && (props.innerHTML || props.textContent))) {
|
|
7935
7961
|
let next = hydrateChildren(el.firstChild, vnode, el, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
@@ -7947,7 +7973,7 @@ var Vue = (function () {
|
|
|
7947
7973
|
remove(cur);
|
|
7948
7974
|
}
|
|
7949
7975
|
}
|
|
7950
|
-
else if (shapeFlag & 8 /* TEXT_CHILDREN */) {
|
|
7976
|
+
else if (shapeFlag & 8 /* ShapeFlags.TEXT_CHILDREN */) {
|
|
7951
7977
|
if (el.textContent !== vnode.children) {
|
|
7952
7978
|
hasMismatch = true;
|
|
7953
7979
|
warn$1(`Hydration text content mismatch in <${vnode.type}>:\n` +
|
|
@@ -8010,7 +8036,7 @@ var Vue = (function () {
|
|
|
8010
8036
|
};
|
|
8011
8037
|
const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
|
|
8012
8038
|
hasMismatch = true;
|
|
8013
|
-
warn$1(`Hydration node mismatch:\n- Client vnode:`, vnode.type, `\n- Server rendered DOM:`, node, node.nodeType === 3 /* TEXT */
|
|
8039
|
+
warn$1(`Hydration node mismatch:\n- Client vnode:`, vnode.type, `\n- Server rendered DOM:`, node, node.nodeType === 3 /* DOMNodeTypes.TEXT */
|
|
8014
8040
|
? `(text)`
|
|
8015
8041
|
: isComment(node) && node.data === '['
|
|
8016
8042
|
? `(start of fragment)`
|
|
@@ -8141,7 +8167,7 @@ var Vue = (function () {
|
|
|
8141
8167
|
unmount(n1, parentComponent, parentSuspense, true);
|
|
8142
8168
|
n1 = null;
|
|
8143
8169
|
}
|
|
8144
|
-
if (n2.patchFlag === -2 /* BAIL */) {
|
|
8170
|
+
if (n2.patchFlag === -2 /* PatchFlags.BAIL */) {
|
|
8145
8171
|
optimized = false;
|
|
8146
8172
|
n2.dynamicChildren = null;
|
|
8147
8173
|
}
|
|
@@ -8165,16 +8191,16 @@ var Vue = (function () {
|
|
|
8165
8191
|
processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
|
|
8166
8192
|
break;
|
|
8167
8193
|
default:
|
|
8168
|
-
if (shapeFlag & 1 /* ELEMENT */) {
|
|
8194
|
+
if (shapeFlag & 1 /* ShapeFlags.ELEMENT */) {
|
|
8169
8195
|
processElement(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
|
|
8170
8196
|
}
|
|
8171
|
-
else if (shapeFlag & 6 /* COMPONENT */) {
|
|
8197
|
+
else if (shapeFlag & 6 /* ShapeFlags.COMPONENT */) {
|
|
8172
8198
|
processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
|
|
8173
8199
|
}
|
|
8174
|
-
else if (shapeFlag & 64 /* TELEPORT */) {
|
|
8200
|
+
else if (shapeFlag & 64 /* ShapeFlags.TELEPORT */) {
|
|
8175
8201
|
type.process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals);
|
|
8176
8202
|
}
|
|
8177
|
-
else if (shapeFlag & 128 /* SUSPENSE */) {
|
|
8203
|
+
else if (shapeFlag & 128 /* ShapeFlags.SUSPENSE */) {
|
|
8178
8204
|
type.process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals);
|
|
8179
8205
|
}
|
|
8180
8206
|
else {
|
|
@@ -8260,10 +8286,10 @@ var Vue = (function () {
|
|
|
8260
8286
|
el = vnode.el = hostCreateElement(vnode.type, isSVG, props && props.is, props);
|
|
8261
8287
|
// mount children first, since some props may rely on child content
|
|
8262
8288
|
// being already rendered, e.g. `<select value>`
|
|
8263
|
-
if (shapeFlag & 8 /* TEXT_CHILDREN */) {
|
|
8289
|
+
if (shapeFlag & 8 /* ShapeFlags.TEXT_CHILDREN */) {
|
|
8264
8290
|
hostSetElementText(el, vnode.children);
|
|
8265
8291
|
}
|
|
8266
|
-
else if (shapeFlag & 16 /* ARRAY_CHILDREN */) {
|
|
8292
|
+
else if (shapeFlag & 16 /* ShapeFlags.ARRAY_CHILDREN */) {
|
|
8267
8293
|
mountChildren(vnode.children, el, null, parentComponent, parentSuspense, isSVG && type !== 'foreignObject', slotScopeIds, optimized);
|
|
8268
8294
|
}
|
|
8269
8295
|
if (dirs) {
|
|
@@ -8339,7 +8365,7 @@ var Vue = (function () {
|
|
|
8339
8365
|
if (parentComponent) {
|
|
8340
8366
|
let subTree = parentComponent.subTree;
|
|
8341
8367
|
if (subTree.patchFlag > 0 &&
|
|
8342
|
-
subTree.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */) {
|
|
8368
|
+
subTree.patchFlag & 2048 /* PatchFlags.DEV_ROOT_FRAGMENT */) {
|
|
8343
8369
|
subTree =
|
|
8344
8370
|
filterSingleRoot(subTree.children) || subTree;
|
|
8345
8371
|
}
|
|
@@ -8362,7 +8388,7 @@ var Vue = (function () {
|
|
|
8362
8388
|
let { patchFlag, dynamicChildren, dirs } = n2;
|
|
8363
8389
|
// #1426 take the old vnode's patch flag into account since user may clone a
|
|
8364
8390
|
// compiler-generated vnode, which de-opts to FULL_PROPS
|
|
8365
|
-
patchFlag |= n1.patchFlag & 16 /* FULL_PROPS */;
|
|
8391
|
+
patchFlag |= n1.patchFlag & 16 /* PatchFlags.FULL_PROPS */;
|
|
8366
8392
|
const oldProps = n1.props || EMPTY_OBJ;
|
|
8367
8393
|
const newProps = n2.props || EMPTY_OBJ;
|
|
8368
8394
|
let vnodeHook;
|
|
@@ -8397,21 +8423,21 @@ var Vue = (function () {
|
|
|
8397
8423
|
// generated by the compiler and can take the fast path.
|
|
8398
8424
|
// in this path old node and new node are guaranteed to have the same shape
|
|
8399
8425
|
// (i.e. at the exact same position in the source template)
|
|
8400
|
-
if (patchFlag & 16 /* FULL_PROPS */) {
|
|
8426
|
+
if (patchFlag & 16 /* PatchFlags.FULL_PROPS */) {
|
|
8401
8427
|
// element props contain dynamic keys, full diff needed
|
|
8402
8428
|
patchProps(el, n2, oldProps, newProps, parentComponent, parentSuspense, isSVG);
|
|
8403
8429
|
}
|
|
8404
8430
|
else {
|
|
8405
8431
|
// class
|
|
8406
8432
|
// this flag is matched when the element has dynamic class bindings.
|
|
8407
|
-
if (patchFlag & 2 /* CLASS */) {
|
|
8433
|
+
if (patchFlag & 2 /* PatchFlags.CLASS */) {
|
|
8408
8434
|
if (oldProps.class !== newProps.class) {
|
|
8409
8435
|
hostPatchProp(el, 'class', null, newProps.class, isSVG);
|
|
8410
8436
|
}
|
|
8411
8437
|
}
|
|
8412
8438
|
// style
|
|
8413
8439
|
// this flag is matched when the element has dynamic style bindings
|
|
8414
|
-
if (patchFlag & 4 /* STYLE */) {
|
|
8440
|
+
if (patchFlag & 4 /* PatchFlags.STYLE */) {
|
|
8415
8441
|
hostPatchProp(el, 'style', oldProps.style, newProps.style, isSVG);
|
|
8416
8442
|
}
|
|
8417
8443
|
// props
|
|
@@ -8420,7 +8446,7 @@ var Vue = (function () {
|
|
|
8420
8446
|
// faster iteration.
|
|
8421
8447
|
// Note dynamic keys like :[foo]="bar" will cause this optimization to
|
|
8422
8448
|
// bail out and go through a full diff because we need to unset the old key
|
|
8423
|
-
if (patchFlag & 8 /* PROPS */) {
|
|
8449
|
+
if (patchFlag & 8 /* PatchFlags.PROPS */) {
|
|
8424
8450
|
// if the flag is present then dynamicProps must be non-null
|
|
8425
8451
|
const propsToUpdate = n2.dynamicProps;
|
|
8426
8452
|
for (let i = 0; i < propsToUpdate.length; i++) {
|
|
@@ -8436,7 +8462,7 @@ var Vue = (function () {
|
|
|
8436
8462
|
}
|
|
8437
8463
|
// text
|
|
8438
8464
|
// This flag is matched when the element has only dynamic text children.
|
|
8439
|
-
if (patchFlag & 1 /* TEXT */) {
|
|
8465
|
+
if (patchFlag & 1 /* PatchFlags.TEXT */) {
|
|
8440
8466
|
if (n1.children !== n2.children) {
|
|
8441
8467
|
hostSetElementText(el, n2.children);
|
|
8442
8468
|
}
|
|
@@ -8470,7 +8496,7 @@ var Vue = (function () {
|
|
|
8470
8496
|
// which also requires the correct parent container
|
|
8471
8497
|
!isSameVNodeType(oldVNode, newVNode) ||
|
|
8472
8498
|
// - In the case of a component, it could contain anything.
|
|
8473
|
-
oldVNode.shapeFlag & (6 /* COMPONENT */ | 64 /* TELEPORT */))
|
|
8499
|
+
oldVNode.shapeFlag & (6 /* ShapeFlags.COMPONENT */ | 64 /* ShapeFlags.TELEPORT */))
|
|
8474
8500
|
? hostParentNode(oldVNode.el)
|
|
8475
8501
|
: // In other cases, the parent container is not actually used so we
|
|
8476
8502
|
// just pass the block element here to avoid a DOM parentNode call.
|
|
@@ -8508,7 +8534,7 @@ var Vue = (function () {
|
|
|
8508
8534
|
const fragmentEndAnchor = (n2.anchor = n1 ? n1.anchor : hostCreateText(''));
|
|
8509
8535
|
let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2;
|
|
8510
8536
|
if (// #5523 dev root fragment may inherit directives
|
|
8511
|
-
(isHmrUpdating || patchFlag & 2048 /* DEV_ROOT_FRAGMENT */)) {
|
|
8537
|
+
(isHmrUpdating || patchFlag & 2048 /* PatchFlags.DEV_ROOT_FRAGMENT */)) {
|
|
8512
8538
|
// HMR updated / Dev root fragment (w/ comments), force full diff
|
|
8513
8539
|
patchFlag = 0;
|
|
8514
8540
|
optimized = false;
|
|
@@ -8530,7 +8556,7 @@ var Vue = (function () {
|
|
|
8530
8556
|
}
|
|
8531
8557
|
else {
|
|
8532
8558
|
if (patchFlag > 0 &&
|
|
8533
|
-
patchFlag & 64 /* STABLE_FRAGMENT */ &&
|
|
8559
|
+
patchFlag & 64 /* PatchFlags.STABLE_FRAGMENT */ &&
|
|
8534
8560
|
dynamicChildren &&
|
|
8535
8561
|
// #2715 the previous fragment could've been a BAILed one as a result
|
|
8536
8562
|
// of renderSlot() with no valid children
|
|
@@ -8563,7 +8589,7 @@ var Vue = (function () {
|
|
|
8563
8589
|
const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
|
|
8564
8590
|
n2.slotScopeIds = slotScopeIds;
|
|
8565
8591
|
if (n1 == null) {
|
|
8566
|
-
if (n2.shapeFlag & 512 /* COMPONENT_KEPT_ALIVE */) {
|
|
8592
|
+
if (n2.shapeFlag & 512 /* ShapeFlags.COMPONENT_KEPT_ALIVE */) {
|
|
8567
8593
|
parentComponent.ctx.activate(n2, container, anchor, isSVG, optimized);
|
|
8568
8594
|
}
|
|
8569
8595
|
else {
|
|
@@ -8668,7 +8694,7 @@ var Vue = (function () {
|
|
|
8668
8694
|
(vnodeHook = props && props.onVnodeBeforeMount)) {
|
|
8669
8695
|
invokeVNodeHook(vnodeHook, parent, initialVNode);
|
|
8670
8696
|
}
|
|
8671
|
-
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */, instance)) {
|
|
8697
|
+
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
8672
8698
|
instance.emit('hook:beforeMount');
|
|
8673
8699
|
}
|
|
8674
8700
|
toggleRecurse(instance, true);
|
|
@@ -8729,18 +8755,18 @@ var Vue = (function () {
|
|
|
8729
8755
|
const scopedInitialVNode = initialVNode;
|
|
8730
8756
|
queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), parentSuspense);
|
|
8731
8757
|
}
|
|
8732
|
-
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */, instance)) {
|
|
8758
|
+
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
8733
8759
|
queuePostRenderEffect(() => instance.emit('hook:mounted'), parentSuspense);
|
|
8734
8760
|
}
|
|
8735
8761
|
// activated hook for keep-alive roots.
|
|
8736
8762
|
// #1742 activated hook must be accessed after first render
|
|
8737
8763
|
// since the hook may be injected by a child keep-alive
|
|
8738
|
-
if (initialVNode.shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */ ||
|
|
8764
|
+
if (initialVNode.shapeFlag & 256 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */ ||
|
|
8739
8765
|
(parent &&
|
|
8740
8766
|
isAsyncWrapper(parent.vnode) &&
|
|
8741
|
-
parent.vnode.shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */)) {
|
|
8767
|
+
parent.vnode.shapeFlag & 256 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */)) {
|
|
8742
8768
|
instance.a && queuePostRenderEffect(instance.a, parentSuspense);
|
|
8743
|
-
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */, instance)) {
|
|
8769
|
+
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
8744
8770
|
queuePostRenderEffect(() => instance.emit('hook:activated'), parentSuspense);
|
|
8745
8771
|
}
|
|
8746
8772
|
}
|
|
@@ -8778,7 +8804,7 @@ var Vue = (function () {
|
|
|
8778
8804
|
if ((vnodeHook = next.props && next.props.onVnodeBeforeUpdate)) {
|
|
8779
8805
|
invokeVNodeHook(vnodeHook, parent, next, vnode);
|
|
8780
8806
|
}
|
|
8781
|
-
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */, instance)) {
|
|
8807
|
+
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
8782
8808
|
instance.emit('hook:beforeUpdate');
|
|
8783
8809
|
}
|
|
8784
8810
|
toggleRecurse(instance, true);
|
|
@@ -8818,7 +8844,7 @@ var Vue = (function () {
|
|
|
8818
8844
|
if ((vnodeHook = next.props && next.props.onVnodeUpdated)) {
|
|
8819
8845
|
queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, next, vnode), parentSuspense);
|
|
8820
8846
|
}
|
|
8821
|
-
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */, instance)) {
|
|
8847
|
+
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
8822
8848
|
queuePostRenderEffect(() => instance.emit('hook:updated'), parentSuspense);
|
|
8823
8849
|
}
|
|
8824
8850
|
{
|
|
@@ -8858,7 +8884,7 @@ var Vue = (function () {
|
|
|
8858
8884
|
pauseTracking();
|
|
8859
8885
|
// props update may have triggered pre-flush watchers.
|
|
8860
8886
|
// flush them before the render update.
|
|
8861
|
-
flushPreFlushCbs(
|
|
8887
|
+
flushPreFlushCbs();
|
|
8862
8888
|
resetTracking();
|
|
8863
8889
|
};
|
|
8864
8890
|
const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized = false) => {
|
|
@@ -8868,22 +8894,22 @@ var Vue = (function () {
|
|
|
8868
8894
|
const { patchFlag, shapeFlag } = n2;
|
|
8869
8895
|
// fast path
|
|
8870
8896
|
if (patchFlag > 0) {
|
|
8871
|
-
if (patchFlag & 128 /* KEYED_FRAGMENT */) {
|
|
8897
|
+
if (patchFlag & 128 /* PatchFlags.KEYED_FRAGMENT */) {
|
|
8872
8898
|
// this could be either fully-keyed or mixed (some keyed some not)
|
|
8873
8899
|
// presence of patchFlag means children are guaranteed to be arrays
|
|
8874
8900
|
patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
|
|
8875
8901
|
return;
|
|
8876
8902
|
}
|
|
8877
|
-
else if (patchFlag & 256 /* UNKEYED_FRAGMENT */) {
|
|
8903
|
+
else if (patchFlag & 256 /* PatchFlags.UNKEYED_FRAGMENT */) {
|
|
8878
8904
|
// unkeyed
|
|
8879
8905
|
patchUnkeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
|
|
8880
8906
|
return;
|
|
8881
8907
|
}
|
|
8882
8908
|
}
|
|
8883
8909
|
// children has 3 possibilities: text, array or no children.
|
|
8884
|
-
if (shapeFlag & 8 /* TEXT_CHILDREN */) {
|
|
8910
|
+
if (shapeFlag & 8 /* ShapeFlags.TEXT_CHILDREN */) {
|
|
8885
8911
|
// text children fast path
|
|
8886
|
-
if (prevShapeFlag & 16 /* ARRAY_CHILDREN */) {
|
|
8912
|
+
if (prevShapeFlag & 16 /* ShapeFlags.ARRAY_CHILDREN */) {
|
|
8887
8913
|
unmountChildren(c1, parentComponent, parentSuspense);
|
|
8888
8914
|
}
|
|
8889
8915
|
if (c2 !== c1) {
|
|
@@ -8891,9 +8917,9 @@ var Vue = (function () {
|
|
|
8891
8917
|
}
|
|
8892
8918
|
}
|
|
8893
8919
|
else {
|
|
8894
|
-
if (prevShapeFlag & 16 /* ARRAY_CHILDREN */) {
|
|
8920
|
+
if (prevShapeFlag & 16 /* ShapeFlags.ARRAY_CHILDREN */) {
|
|
8895
8921
|
// prev children was array
|
|
8896
|
-
if (shapeFlag & 16 /* ARRAY_CHILDREN */) {
|
|
8922
|
+
if (shapeFlag & 16 /* ShapeFlags.ARRAY_CHILDREN */) {
|
|
8897
8923
|
// two arrays, cannot assume anything, do full diff
|
|
8898
8924
|
patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
|
|
8899
8925
|
}
|
|
@@ -8905,11 +8931,11 @@ var Vue = (function () {
|
|
|
8905
8931
|
else {
|
|
8906
8932
|
// prev children was text OR null
|
|
8907
8933
|
// new children is array OR null
|
|
8908
|
-
if (prevShapeFlag & 8 /* TEXT_CHILDREN */) {
|
|
8934
|
+
if (prevShapeFlag & 8 /* ShapeFlags.TEXT_CHILDREN */) {
|
|
8909
8935
|
hostSetElementText(container, '');
|
|
8910
8936
|
}
|
|
8911
8937
|
// mount new if array
|
|
8912
|
-
if (shapeFlag & 16 /* ARRAY_CHILDREN */) {
|
|
8938
|
+
if (shapeFlag & 16 /* ShapeFlags.ARRAY_CHILDREN */) {
|
|
8913
8939
|
mountChildren(c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
|
|
8914
8940
|
}
|
|
8915
8941
|
}
|
|
@@ -9100,7 +9126,7 @@ var Vue = (function () {
|
|
|
9100
9126
|
// There is no stable subsequence (e.g. a reverse)
|
|
9101
9127
|
// OR current node is not among the stable sequence
|
|
9102
9128
|
if (j < 0 || i !== increasingNewIndexSequence[j]) {
|
|
9103
|
-
move(nextChild, container, anchor, 2 /* REORDER */);
|
|
9129
|
+
move(nextChild, container, anchor, 2 /* MoveType.REORDER */);
|
|
9104
9130
|
}
|
|
9105
9131
|
else {
|
|
9106
9132
|
j--;
|
|
@@ -9111,15 +9137,15 @@ var Vue = (function () {
|
|
|
9111
9137
|
};
|
|
9112
9138
|
const move = (vnode, container, anchor, moveType, parentSuspense = null) => {
|
|
9113
9139
|
const { el, type, transition, children, shapeFlag } = vnode;
|
|
9114
|
-
if (shapeFlag & 6 /* COMPONENT */) {
|
|
9140
|
+
if (shapeFlag & 6 /* ShapeFlags.COMPONENT */) {
|
|
9115
9141
|
move(vnode.component.subTree, container, anchor, moveType);
|
|
9116
9142
|
return;
|
|
9117
9143
|
}
|
|
9118
|
-
if (shapeFlag & 128 /* SUSPENSE */) {
|
|
9144
|
+
if (shapeFlag & 128 /* ShapeFlags.SUSPENSE */) {
|
|
9119
9145
|
vnode.suspense.move(container, anchor, moveType);
|
|
9120
9146
|
return;
|
|
9121
9147
|
}
|
|
9122
|
-
if (shapeFlag & 64 /* TELEPORT */) {
|
|
9148
|
+
if (shapeFlag & 64 /* ShapeFlags.TELEPORT */) {
|
|
9123
9149
|
type.move(vnode, container, anchor, internals);
|
|
9124
9150
|
return;
|
|
9125
9151
|
}
|
|
@@ -9136,11 +9162,11 @@ var Vue = (function () {
|
|
|
9136
9162
|
return;
|
|
9137
9163
|
}
|
|
9138
9164
|
// single nodes
|
|
9139
|
-
const needTransition = moveType !== 2 /* REORDER */ &&
|
|
9140
|
-
shapeFlag & 1 /* ELEMENT */ &&
|
|
9165
|
+
const needTransition = moveType !== 2 /* MoveType.REORDER */ &&
|
|
9166
|
+
shapeFlag & 1 /* ShapeFlags.ELEMENT */ &&
|
|
9141
9167
|
transition;
|
|
9142
9168
|
if (needTransition) {
|
|
9143
|
-
if (moveType === 0 /* ENTER */) {
|
|
9169
|
+
if (moveType === 0 /* MoveType.ENTER */) {
|
|
9144
9170
|
transition.beforeEnter(el);
|
|
9145
9171
|
hostInsert(el, container, anchor);
|
|
9146
9172
|
queuePostRenderEffect(() => transition.enter(el), parentSuspense);
|
|
@@ -9172,42 +9198,42 @@ var Vue = (function () {
|
|
|
9172
9198
|
if (ref != null) {
|
|
9173
9199
|
setRef(ref, null, parentSuspense, vnode, true);
|
|
9174
9200
|
}
|
|
9175
|
-
if (shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */) {
|
|
9201
|
+
if (shapeFlag & 256 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */) {
|
|
9176
9202
|
parentComponent.ctx.deactivate(vnode);
|
|
9177
9203
|
return;
|
|
9178
9204
|
}
|
|
9179
|
-
const shouldInvokeDirs = shapeFlag & 1 /* ELEMENT */ && dirs;
|
|
9205
|
+
const shouldInvokeDirs = shapeFlag & 1 /* ShapeFlags.ELEMENT */ && dirs;
|
|
9180
9206
|
const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);
|
|
9181
9207
|
let vnodeHook;
|
|
9182
9208
|
if (shouldInvokeVnodeHook &&
|
|
9183
9209
|
(vnodeHook = props && props.onVnodeBeforeUnmount)) {
|
|
9184
9210
|
invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
9185
9211
|
}
|
|
9186
|
-
if (shapeFlag & 6 /* COMPONENT */) {
|
|
9212
|
+
if (shapeFlag & 6 /* ShapeFlags.COMPONENT */) {
|
|
9187
9213
|
unmountComponent(vnode.component, parentSuspense, doRemove);
|
|
9188
9214
|
}
|
|
9189
9215
|
else {
|
|
9190
|
-
if (shapeFlag & 128 /* SUSPENSE */) {
|
|
9216
|
+
if (shapeFlag & 128 /* ShapeFlags.SUSPENSE */) {
|
|
9191
9217
|
vnode.suspense.unmount(parentSuspense, doRemove);
|
|
9192
9218
|
return;
|
|
9193
9219
|
}
|
|
9194
9220
|
if (shouldInvokeDirs) {
|
|
9195
9221
|
invokeDirectiveHook(vnode, null, parentComponent, 'beforeUnmount');
|
|
9196
9222
|
}
|
|
9197
|
-
if (shapeFlag & 64 /* TELEPORT */) {
|
|
9223
|
+
if (shapeFlag & 64 /* ShapeFlags.TELEPORT */) {
|
|
9198
9224
|
vnode.type.remove(vnode, parentComponent, parentSuspense, optimized, internals, doRemove);
|
|
9199
9225
|
}
|
|
9200
9226
|
else if (dynamicChildren &&
|
|
9201
9227
|
// #1153: fast path should not be taken for non-stable (v-for) fragments
|
|
9202
9228
|
(type !== Fragment ||
|
|
9203
|
-
(patchFlag > 0 && patchFlag & 64 /* STABLE_FRAGMENT */))) {
|
|
9229
|
+
(patchFlag > 0 && patchFlag & 64 /* PatchFlags.STABLE_FRAGMENT */))) {
|
|
9204
9230
|
// fast path for block nodes: only need to unmount dynamic children.
|
|
9205
9231
|
unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);
|
|
9206
9232
|
}
|
|
9207
9233
|
else if ((type === Fragment &&
|
|
9208
9234
|
patchFlag &
|
|
9209
|
-
(128 /* KEYED_FRAGMENT */ | 256 /* UNKEYED_FRAGMENT */)) ||
|
|
9210
|
-
(!optimized && shapeFlag & 16 /* ARRAY_CHILDREN */)) {
|
|
9235
|
+
(128 /* PatchFlags.KEYED_FRAGMENT */ | 256 /* PatchFlags.UNKEYED_FRAGMENT */)) ||
|
|
9236
|
+
(!optimized && shapeFlag & 16 /* ShapeFlags.ARRAY_CHILDREN */)) {
|
|
9211
9237
|
unmountChildren(children, parentComponent, parentSuspense);
|
|
9212
9238
|
}
|
|
9213
9239
|
if (doRemove) {
|
|
@@ -9228,7 +9254,7 @@ var Vue = (function () {
|
|
|
9228
9254
|
const { type, el, anchor, transition } = vnode;
|
|
9229
9255
|
if (type === Fragment) {
|
|
9230
9256
|
if (vnode.patchFlag > 0 &&
|
|
9231
|
-
vnode.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */ &&
|
|
9257
|
+
vnode.patchFlag & 2048 /* PatchFlags.DEV_ROOT_FRAGMENT */ &&
|
|
9232
9258
|
transition &&
|
|
9233
9259
|
!transition.persisted) {
|
|
9234
9260
|
vnode.children.forEach(child => {
|
|
@@ -9255,7 +9281,7 @@ var Vue = (function () {
|
|
|
9255
9281
|
transition.afterLeave();
|
|
9256
9282
|
}
|
|
9257
9283
|
};
|
|
9258
|
-
if (vnode.shapeFlag & 1 /* ELEMENT */ &&
|
|
9284
|
+
if (vnode.shapeFlag & 1 /* ShapeFlags.ELEMENT */ &&
|
|
9259
9285
|
transition &&
|
|
9260
9286
|
!transition.persisted) {
|
|
9261
9287
|
const { leave, delayLeave } = transition;
|
|
@@ -9291,7 +9317,7 @@ var Vue = (function () {
|
|
|
9291
9317
|
if (bum) {
|
|
9292
9318
|
invokeArrayFns(bum);
|
|
9293
9319
|
}
|
|
9294
|
-
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */, instance)) {
|
|
9320
|
+
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
9295
9321
|
instance.emit('hook:beforeDestroy');
|
|
9296
9322
|
}
|
|
9297
9323
|
// stop effects in component scope
|
|
@@ -9307,7 +9333,7 @@ var Vue = (function () {
|
|
|
9307
9333
|
if (um) {
|
|
9308
9334
|
queuePostRenderEffect(um, parentSuspense);
|
|
9309
9335
|
}
|
|
9310
|
-
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */, instance)) {
|
|
9336
|
+
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
9311
9337
|
queuePostRenderEffect(() => instance.emit('hook:destroyed'), parentSuspense);
|
|
9312
9338
|
}
|
|
9313
9339
|
queuePostRenderEffect(() => {
|
|
@@ -9337,10 +9363,10 @@ var Vue = (function () {
|
|
|
9337
9363
|
}
|
|
9338
9364
|
};
|
|
9339
9365
|
const getNextHostNode = vnode => {
|
|
9340
|
-
if (vnode.shapeFlag & 6 /* COMPONENT */) {
|
|
9366
|
+
if (vnode.shapeFlag & 6 /* ShapeFlags.COMPONENT */) {
|
|
9341
9367
|
return getNextHostNode(vnode.component.subTree);
|
|
9342
9368
|
}
|
|
9343
|
-
if (vnode.shapeFlag & 128 /* SUSPENSE */) {
|
|
9369
|
+
if (vnode.shapeFlag & 128 /* ShapeFlags.SUSPENSE */) {
|
|
9344
9370
|
return vnode.suspense.next();
|
|
9345
9371
|
}
|
|
9346
9372
|
return hostNextSibling((vnode.anchor || vnode.el));
|
|
@@ -9354,6 +9380,7 @@ var Vue = (function () {
|
|
|
9354
9380
|
else {
|
|
9355
9381
|
patch(container._vnode || null, vnode, container, null, null, null, isSVG);
|
|
9356
9382
|
}
|
|
9383
|
+
flushPreFlushCbs();
|
|
9357
9384
|
flushPostFlushCbs();
|
|
9358
9385
|
container._vnode = vnode;
|
|
9359
9386
|
};
|
|
@@ -9403,8 +9430,8 @@ var Vue = (function () {
|
|
|
9403
9430
|
// guaranteed to be vnodes
|
|
9404
9431
|
const c1 = ch1[i];
|
|
9405
9432
|
let c2 = ch2[i];
|
|
9406
|
-
if (c2.shapeFlag & 1 /* ELEMENT */ && !c2.dynamicChildren) {
|
|
9407
|
-
if (c2.patchFlag <= 0 || c2.patchFlag === 32 /* HYDRATE_EVENTS */) {
|
|
9433
|
+
if (c2.shapeFlag & 1 /* ShapeFlags.ELEMENT */ && !c2.dynamicChildren) {
|
|
9434
|
+
if (c2.patchFlag <= 0 || c2.patchFlag === 32 /* PatchFlags.HYDRATE_EVENTS */) {
|
|
9408
9435
|
c2 = ch2[i] = cloneIfMounted(ch2[i]);
|
|
9409
9436
|
c2.el = c1.el;
|
|
9410
9437
|
}
|
|
@@ -9524,7 +9551,7 @@ var Vue = (function () {
|
|
|
9524
9551
|
const mount = (container, anchor) => {
|
|
9525
9552
|
// Teleport *always* has Array children. This is enforced in both the
|
|
9526
9553
|
// compiler and vnode children normalization.
|
|
9527
|
-
if (shapeFlag & 16 /* ARRAY_CHILDREN */) {
|
|
9554
|
+
if (shapeFlag & 16 /* ShapeFlags.ARRAY_CHILDREN */) {
|
|
9528
9555
|
mountChildren(children, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
|
|
9529
9556
|
}
|
|
9530
9557
|
};
|
|
@@ -9560,7 +9587,7 @@ var Vue = (function () {
|
|
|
9560
9587
|
if (!wasDisabled) {
|
|
9561
9588
|
// enabled -> disabled
|
|
9562
9589
|
// move into main container
|
|
9563
|
-
moveTeleport(n2, container, mainAnchor, internals, 1 /* TOGGLE */);
|
|
9590
|
+
moveTeleport(n2, container, mainAnchor, internals, 1 /* TeleportMoveTypes.TOGGLE */);
|
|
9564
9591
|
}
|
|
9565
9592
|
}
|
|
9566
9593
|
else {
|
|
@@ -9568,7 +9595,7 @@ var Vue = (function () {
|
|
|
9568
9595
|
if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) {
|
|
9569
9596
|
const nextTarget = (n2.target = resolveTarget(n2.props, querySelector));
|
|
9570
9597
|
if (nextTarget) {
|
|
9571
|
-
moveTeleport(n2, nextTarget, null, internals, 0 /* TARGET_CHANGE */);
|
|
9598
|
+
moveTeleport(n2, nextTarget, null, internals, 0 /* TeleportMoveTypes.TARGET_CHANGE */);
|
|
9572
9599
|
}
|
|
9573
9600
|
else {
|
|
9574
9601
|
warn$1('Invalid Teleport target on update:', target, `(${typeof target})`);
|
|
@@ -9577,7 +9604,7 @@ var Vue = (function () {
|
|
|
9577
9604
|
else if (wasDisabled) {
|
|
9578
9605
|
// disabled -> enabled
|
|
9579
9606
|
// move into teleport target
|
|
9580
|
-
moveTeleport(n2, target, targetAnchor, internals, 1 /* TOGGLE */);
|
|
9607
|
+
moveTeleport(n2, target, targetAnchor, internals, 1 /* TeleportMoveTypes.TOGGLE */);
|
|
9581
9608
|
}
|
|
9582
9609
|
}
|
|
9583
9610
|
}
|
|
@@ -9590,7 +9617,7 @@ var Vue = (function () {
|
|
|
9590
9617
|
// an unmounted teleport should always remove its children if not disabled
|
|
9591
9618
|
if (doRemove || !isTeleportDisabled(props)) {
|
|
9592
9619
|
hostRemove(anchor);
|
|
9593
|
-
if (shapeFlag & 16 /* ARRAY_CHILDREN */) {
|
|
9620
|
+
if (shapeFlag & 16 /* ShapeFlags.ARRAY_CHILDREN */) {
|
|
9594
9621
|
for (let i = 0; i < children.length; i++) {
|
|
9595
9622
|
const child = children[i];
|
|
9596
9623
|
unmount(child, parentComponent, parentSuspense, true, !!child.dynamicChildren);
|
|
@@ -9601,13 +9628,13 @@ var Vue = (function () {
|
|
|
9601
9628
|
move: moveTeleport,
|
|
9602
9629
|
hydrate: hydrateTeleport
|
|
9603
9630
|
};
|
|
9604
|
-
function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2 /* REORDER */) {
|
|
9631
|
+
function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2 /* TeleportMoveTypes.REORDER */) {
|
|
9605
9632
|
// move target anchor if this is a target change.
|
|
9606
|
-
if (moveType === 0 /* TARGET_CHANGE */) {
|
|
9633
|
+
if (moveType === 0 /* TeleportMoveTypes.TARGET_CHANGE */) {
|
|
9607
9634
|
insert(vnode.targetAnchor, container, parentAnchor);
|
|
9608
9635
|
}
|
|
9609
9636
|
const { el, anchor, shapeFlag, children, props } = vnode;
|
|
9610
|
-
const isReorder = moveType === 2 /* REORDER */;
|
|
9637
|
+
const isReorder = moveType === 2 /* TeleportMoveTypes.REORDER */;
|
|
9611
9638
|
// move main view anchor if this is a re-order.
|
|
9612
9639
|
if (isReorder) {
|
|
9613
9640
|
insert(el, container, parentAnchor);
|
|
@@ -9617,9 +9644,9 @@ var Vue = (function () {
|
|
|
9617
9644
|
// is not a reorder, or the teleport is disabled
|
|
9618
9645
|
if (!isReorder || isTeleportDisabled(props)) {
|
|
9619
9646
|
// Teleport has either Array children or no children.
|
|
9620
|
-
if (shapeFlag & 16 /* ARRAY_CHILDREN */) {
|
|
9647
|
+
if (shapeFlag & 16 /* ShapeFlags.ARRAY_CHILDREN */) {
|
|
9621
9648
|
for (let i = 0; i < children.length; i++) {
|
|
9622
|
-
move(children[i], container, parentAnchor, 2 /* REORDER */);
|
|
9649
|
+
move(children[i], container, parentAnchor, 2 /* MoveType.REORDER */);
|
|
9623
9650
|
}
|
|
9624
9651
|
}
|
|
9625
9652
|
}
|
|
@@ -9634,7 +9661,7 @@ var Vue = (function () {
|
|
|
9634
9661
|
// if multiple teleports rendered to the same target element, we need to
|
|
9635
9662
|
// pick up from where the last teleport finished instead of the first node
|
|
9636
9663
|
const targetNode = target._lpa || target.firstChild;
|
|
9637
|
-
if (vnode.shapeFlag & 16 /* ARRAY_CHILDREN */) {
|
|
9664
|
+
if (vnode.shapeFlag & 16 /* ShapeFlags.ARRAY_CHILDREN */) {
|
|
9638
9665
|
if (isTeleportDisabled(vnode.props)) {
|
|
9639
9666
|
vnode.anchor = hydrateChildren(nextSibling(node), vnode, parentNode(node), parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
9640
9667
|
vnode.targetAnchor = targetNode;
|
|
@@ -9711,7 +9738,7 @@ var Vue = (function () {
|
|
|
9711
9738
|
}
|
|
9712
9739
|
// 2.x async component
|
|
9713
9740
|
if (isFunction(comp) &&
|
|
9714
|
-
checkCompatEnabled("COMPONENT_ASYNC" /* COMPONENT_ASYNC */, instance, comp)) {
|
|
9741
|
+
checkCompatEnabled("COMPONENT_ASYNC" /* DeprecationTypes.COMPONENT_ASYNC */, instance, comp)) {
|
|
9715
9742
|
// since after disabling this, plain functions are still valid usage, do not
|
|
9716
9743
|
// use softAssert here.
|
|
9717
9744
|
return convertLegacyAsyncComponent(comp);
|
|
@@ -9719,7 +9746,7 @@ var Vue = (function () {
|
|
|
9719
9746
|
// 2.x functional component
|
|
9720
9747
|
if (isObject(comp) &&
|
|
9721
9748
|
comp.functional &&
|
|
9722
|
-
softAssertCompatEnabled("COMPONENT_FUNCTIONAL" /* COMPONENT_FUNCTIONAL */, instance, comp)) {
|
|
9749
|
+
softAssertCompatEnabled("COMPONENT_FUNCTIONAL" /* DeprecationTypes.COMPONENT_FUNCTIONAL */, instance, comp)) {
|
|
9723
9750
|
return convertLegacyFunctionalComponent(comp);
|
|
9724
9751
|
}
|
|
9725
9752
|
return comp;
|
|
@@ -9816,7 +9843,7 @@ var Vue = (function () {
|
|
|
9816
9843
|
return value ? value.__v_isVNode === true : false;
|
|
9817
9844
|
}
|
|
9818
9845
|
function isSameVNodeType(n1, n2) {
|
|
9819
|
-
if (n2.shapeFlag & 6 /* COMPONENT */ &&
|
|
9846
|
+
if (n2.shapeFlag & 6 /* ShapeFlags.COMPONENT */ &&
|
|
9820
9847
|
hmrDirtyComponents.has(n2.type)) {
|
|
9821
9848
|
// HMR only: if the component has been hot-updated, force a reload.
|
|
9822
9849
|
return false;
|
|
@@ -9847,7 +9874,7 @@ var Vue = (function () {
|
|
|
9847
9874
|
: ref
|
|
9848
9875
|
: null);
|
|
9849
9876
|
};
|
|
9850
|
-
function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1 /* ELEMENT */, isBlockNode = false, needFullChildrenNormalization = false) {
|
|
9877
|
+
function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1 /* ShapeFlags.ELEMENT */, isBlockNode = false, needFullChildrenNormalization = false) {
|
|
9851
9878
|
const vnode = {
|
|
9852
9879
|
__v_isVNode: true,
|
|
9853
9880
|
__v_skip: true,
|
|
@@ -9878,7 +9905,7 @@ var Vue = (function () {
|
|
|
9878
9905
|
if (needFullChildrenNormalization) {
|
|
9879
9906
|
normalizeChildren(vnode, children);
|
|
9880
9907
|
// normalize suspense children
|
|
9881
|
-
if (shapeFlag & 128 /* SUSPENSE */) {
|
|
9908
|
+
if (shapeFlag & 128 /* ShapeFlags.SUSPENSE */) {
|
|
9882
9909
|
type.normalize(vnode);
|
|
9883
9910
|
}
|
|
9884
9911
|
}
|
|
@@ -9886,8 +9913,8 @@ var Vue = (function () {
|
|
|
9886
9913
|
// compiled element vnode - if children is passed, only possible types are
|
|
9887
9914
|
// string or Array.
|
|
9888
9915
|
vnode.shapeFlag |= isString(children)
|
|
9889
|
-
? 8 /* TEXT_CHILDREN */
|
|
9890
|
-
: 16 /* ARRAY_CHILDREN */;
|
|
9916
|
+
? 8 /* ShapeFlags.TEXT_CHILDREN */
|
|
9917
|
+
: 16 /* ShapeFlags.ARRAY_CHILDREN */;
|
|
9891
9918
|
}
|
|
9892
9919
|
// validate key
|
|
9893
9920
|
if (vnode.key !== vnode.key) {
|
|
@@ -9903,10 +9930,10 @@ var Vue = (function () {
|
|
|
9903
9930
|
// component nodes also should always be patched, because even if the
|
|
9904
9931
|
// component doesn't need to update, it needs to persist the instance on to
|
|
9905
9932
|
// the next vnode so that it can be properly unmounted later.
|
|
9906
|
-
(vnode.patchFlag > 0 || shapeFlag & 6 /* COMPONENT */) &&
|
|
9933
|
+
(vnode.patchFlag > 0 || shapeFlag & 6 /* ShapeFlags.COMPONENT */) &&
|
|
9907
9934
|
// the EVENTS flag is only for hydration and if it is the only flag, the
|
|
9908
9935
|
// vnode should not be considered dynamic due to handler caching.
|
|
9909
|
-
vnode.patchFlag !== 32 /* HYDRATE_EVENTS */) {
|
|
9936
|
+
vnode.patchFlag !== 32 /* PatchFlags.HYDRATE_EVENTS */) {
|
|
9910
9937
|
currentBlock.push(vnode);
|
|
9911
9938
|
}
|
|
9912
9939
|
{
|
|
@@ -9932,14 +9959,14 @@ var Vue = (function () {
|
|
|
9932
9959
|
normalizeChildren(cloned, children);
|
|
9933
9960
|
}
|
|
9934
9961
|
if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) {
|
|
9935
|
-
if (cloned.shapeFlag & 6 /* COMPONENT */) {
|
|
9962
|
+
if (cloned.shapeFlag & 6 /* ShapeFlags.COMPONENT */) {
|
|
9936
9963
|
currentBlock[currentBlock.indexOf(type)] = cloned;
|
|
9937
9964
|
}
|
|
9938
9965
|
else {
|
|
9939
9966
|
currentBlock.push(cloned);
|
|
9940
9967
|
}
|
|
9941
9968
|
}
|
|
9942
|
-
cloned.patchFlag |= -2 /* BAIL */;
|
|
9969
|
+
cloned.patchFlag |= -2 /* PatchFlags.BAIL */;
|
|
9943
9970
|
return cloned;
|
|
9944
9971
|
}
|
|
9945
9972
|
// class component normalization.
|
|
@@ -9969,17 +9996,17 @@ var Vue = (function () {
|
|
|
9969
9996
|
}
|
|
9970
9997
|
// encode the vnode type information into a bitmap
|
|
9971
9998
|
const shapeFlag = isString(type)
|
|
9972
|
-
? 1 /* ELEMENT */
|
|
9999
|
+
? 1 /* ShapeFlags.ELEMENT */
|
|
9973
10000
|
: isSuspense(type)
|
|
9974
|
-
? 128 /* SUSPENSE */
|
|
10001
|
+
? 128 /* ShapeFlags.SUSPENSE */
|
|
9975
10002
|
: isTeleport(type)
|
|
9976
|
-
? 64 /* TELEPORT */
|
|
10003
|
+
? 64 /* ShapeFlags.TELEPORT */
|
|
9977
10004
|
: isObject(type)
|
|
9978
|
-
? 4 /* STATEFUL_COMPONENT */
|
|
10005
|
+
? 4 /* ShapeFlags.STATEFUL_COMPONENT */
|
|
9979
10006
|
: isFunction(type)
|
|
9980
|
-
? 2 /* FUNCTIONAL_COMPONENT */
|
|
10007
|
+
? 2 /* ShapeFlags.FUNCTIONAL_COMPONENT */
|
|
9981
10008
|
: 0;
|
|
9982
|
-
if (shapeFlag & 4 /* STATEFUL_COMPONENT */ && isProxy(type)) {
|
|
10009
|
+
if (shapeFlag & 4 /* ShapeFlags.STATEFUL_COMPONENT */ && isProxy(type)) {
|
|
9983
10010
|
type = toRaw(type);
|
|
9984
10011
|
warn$1(`Vue received a Component which was made a reactive object. This can ` +
|
|
9985
10012
|
`lead to unnecessary performance overhead, and should be avoided by ` +
|
|
@@ -10018,7 +10045,7 @@ var Vue = (function () {
|
|
|
10018
10045
|
: ref,
|
|
10019
10046
|
scopeId: vnode.scopeId,
|
|
10020
10047
|
slotScopeIds: vnode.slotScopeIds,
|
|
10021
|
-
children: patchFlag === -1 /* HOISTED */ && isArray(children)
|
|
10048
|
+
children: patchFlag === -1 /* PatchFlags.HOISTED */ && isArray(children)
|
|
10022
10049
|
? children.map(deepCloneVNode)
|
|
10023
10050
|
: children,
|
|
10024
10051
|
target: vnode.target,
|
|
@@ -10031,8 +10058,8 @@ var Vue = (function () {
|
|
|
10031
10058
|
// fast paths only.
|
|
10032
10059
|
patchFlag: extraProps && vnode.type !== Fragment
|
|
10033
10060
|
? patchFlag === -1 // hoisted node
|
|
10034
|
-
? 16 /* FULL_PROPS */
|
|
10035
|
-
: patchFlag | 16 /* FULL_PROPS */
|
|
10061
|
+
? 16 /* PatchFlags.FULL_PROPS */
|
|
10062
|
+
: patchFlag | 16 /* PatchFlags.FULL_PROPS */
|
|
10036
10063
|
: patchFlag,
|
|
10037
10064
|
dynamicProps: vnode.dynamicProps,
|
|
10038
10065
|
dynamicChildren: vnode.dynamicChildren,
|
|
@@ -10125,10 +10152,10 @@ var Vue = (function () {
|
|
|
10125
10152
|
children = null;
|
|
10126
10153
|
}
|
|
10127
10154
|
else if (isArray(children)) {
|
|
10128
|
-
type = 16 /* ARRAY_CHILDREN */;
|
|
10155
|
+
type = 16 /* ShapeFlags.ARRAY_CHILDREN */;
|
|
10129
10156
|
}
|
|
10130
10157
|
else if (typeof children === 'object') {
|
|
10131
|
-
if (shapeFlag & (1 /* ELEMENT */ | 64 /* TELEPORT */)) {
|
|
10158
|
+
if (shapeFlag & (1 /* ShapeFlags.ELEMENT */ | 64 /* ShapeFlags.TELEPORT */)) {
|
|
10132
10159
|
// Normalize slot to plain children for plain element and Teleport
|
|
10133
10160
|
const slot = children.default;
|
|
10134
10161
|
if (slot) {
|
|
@@ -10140,37 +10167,37 @@ var Vue = (function () {
|
|
|
10140
10167
|
return;
|
|
10141
10168
|
}
|
|
10142
10169
|
else {
|
|
10143
|
-
type = 32 /* SLOTS_CHILDREN */;
|
|
10170
|
+
type = 32 /* ShapeFlags.SLOTS_CHILDREN */;
|
|
10144
10171
|
const slotFlag = children._;
|
|
10145
10172
|
if (!slotFlag && !(InternalObjectKey in children)) {
|
|
10146
10173
|
children._ctx = currentRenderingInstance;
|
|
10147
10174
|
}
|
|
10148
|
-
else if (slotFlag === 3 /* FORWARDED */ && currentRenderingInstance) {
|
|
10175
|
+
else if (slotFlag === 3 /* SlotFlags.FORWARDED */ && currentRenderingInstance) {
|
|
10149
10176
|
// a child component receives forwarded slots from the parent.
|
|
10150
10177
|
// its slot type is determined by its parent's slot type.
|
|
10151
|
-
if (currentRenderingInstance.slots._ === 1 /* STABLE */) {
|
|
10152
|
-
children._ = 1 /* STABLE */;
|
|
10178
|
+
if (currentRenderingInstance.slots._ === 1 /* SlotFlags.STABLE */) {
|
|
10179
|
+
children._ = 1 /* SlotFlags.STABLE */;
|
|
10153
10180
|
}
|
|
10154
10181
|
else {
|
|
10155
|
-
children._ = 2 /* DYNAMIC */;
|
|
10156
|
-
vnode.patchFlag |= 1024 /* DYNAMIC_SLOTS */;
|
|
10182
|
+
children._ = 2 /* SlotFlags.DYNAMIC */;
|
|
10183
|
+
vnode.patchFlag |= 1024 /* PatchFlags.DYNAMIC_SLOTS */;
|
|
10157
10184
|
}
|
|
10158
10185
|
}
|
|
10159
10186
|
}
|
|
10160
10187
|
}
|
|
10161
10188
|
else if (isFunction(children)) {
|
|
10162
10189
|
children = { default: children, _ctx: currentRenderingInstance };
|
|
10163
|
-
type = 32 /* SLOTS_CHILDREN */;
|
|
10190
|
+
type = 32 /* ShapeFlags.SLOTS_CHILDREN */;
|
|
10164
10191
|
}
|
|
10165
10192
|
else {
|
|
10166
10193
|
children = String(children);
|
|
10167
10194
|
// force teleport children to array so it can be moved around
|
|
10168
|
-
if (shapeFlag & 64 /* TELEPORT */) {
|
|
10169
|
-
type = 16 /* ARRAY_CHILDREN */;
|
|
10195
|
+
if (shapeFlag & 64 /* ShapeFlags.TELEPORT */) {
|
|
10196
|
+
type = 16 /* ShapeFlags.ARRAY_CHILDREN */;
|
|
10170
10197
|
children = [createTextVNode(children)];
|
|
10171
10198
|
}
|
|
10172
10199
|
else {
|
|
10173
|
-
type = 8 /* TEXT_CHILDREN */;
|
|
10200
|
+
type = 8 /* ShapeFlags.TEXT_CHILDREN */;
|
|
10174
10201
|
}
|
|
10175
10202
|
}
|
|
10176
10203
|
vnode.children = children;
|
|
@@ -10208,7 +10235,7 @@ var Vue = (function () {
|
|
|
10208
10235
|
return ret;
|
|
10209
10236
|
}
|
|
10210
10237
|
function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
|
|
10211
|
-
callWithAsyncErrorHandling(hook, instance, 7 /* VNODE_HOOK */, [
|
|
10238
|
+
callWithAsyncErrorHandling(hook, instance, 7 /* ErrorCodes.VNODE_HOOK */, [
|
|
10212
10239
|
vnode,
|
|
10213
10240
|
prevVNode
|
|
10214
10241
|
]);
|
|
@@ -10316,7 +10343,7 @@ var Vue = (function () {
|
|
|
10316
10343
|
}
|
|
10317
10344
|
}
|
|
10318
10345
|
function isStatefulComponent(instance) {
|
|
10319
|
-
return instance.vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */;
|
|
10346
|
+
return instance.vnode.shapeFlag & 4 /* ShapeFlags.STATEFUL_COMPONENT */;
|
|
10320
10347
|
}
|
|
10321
10348
|
let isInSSRComponentSetup = false;
|
|
10322
10349
|
function setupComponent(instance, isSSR = false) {
|
|
@@ -10371,7 +10398,7 @@ var Vue = (function () {
|
|
|
10371
10398
|
setup.length > 1 ? createSetupContext(instance) : null);
|
|
10372
10399
|
setCurrentInstance(instance);
|
|
10373
10400
|
pauseTracking();
|
|
10374
|
-
const setupResult = callWithErrorHandling(setup, instance, 0 /* SETUP_FUNCTION */, [shallowReadonly(instance.props) , setupContext]);
|
|
10401
|
+
const setupResult = callWithErrorHandling(setup, instance, 0 /* ErrorCodes.SETUP_FUNCTION */, [shallowReadonly(instance.props) , setupContext]);
|
|
10375
10402
|
resetTracking();
|
|
10376
10403
|
unsetCurrentInstance();
|
|
10377
10404
|
if (isPromise(setupResult)) {
|
|
@@ -10383,7 +10410,7 @@ var Vue = (function () {
|
|
|
10383
10410
|
handleSetupResult(instance, resolvedResult, isSSR);
|
|
10384
10411
|
})
|
|
10385
10412
|
.catch(e => {
|
|
10386
|
-
handleError(e, instance, 0 /* SETUP_FUNCTION */);
|
|
10413
|
+
handleError(e, instance, 0 /* ErrorCodes.SETUP_FUNCTION */);
|
|
10387
10414
|
});
|
|
10388
10415
|
}
|
|
10389
10416
|
else {
|
|
@@ -10481,6 +10508,7 @@ var Vue = (function () {
|
|
|
10481
10508
|
// pass runtime compat config into the compiler
|
|
10482
10509
|
finalCompilerOptions.compatConfig = Object.create(globalCompatConfig);
|
|
10483
10510
|
if (Component.compatConfig) {
|
|
10511
|
+
// @ts-expect-error types are not compatible
|
|
10484
10512
|
extend(finalCompilerOptions.compatConfig, Component.compatConfig);
|
|
10485
10513
|
}
|
|
10486
10514
|
}
|
|
@@ -10525,7 +10553,7 @@ var Vue = (function () {
|
|
|
10525
10553
|
return new Proxy(instance.attrs, {
|
|
10526
10554
|
get(target, key) {
|
|
10527
10555
|
markAttrsAccessed();
|
|
10528
|
-
track(instance, "get" /* GET */, '$attrs');
|
|
10556
|
+
track(instance, "get" /* TrackOpTypes.GET */, '$attrs');
|
|
10529
10557
|
return target[key];
|
|
10530
10558
|
},
|
|
10531
10559
|
set() {
|
|
@@ -11023,7 +11051,7 @@ var Vue = (function () {
|
|
|
11023
11051
|
}
|
|
11024
11052
|
|
|
11025
11053
|
// Core API ------------------------------------------------------------------
|
|
11026
|
-
const version = "3.2.
|
|
11054
|
+
const version = "3.2.38";
|
|
11027
11055
|
/**
|
|
11028
11056
|
* SSR utils for \@vue/server-renderer. Only exposed in ssr-possible builds.
|
|
11029
11057
|
* @internal
|
|
@@ -11273,14 +11301,14 @@ var Vue = (function () {
|
|
|
11273
11301
|
? 'true'
|
|
11274
11302
|
: null;
|
|
11275
11303
|
if (v2CocercedValue &&
|
|
11276
|
-
compatUtils.softAssertCompatEnabled("ATTR_ENUMERATED_COERCION" /* ATTR_ENUMERATED_COERCION */, instance, key, value, v2CocercedValue)) {
|
|
11304
|
+
compatUtils.softAssertCompatEnabled("ATTR_ENUMERATED_COERCION" /* DeprecationTypes.ATTR_ENUMERATED_COERCION */, instance, key, value, v2CocercedValue)) {
|
|
11277
11305
|
el.setAttribute(key, v2CocercedValue);
|
|
11278
11306
|
return true;
|
|
11279
11307
|
}
|
|
11280
11308
|
}
|
|
11281
11309
|
else if (value === false &&
|
|
11282
11310
|
!isSpecialBooleanAttr(key) &&
|
|
11283
|
-
compatUtils.softAssertCompatEnabled("ATTR_FALSE_VALUE" /* ATTR_FALSE_VALUE */, instance, key)) {
|
|
11311
|
+
compatUtils.softAssertCompatEnabled("ATTR_FALSE_VALUE" /* DeprecationTypes.ATTR_FALSE_VALUE */, instance, key)) {
|
|
11284
11312
|
el.removeAttribute(key);
|
|
11285
11313
|
return true;
|
|
11286
11314
|
}
|
|
@@ -11342,10 +11370,10 @@ var Vue = (function () {
|
|
|
11342
11370
|
}
|
|
11343
11371
|
else {
|
|
11344
11372
|
if (value === false &&
|
|
11345
|
-
compatUtils.isCompatEnabled("ATTR_FALSE_VALUE" /* ATTR_FALSE_VALUE */, parentComponent)) {
|
|
11373
|
+
compatUtils.isCompatEnabled("ATTR_FALSE_VALUE" /* DeprecationTypes.ATTR_FALSE_VALUE */, parentComponent)) {
|
|
11346
11374
|
const type = typeof el[key];
|
|
11347
11375
|
if (type === 'string' || type === 'number') {
|
|
11348
|
-
compatUtils.warnDeprecation("ATTR_FALSE_VALUE" /* ATTR_FALSE_VALUE */, parentComponent, key);
|
|
11376
|
+
compatUtils.warnDeprecation("ATTR_FALSE_VALUE" /* DeprecationTypes.ATTR_FALSE_VALUE */, parentComponent, key);
|
|
11349
11377
|
value = type === 'number' ? 0 : '';
|
|
11350
11378
|
needRemove = true;
|
|
11351
11379
|
}
|
|
@@ -11435,7 +11463,8 @@ var Vue = (function () {
|
|
|
11435
11463
|
options[m[0].toLowerCase()] = true;
|
|
11436
11464
|
}
|
|
11437
11465
|
}
|
|
11438
|
-
|
|
11466
|
+
const event = name[2] === ':' ? name.slice(3) : hyphenate(name.slice(2));
|
|
11467
|
+
return [event, options];
|
|
11439
11468
|
}
|
|
11440
11469
|
function createInvoker(initialValue, instance) {
|
|
11441
11470
|
const invoker = (e) => {
|
|
@@ -11447,7 +11476,7 @@ var Vue = (function () {
|
|
|
11447
11476
|
// AFTER it was attached.
|
|
11448
11477
|
const timeStamp = e.timeStamp || _getNow();
|
|
11449
11478
|
if (skipTimestampCheck || timeStamp >= invoker.attached - 1) {
|
|
11450
|
-
callWithAsyncErrorHandling(patchStopImmediatePropagation(e, invoker.value), instance, 5 /* NATIVE_EVENT_HANDLER */, [e]);
|
|
11479
|
+
callWithAsyncErrorHandling(patchStopImmediatePropagation(e, invoker.value), instance, 5 /* ErrorCodes.NATIVE_EVENT_HANDLER */, [e]);
|
|
11451
11480
|
}
|
|
11452
11481
|
};
|
|
11453
11482
|
invoker.value = initialValue;
|
|
@@ -11790,7 +11819,7 @@ var Vue = (function () {
|
|
|
11790
11819
|
});
|
|
11791
11820
|
}
|
|
11792
11821
|
function setVarsOnVNode(vnode, vars) {
|
|
11793
|
-
if (vnode.shapeFlag & 128 /* SUSPENSE */) {
|
|
11822
|
+
if (vnode.shapeFlag & 128 /* ShapeFlags.SUSPENSE */) {
|
|
11794
11823
|
const suspense = vnode.suspense;
|
|
11795
11824
|
vnode = suspense.activeBranch;
|
|
11796
11825
|
if (suspense.pendingBranch && !suspense.isHydrating) {
|
|
@@ -11803,7 +11832,7 @@ var Vue = (function () {
|
|
|
11803
11832
|
while (vnode.component) {
|
|
11804
11833
|
vnode = vnode.component.subTree;
|
|
11805
11834
|
}
|
|
11806
|
-
if (vnode.shapeFlag & 1 /* ELEMENT */ && vnode.el) {
|
|
11835
|
+
if (vnode.shapeFlag & 1 /* ShapeFlags.ELEMENT */ && vnode.el) {
|
|
11807
11836
|
setVarsOnNode(vnode.el, vars);
|
|
11808
11837
|
}
|
|
11809
11838
|
else if (vnode.type === Fragment) {
|
|
@@ -11892,7 +11921,7 @@ var Vue = (function () {
|
|
|
11892
11921
|
}
|
|
11893
11922
|
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;
|
|
11894
11923
|
// legacy transition class compat
|
|
11895
|
-
const legacyClassEnabled = compatUtils.isCompatEnabled("TRANSITION_CLASSES" /* TRANSITION_CLASSES */, null);
|
|
11924
|
+
const legacyClassEnabled = compatUtils.isCompatEnabled("TRANSITION_CLASSES" /* DeprecationTypes.TRANSITION_CLASSES */, null);
|
|
11896
11925
|
let legacyEnterFromClass;
|
|
11897
11926
|
let legacyAppearFromClass;
|
|
11898
11927
|
let legacyLeaveFromClass;
|
|
@@ -12201,7 +12230,7 @@ var Vue = (function () {
|
|
|
12201
12230
|
const cssTransitionProps = resolveTransitionProps(rawProps);
|
|
12202
12231
|
let tag = rawProps.tag || Fragment;
|
|
12203
12232
|
if (!rawProps.tag &&
|
|
12204
|
-
compatUtils.checkCompatEnabled("TRANSITION_GROUP_ROOT" /* TRANSITION_GROUP_ROOT */, instance.parent)) {
|
|
12233
|
+
compatUtils.checkCompatEnabled("TRANSITION_GROUP_ROOT" /* DeprecationTypes.TRANSITION_GROUP_ROOT */, instance.parent)) {
|
|
12205
12234
|
tag = 'span';
|
|
12206
12235
|
}
|
|
12207
12236
|
prevChildren = children;
|
|
@@ -12571,13 +12600,13 @@ var Vue = (function () {
|
|
|
12571
12600
|
let instance = null;
|
|
12572
12601
|
{
|
|
12573
12602
|
instance = getCurrentInstance();
|
|
12574
|
-
if (compatUtils.isCompatEnabled("CONFIG_KEY_CODES" /* CONFIG_KEY_CODES */, instance)) {
|
|
12603
|
+
if (compatUtils.isCompatEnabled("CONFIG_KEY_CODES" /* DeprecationTypes.CONFIG_KEY_CODES */, instance)) {
|
|
12575
12604
|
if (instance) {
|
|
12576
12605
|
globalKeyCodes = instance.appContext.config.keyCodes;
|
|
12577
12606
|
}
|
|
12578
12607
|
}
|
|
12579
12608
|
if (modifiers.some(m => /^\d+$/.test(m))) {
|
|
12580
|
-
compatUtils.warnDeprecation("V_ON_KEYCODE_MODIFIER" /* V_ON_KEYCODE_MODIFIER */, instance);
|
|
12609
|
+
compatUtils.warnDeprecation("V_ON_KEYCODE_MODIFIER" /* DeprecationTypes.V_ON_KEYCODE_MODIFIER */, instance);
|
|
12581
12610
|
}
|
|
12582
12611
|
}
|
|
12583
12612
|
return (event) => {
|
|
@@ -12590,7 +12619,7 @@ var Vue = (function () {
|
|
|
12590
12619
|
}
|
|
12591
12620
|
{
|
|
12592
12621
|
const keyCode = String(event.keyCode);
|
|
12593
|
-
if (compatUtils.isCompatEnabled("V_ON_KEYCODE_MODIFIER" /* V_ON_KEYCODE_MODIFIER */, instance) &&
|
|
12622
|
+
if (compatUtils.isCompatEnabled("V_ON_KEYCODE_MODIFIER" /* DeprecationTypes.V_ON_KEYCODE_MODIFIER */, instance) &&
|
|
12594
12623
|
modifiers.some(mod => mod == keyCode)) {
|
|
12595
12624
|
return fn(event);
|
|
12596
12625
|
}
|
|
@@ -12699,7 +12728,7 @@ var Vue = (function () {
|
|
|
12699
12728
|
for (let i = 0; i < container.attributes.length; i++) {
|
|
12700
12729
|
const attr = container.attributes[i];
|
|
12701
12730
|
if (attr.name !== 'v-cloak' && /^(v-|:|@)/.test(attr.name)) {
|
|
12702
|
-
compatUtils.warnDeprecation("GLOBAL_MOUNT_CONTAINER" /* GLOBAL_MOUNT_CONTAINER */, null);
|
|
12731
|
+
compatUtils.warnDeprecation("GLOBAL_MOUNT_CONTAINER" /* DeprecationTypes.GLOBAL_MOUNT_CONTAINER */, null);
|
|
12703
12732
|
break;
|
|
12704
12733
|
}
|
|
12705
12734
|
}
|
|
@@ -12956,7 +12985,7 @@ var Vue = (function () {
|
|
|
12956
12985
|
function wrappedCreateApp(...args) {
|
|
12957
12986
|
// @ts-ignore
|
|
12958
12987
|
const app = createApp(...args);
|
|
12959
|
-
if (compatUtils.isCompatEnabled("RENDER_FUNCTION" /* RENDER_FUNCTION */, null)) {
|
|
12988
|
+
if (compatUtils.isCompatEnabled("RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */, null)) {
|
|
12960
12989
|
// register built-in components so that they can be resolved via strings
|
|
12961
12990
|
// in the legacy h() call. The __compat__ prefix is to ensure that v3 h()
|
|
12962
12991
|
// doesn't get affected.
|