vue 3.4.3 → 3.4.4
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.esm-browser.js +16 -10
- package/dist/vue.esm-browser.prod.js +3 -3
- package/dist/vue.global.js +16 -10
- package/dist/vue.global.prod.js +5 -5
- package/dist/vue.runtime.esm-browser.js +16 -10
- package/dist/vue.runtime.esm-browser.prod.js +2 -2
- package/dist/vue.runtime.global.js +16 -10
- package/dist/vue.runtime.global.prod.js +5 -5
- package/package.json +6 -6
package/dist/vue.esm-browser.js
CHANGED
|
@@ -3001,7 +3001,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
3001
3001
|
hiddenContainer,
|
|
3002
3002
|
anchor,
|
|
3003
3003
|
deps: 0,
|
|
3004
|
-
pendingId:
|
|
3004
|
+
pendingId: suspenseId++,
|
|
3005
3005
|
timeout: typeof timeout === "number" ? timeout : -1,
|
|
3006
3006
|
activeBranch: null,
|
|
3007
3007
|
pendingBranch: null,
|
|
@@ -3340,7 +3340,6 @@ function doWatch(source, cb, {
|
|
|
3340
3340
|
onTrack,
|
|
3341
3341
|
onTrigger
|
|
3342
3342
|
} = EMPTY_OBJ) {
|
|
3343
|
-
var _a;
|
|
3344
3343
|
if (cb && once) {
|
|
3345
3344
|
const _cb = cb;
|
|
3346
3345
|
cb = (...args) => {
|
|
@@ -3348,6 +3347,11 @@ function doWatch(source, cb, {
|
|
|
3348
3347
|
unwatch();
|
|
3349
3348
|
};
|
|
3350
3349
|
}
|
|
3350
|
+
if (deep !== void 0 && typeof deep === "number") {
|
|
3351
|
+
warn$1(
|
|
3352
|
+
`watch() "deep" option with number value will be used as watch depth in future versions. Please use a boolean instead to avoid potential breakage.`
|
|
3353
|
+
);
|
|
3354
|
+
}
|
|
3351
3355
|
if (!cb) {
|
|
3352
3356
|
if (immediate !== void 0) {
|
|
3353
3357
|
warn$1(
|
|
@@ -3372,7 +3376,11 @@ function doWatch(source, cb, {
|
|
|
3372
3376
|
`A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`
|
|
3373
3377
|
);
|
|
3374
3378
|
};
|
|
3375
|
-
const instance =
|
|
3379
|
+
const instance = currentInstance;
|
|
3380
|
+
const reactiveGetter = (source2) => deep === true ? source2 : (
|
|
3381
|
+
// for deep: false, only traverse root-level properties
|
|
3382
|
+
traverse(source2, deep === false ? 1 : void 0)
|
|
3383
|
+
);
|
|
3376
3384
|
let getter;
|
|
3377
3385
|
let forceTrigger = false;
|
|
3378
3386
|
let isMultiSource = false;
|
|
@@ -3380,7 +3388,7 @@ function doWatch(source, cb, {
|
|
|
3380
3388
|
getter = () => source.value;
|
|
3381
3389
|
forceTrigger = isShallow(source);
|
|
3382
3390
|
} else if (isReactive(source)) {
|
|
3383
|
-
getter =
|
|
3391
|
+
getter = () => reactiveGetter(source);
|
|
3384
3392
|
forceTrigger = true;
|
|
3385
3393
|
} else if (isArray(source)) {
|
|
3386
3394
|
isMultiSource = true;
|
|
@@ -3389,7 +3397,7 @@ function doWatch(source, cb, {
|
|
|
3389
3397
|
if (isRef(s)) {
|
|
3390
3398
|
return s.value;
|
|
3391
3399
|
} else if (isReactive(s)) {
|
|
3392
|
-
return
|
|
3400
|
+
return reactiveGetter(s);
|
|
3393
3401
|
} else if (isFunction(s)) {
|
|
3394
3402
|
return callWithErrorHandling(s, instance, 2);
|
|
3395
3403
|
} else {
|
|
@@ -3401,9 +3409,6 @@ function doWatch(source, cb, {
|
|
|
3401
3409
|
getter = () => callWithErrorHandling(source, instance, 2);
|
|
3402
3410
|
} else {
|
|
3403
3411
|
getter = () => {
|
|
3404
|
-
if (instance && instance.isUnmounted) {
|
|
3405
|
-
return;
|
|
3406
|
-
}
|
|
3407
3412
|
if (cleanup) {
|
|
3408
3413
|
cleanup();
|
|
3409
3414
|
}
|
|
@@ -4812,6 +4817,7 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
4812
4817
|
return ref();
|
|
4813
4818
|
}
|
|
4814
4819
|
const camelizedName = camelize(name);
|
|
4820
|
+
const hyphenatedName = hyphenate(name);
|
|
4815
4821
|
const res = customRef((track, trigger) => {
|
|
4816
4822
|
let localValue;
|
|
4817
4823
|
watchSyncEffect(() => {
|
|
@@ -4829,7 +4835,7 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
4829
4835
|
set(value) {
|
|
4830
4836
|
const rawProps = i.vnode.props;
|
|
4831
4837
|
if (!(rawProps && // check if parent has passed v-model
|
|
4832
|
-
(name in rawProps || camelizedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps)) && hasChanged(value, localValue)) {
|
|
4838
|
+
(name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && hasChanged(value, localValue)) {
|
|
4833
4839
|
localValue = value;
|
|
4834
4840
|
trigger();
|
|
4835
4841
|
}
|
|
@@ -9483,7 +9489,7 @@ function isMemoSame(cached, memo) {
|
|
|
9483
9489
|
return true;
|
|
9484
9490
|
}
|
|
9485
9491
|
|
|
9486
|
-
const version = "3.4.
|
|
9492
|
+
const version = "3.4.4";
|
|
9487
9493
|
const warn = warn$1 ;
|
|
9488
9494
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
9489
9495
|
const devtools = devtools$1 ;
|