@vue/compat 3.4.1 → 3.4.3
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 +16 -10
- package/dist/vue.cjs.prod.js +16 -10
- package/dist/vue.esm-browser.js +16 -10
- package/dist/vue.esm-browser.prod.js +2 -2
- package/dist/vue.esm-bundler.js +16 -10
- package/dist/vue.global.js +16 -10
- package/dist/vue.global.prod.js +2 -2
- package/dist/vue.runtime.esm-browser.js +16 -10
- package/dist/vue.runtime.esm-browser.prod.js +2 -2
- package/dist/vue.runtime.esm-bundler.js +16 -10
- package/dist/vue.runtime.global.js +16 -10
- package/dist/vue.runtime.global.prod.js +2 -2
- package/package.json +2 -2
|
@@ -3874,8 +3874,8 @@ function doWatch(source, cb, {
|
|
|
3874
3874
|
getter = () => source.value;
|
|
3875
3875
|
forceTrigger = isShallow(source);
|
|
3876
3876
|
} else if (isReactive(source)) {
|
|
3877
|
-
getter = () => source;
|
|
3878
|
-
|
|
3877
|
+
getter = isShallow(source) || deep === false ? () => traverse(source, 1) : () => traverse(source);
|
|
3878
|
+
forceTrigger = true;
|
|
3879
3879
|
} else if (isArray(source)) {
|
|
3880
3880
|
isMultiSource = true;
|
|
3881
3881
|
forceTrigger = source.some((s) => isReactive(s) || isShallow(s));
|
|
@@ -3883,7 +3883,7 @@ function doWatch(source, cb, {
|
|
|
3883
3883
|
if (isRef(s)) {
|
|
3884
3884
|
return s.value;
|
|
3885
3885
|
} else if (isReactive(s)) {
|
|
3886
|
-
return traverse(s);
|
|
3886
|
+
return traverse(s, isShallow(s) || deep === false ? 1 : void 0);
|
|
3887
3887
|
} else if (isFunction(s)) {
|
|
3888
3888
|
return callWithErrorHandling(s, instance, 2);
|
|
3889
3889
|
} else {
|
|
@@ -4026,28 +4026,34 @@ function createPathGetter(ctx, path) {
|
|
|
4026
4026
|
return cur;
|
|
4027
4027
|
};
|
|
4028
4028
|
}
|
|
4029
|
-
function traverse(value, seen) {
|
|
4029
|
+
function traverse(value, depth, currentDepth = 0, seen) {
|
|
4030
4030
|
if (!isObject(value) || value["__v_skip"]) {
|
|
4031
4031
|
return value;
|
|
4032
4032
|
}
|
|
4033
|
+
if (depth && depth > 0) {
|
|
4034
|
+
if (currentDepth >= depth) {
|
|
4035
|
+
return value;
|
|
4036
|
+
}
|
|
4037
|
+
currentDepth++;
|
|
4038
|
+
}
|
|
4033
4039
|
seen = seen || /* @__PURE__ */ new Set();
|
|
4034
4040
|
if (seen.has(value)) {
|
|
4035
4041
|
return value;
|
|
4036
4042
|
}
|
|
4037
4043
|
seen.add(value);
|
|
4038
4044
|
if (isRef(value)) {
|
|
4039
|
-
traverse(value.value, seen);
|
|
4045
|
+
traverse(value.value, depth, currentDepth, seen);
|
|
4040
4046
|
} else if (isArray(value)) {
|
|
4041
4047
|
for (let i = 0; i < value.length; i++) {
|
|
4042
|
-
traverse(value[i], seen);
|
|
4048
|
+
traverse(value[i], depth, currentDepth, seen);
|
|
4043
4049
|
}
|
|
4044
4050
|
} else if (isSet(value) || isMap(value)) {
|
|
4045
4051
|
value.forEach((v) => {
|
|
4046
|
-
traverse(v, seen);
|
|
4052
|
+
traverse(v, depth, currentDepth, seen);
|
|
4047
4053
|
});
|
|
4048
4054
|
} else if (isPlainObject(value)) {
|
|
4049
4055
|
for (const key in value) {
|
|
4050
|
-
traverse(value[key], seen);
|
|
4056
|
+
traverse(value[key], depth, currentDepth, seen);
|
|
4051
4057
|
}
|
|
4052
4058
|
}
|
|
4053
4059
|
return value;
|
|
@@ -6446,7 +6452,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6446
6452
|
return vm;
|
|
6447
6453
|
}
|
|
6448
6454
|
}
|
|
6449
|
-
Vue.version = `2.6.14-compat:${"3.4.
|
|
6455
|
+
Vue.version = `2.6.14-compat:${"3.4.3"}`;
|
|
6450
6456
|
Vue.config = singletonApp.config;
|
|
6451
6457
|
Vue.use = (p, ...options) => {
|
|
6452
6458
|
if (p && isFunction(p.install)) {
|
|
@@ -11149,7 +11155,7 @@ function isMemoSame(cached, memo) {
|
|
|
11149
11155
|
return true;
|
|
11150
11156
|
}
|
|
11151
11157
|
|
|
11152
|
-
const version = "3.4.
|
|
11158
|
+
const version = "3.4.3";
|
|
11153
11159
|
const warn = warn$1 ;
|
|
11154
11160
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
11155
11161
|
const devtools = devtools$1 ;
|