vue 3.5.30 → 3.5.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vue.cjs.js +1 -1
- package/dist/vue.cjs.prod.js +1 -1
- package/dist/vue.esm-browser.js +56 -23
- package/dist/vue.esm-browser.prod.js +8 -8
- package/dist/vue.esm-bundler.js +1 -1
- package/dist/vue.global.js +56 -23
- package/dist/vue.global.prod.js +9 -9
- package/dist/vue.runtime.esm-browser.js +55 -22
- package/dist/vue.runtime.esm-browser.prod.js +3 -3
- package/dist/vue.runtime.esm-bundler.js +1 -1
- package/dist/vue.runtime.global.js +55 -22
- package/dist/vue.runtime.global.prod.js +3 -3
- package/package.json +6 -6
package/dist/vue.cjs.js
CHANGED
package/dist/vue.cjs.prod.js
CHANGED
package/dist/vue.esm-browser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* vue v3.5.
|
|
2
|
+
* vue v3.5.31
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -1952,16 +1952,16 @@ function toRefs(object) {
|
|
|
1952
1952
|
return ret;
|
|
1953
1953
|
}
|
|
1954
1954
|
class ObjectRefImpl {
|
|
1955
|
-
constructor(_object,
|
|
1955
|
+
constructor(_object, key, _defaultValue) {
|
|
1956
1956
|
this._object = _object;
|
|
1957
|
-
this._key = _key;
|
|
1958
1957
|
this._defaultValue = _defaultValue;
|
|
1959
1958
|
this["__v_isRef"] = true;
|
|
1960
1959
|
this._value = void 0;
|
|
1960
|
+
this._key = isSymbol(key) ? key : String(key);
|
|
1961
1961
|
this._raw = toRaw(_object);
|
|
1962
1962
|
let shallow = true;
|
|
1963
1963
|
let obj = _object;
|
|
1964
|
-
if (!isArray(_object) || !isIntegerKey(
|
|
1964
|
+
if (!isArray(_object) || isSymbol(this._key) || !isIntegerKey(this._key)) {
|
|
1965
1965
|
do {
|
|
1966
1966
|
shallow = !isProxy(obj) || isShallow(obj);
|
|
1967
1967
|
} while (shallow && (obj = obj["__v_raw"]));
|
|
@@ -2761,6 +2761,13 @@ function checkRecursiveUpdates(seen, fn) {
|
|
|
2761
2761
|
}
|
|
2762
2762
|
|
|
2763
2763
|
let isHmrUpdating = false;
|
|
2764
|
+
const setHmrUpdating = (v) => {
|
|
2765
|
+
try {
|
|
2766
|
+
return isHmrUpdating;
|
|
2767
|
+
} finally {
|
|
2768
|
+
isHmrUpdating = v;
|
|
2769
|
+
}
|
|
2770
|
+
};
|
|
2764
2771
|
const hmrDirtyComponents = /* @__PURE__ */ new Map();
|
|
2765
2772
|
{
|
|
2766
2773
|
getGlobalThis().__VUE_HMR_RUNTIME__ = {
|
|
@@ -3347,9 +3354,10 @@ const TeleportImpl = {
|
|
|
3347
3354
|
mount(container, mainAnchor);
|
|
3348
3355
|
updateCssVars(n2, true);
|
|
3349
3356
|
}
|
|
3350
|
-
if (isTeleportDeferred(n2.props)) {
|
|
3357
|
+
if (isTeleportDeferred(n2.props) || parentSuspense && parentSuspense.pendingBranch) {
|
|
3351
3358
|
n2.el.__isMounted = false;
|
|
3352
3359
|
queuePostRenderEffect(() => {
|
|
3360
|
+
if (n2.el.__isMounted !== false) return;
|
|
3353
3361
|
mountToTarget();
|
|
3354
3362
|
delete n2.el.__isMounted;
|
|
3355
3363
|
}, parentSuspense);
|
|
@@ -3357,7 +3365,12 @@ const TeleportImpl = {
|
|
|
3357
3365
|
mountToTarget();
|
|
3358
3366
|
}
|
|
3359
3367
|
} else {
|
|
3360
|
-
|
|
3368
|
+
n2.el = n1.el;
|
|
3369
|
+
n2.targetStart = n1.targetStart;
|
|
3370
|
+
const mainAnchor = n2.anchor = n1.anchor;
|
|
3371
|
+
const target = n2.target = n1.target;
|
|
3372
|
+
const targetAnchor = n2.targetAnchor = n1.targetAnchor;
|
|
3373
|
+
if (n1.el.__isMounted === false) {
|
|
3361
3374
|
queuePostRenderEffect(() => {
|
|
3362
3375
|
TeleportImpl.process(
|
|
3363
3376
|
n1,
|
|
@@ -3374,11 +3387,6 @@ const TeleportImpl = {
|
|
|
3374
3387
|
}, parentSuspense);
|
|
3375
3388
|
return;
|
|
3376
3389
|
}
|
|
3377
|
-
n2.el = n1.el;
|
|
3378
|
-
n2.targetStart = n1.targetStart;
|
|
3379
|
-
const mainAnchor = n2.anchor = n1.anchor;
|
|
3380
|
-
const target = n2.target = n1.target;
|
|
3381
|
-
const targetAnchor = n2.targetAnchor = n1.targetAnchor;
|
|
3382
3390
|
const wasDisabled = isTeleportDisabled(n1.props);
|
|
3383
3391
|
const currentContainer = wasDisabled ? container : target;
|
|
3384
3392
|
const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;
|
|
@@ -3841,7 +3849,7 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
3841
3849
|
callHook(hook, [el]);
|
|
3842
3850
|
},
|
|
3843
3851
|
enter(el) {
|
|
3844
|
-
if (leavingVNodesCache[key] === vnode) return;
|
|
3852
|
+
if (!isHmrUpdating && leavingVNodesCache[key] === vnode) return;
|
|
3845
3853
|
let hook = onEnter;
|
|
3846
3854
|
let afterHook = onAfterEnter;
|
|
3847
3855
|
let cancelHook = onEnterCancelled;
|
|
@@ -7085,11 +7093,12 @@ function hasPropValueChanged(nextProps, prevProps, key) {
|
|
|
7085
7093
|
}
|
|
7086
7094
|
return nextProp !== prevProp;
|
|
7087
7095
|
}
|
|
7088
|
-
function updateHOCHostEl({ vnode, parent }, el) {
|
|
7096
|
+
function updateHOCHostEl({ vnode, parent, suspense }, el) {
|
|
7089
7097
|
while (parent) {
|
|
7090
7098
|
const root = parent.subTree;
|
|
7091
7099
|
if (root.suspense && root.suspense.activeBranch === vnode) {
|
|
7092
|
-
root.el =
|
|
7100
|
+
root.suspense.vnode.el = root.el = el;
|
|
7101
|
+
vnode = root;
|
|
7093
7102
|
}
|
|
7094
7103
|
if (root === vnode) {
|
|
7095
7104
|
(vnode = parent.vnode).el = el;
|
|
@@ -7098,6 +7107,9 @@ function updateHOCHostEl({ vnode, parent }, el) {
|
|
|
7098
7107
|
break;
|
|
7099
7108
|
}
|
|
7100
7109
|
}
|
|
7110
|
+
if (suspense && suspense.activeBranch === vnode) {
|
|
7111
|
+
suspense.vnode.el = el;
|
|
7112
|
+
}
|
|
7101
7113
|
}
|
|
7102
7114
|
|
|
7103
7115
|
const internalObjectProto = {};
|
|
@@ -7939,10 +7951,17 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7939
7951
|
}
|
|
7940
7952
|
hostInsert(el, container, anchor);
|
|
7941
7953
|
if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) {
|
|
7954
|
+
const isHmr = isHmrUpdating;
|
|
7942
7955
|
queuePostRenderEffect(() => {
|
|
7943
|
-
|
|
7944
|
-
|
|
7945
|
-
|
|
7956
|
+
let prev;
|
|
7957
|
+
prev = setHmrUpdating(isHmr);
|
|
7958
|
+
try {
|
|
7959
|
+
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
7960
|
+
needCallTransitionHooks && transition.enter(el);
|
|
7961
|
+
dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
|
|
7962
|
+
} finally {
|
|
7963
|
+
setHmrUpdating(prev);
|
|
7964
|
+
}
|
|
7946
7965
|
}, parentSuspense);
|
|
7947
7966
|
}
|
|
7948
7967
|
};
|
|
@@ -8863,7 +8882,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8863
8882
|
shapeFlag,
|
|
8864
8883
|
patchFlag,
|
|
8865
8884
|
dirs,
|
|
8866
|
-
cacheIndex
|
|
8885
|
+
cacheIndex,
|
|
8886
|
+
memo
|
|
8867
8887
|
} = vnode;
|
|
8868
8888
|
if (patchFlag === -2) {
|
|
8869
8889
|
optimized = false;
|
|
@@ -8925,10 +8945,14 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8925
8945
|
remove(vnode);
|
|
8926
8946
|
}
|
|
8927
8947
|
}
|
|
8928
|
-
|
|
8948
|
+
const shouldInvalidateMemo = memo != null && cacheIndex == null;
|
|
8949
|
+
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs || shouldInvalidateMemo) {
|
|
8929
8950
|
queuePostRenderEffect(() => {
|
|
8930
8951
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
8931
8952
|
shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
|
|
8953
|
+
if (shouldInvalidateMemo) {
|
|
8954
|
+
vnode.el = null;
|
|
8955
|
+
}
|
|
8932
8956
|
}, parentSuspense);
|
|
8933
8957
|
}
|
|
8934
8958
|
};
|
|
@@ -9482,6 +9506,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9482
9506
|
pendingId: suspenseId++,
|
|
9483
9507
|
timeout: typeof timeout === "number" ? timeout : -1,
|
|
9484
9508
|
activeBranch: null,
|
|
9509
|
+
isFallbackMountPending: false,
|
|
9485
9510
|
pendingBranch: null,
|
|
9486
9511
|
isInFallback: !isHydrating,
|
|
9487
9512
|
isHydrating,
|
|
@@ -9531,7 +9556,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9531
9556
|
}
|
|
9532
9557
|
};
|
|
9533
9558
|
}
|
|
9534
|
-
if (activeBranch) {
|
|
9559
|
+
if (activeBranch && !suspense.isFallbackMountPending) {
|
|
9535
9560
|
if (parentNode(activeBranch.el) === container2) {
|
|
9536
9561
|
anchor = next(activeBranch);
|
|
9537
9562
|
}
|
|
@@ -9544,6 +9569,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9544
9569
|
move(pendingBranch, container2, anchor, 0);
|
|
9545
9570
|
}
|
|
9546
9571
|
}
|
|
9572
|
+
suspense.isFallbackMountPending = false;
|
|
9547
9573
|
setActiveBranch(suspense, pendingBranch);
|
|
9548
9574
|
suspense.pendingBranch = null;
|
|
9549
9575
|
suspense.isInFallback = false;
|
|
@@ -9579,6 +9605,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9579
9605
|
triggerEvent(vnode2, "onFallback");
|
|
9580
9606
|
const anchor2 = next(activeBranch);
|
|
9581
9607
|
const mountFallback = () => {
|
|
9608
|
+
suspense.isFallbackMountPending = false;
|
|
9582
9609
|
if (!suspense.isInFallback) {
|
|
9583
9610
|
return;
|
|
9584
9611
|
}
|
|
@@ -9598,6 +9625,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9598
9625
|
};
|
|
9599
9626
|
const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
|
|
9600
9627
|
if (delayEnter) {
|
|
9628
|
+
suspense.isFallbackMountPending = true;
|
|
9601
9629
|
activeBranch.transition.afterLeave = mountFallback;
|
|
9602
9630
|
}
|
|
9603
9631
|
suspense.isInFallback = true;
|
|
@@ -10148,6 +10176,10 @@ function mergeProps(...args) {
|
|
|
10148
10176
|
const incoming = toMerge[key];
|
|
10149
10177
|
if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) {
|
|
10150
10178
|
ret[key] = existing ? [].concat(existing, incoming) : incoming;
|
|
10179
|
+
} else if (incoming == null && existing == null && // mergeProps({ 'onUpdate:modelValue': undefined }) should not retain
|
|
10180
|
+
// the model listener.
|
|
10181
|
+
!isModelListener(key)) {
|
|
10182
|
+
ret[key] = incoming;
|
|
10151
10183
|
}
|
|
10152
10184
|
} else if (key !== "") {
|
|
10153
10185
|
ret[key] = toMerge[key];
|
|
@@ -10832,7 +10864,7 @@ function isMemoSame(cached, memo) {
|
|
|
10832
10864
|
return true;
|
|
10833
10865
|
}
|
|
10834
10866
|
|
|
10835
|
-
const version = "3.5.
|
|
10867
|
+
const version = "3.5.31";
|
|
10836
10868
|
const warn = warn$1 ;
|
|
10837
10869
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
10838
10870
|
const devtools = devtools$1 ;
|
|
@@ -12423,7 +12455,8 @@ const vModelText = {
|
|
|
12423
12455
|
if (elValue === newValue) {
|
|
12424
12456
|
return;
|
|
12425
12457
|
}
|
|
12426
|
-
|
|
12458
|
+
const rootNode = el.getRootNode();
|
|
12459
|
+
if ((rootNode instanceof Document || rootNode instanceof ShadowRoot) && rootNode.activeElement === el && el.type !== "range") {
|
|
12427
12460
|
if (lazy && value === oldValue) {
|
|
12428
12461
|
return;
|
|
12429
12462
|
}
|
|
@@ -16629,7 +16662,7 @@ const transformFor = createStructuralDirectiveTransform(
|
|
|
16629
16662
|
loop.body = createBlockStatement([
|
|
16630
16663
|
createCompoundExpression([`const _memo = (`, memo.exp, `)`]),
|
|
16631
16664
|
createCompoundExpression([
|
|
16632
|
-
`if (_cached`,
|
|
16665
|
+
`if (_cached && _cached.el`,
|
|
16633
16666
|
...keyExp ? [` && _cached.key === `, keyExp] : [],
|
|
16634
16667
|
` && ${context.helperString(
|
|
16635
16668
|
IS_MEMO_SAME
|