@vue/runtime-dom 3.5.26 → 3.5.28
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/runtime-dom.cjs.js +29 -11
- package/dist/runtime-dom.cjs.prod.js +29 -11
- package/dist/runtime-dom.d.ts +14 -2
- package/dist/runtime-dom.esm-browser.js +153 -97
- package/dist/runtime-dom.esm-browser.prod.js +3 -3
- package/dist/runtime-dom.esm-bundler.js +31 -13
- package/dist/runtime-dom.global.js +153 -97
- package/dist/runtime-dom.global.prod.js +3 -3
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.5.
|
|
2
|
+
* @vue/runtime-dom v3.5.28
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -337,6 +337,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
337
337
|
|
|
338
338
|
let activeEffectScope;
|
|
339
339
|
class EffectScope {
|
|
340
|
+
// TODO isolatedDeclarations "__v_skip"
|
|
340
341
|
constructor(detached = false) {
|
|
341
342
|
this.detached = detached;
|
|
342
343
|
/**
|
|
@@ -356,6 +357,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
356
357
|
*/
|
|
357
358
|
this.cleanups = [];
|
|
358
359
|
this._isPaused = false;
|
|
360
|
+
this.__v_skip = true;
|
|
359
361
|
this.parent = activeEffectScope;
|
|
360
362
|
if (!detached && activeEffectScope) {
|
|
361
363
|
this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(
|
|
@@ -1421,20 +1423,20 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1421
1423
|
"iterate",
|
|
1422
1424
|
isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY
|
|
1423
1425
|
);
|
|
1424
|
-
return
|
|
1425
|
-
// iterator
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
done
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1426
|
+
return extend(
|
|
1427
|
+
// inheriting all iterator properties
|
|
1428
|
+
Object.create(innerIterator),
|
|
1429
|
+
{
|
|
1430
|
+
// iterator protocol
|
|
1431
|
+
next() {
|
|
1432
|
+
const { value, done } = innerIterator.next();
|
|
1433
|
+
return done ? { value, done } : {
|
|
1434
|
+
value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),
|
|
1435
|
+
done
|
|
1436
|
+
};
|
|
1437
|
+
}
|
|
1436
1438
|
}
|
|
1437
|
-
|
|
1439
|
+
);
|
|
1438
1440
|
};
|
|
1439
1441
|
}
|
|
1440
1442
|
function createReadonlyMethod(type) {
|
|
@@ -1648,8 +1650,9 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1648
1650
|
function getTargetType(value) {
|
|
1649
1651
|
return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value));
|
|
1650
1652
|
}
|
|
1653
|
+
// @__NO_SIDE_EFFECTS__
|
|
1651
1654
|
function reactive(target) {
|
|
1652
|
-
if (isReadonly(target)) {
|
|
1655
|
+
if (/* @__PURE__ */ isReadonly(target)) {
|
|
1653
1656
|
return target;
|
|
1654
1657
|
}
|
|
1655
1658
|
return createReactiveObject(
|
|
@@ -1660,6 +1663,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1660
1663
|
reactiveMap
|
|
1661
1664
|
);
|
|
1662
1665
|
}
|
|
1666
|
+
// @__NO_SIDE_EFFECTS__
|
|
1663
1667
|
function shallowReactive(target) {
|
|
1664
1668
|
return createReactiveObject(
|
|
1665
1669
|
target,
|
|
@@ -1669,6 +1673,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1669
1673
|
shallowReactiveMap
|
|
1670
1674
|
);
|
|
1671
1675
|
}
|
|
1676
|
+
// @__NO_SIDE_EFFECTS__
|
|
1672
1677
|
function readonly(target) {
|
|
1673
1678
|
return createReactiveObject(
|
|
1674
1679
|
target,
|
|
@@ -1678,6 +1683,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1678
1683
|
readonlyMap
|
|
1679
1684
|
);
|
|
1680
1685
|
}
|
|
1686
|
+
// @__NO_SIDE_EFFECTS__
|
|
1681
1687
|
function shallowReadonly(target) {
|
|
1682
1688
|
return createReactiveObject(
|
|
1683
1689
|
target,
|
|
@@ -1716,24 +1722,29 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1716
1722
|
proxyMap.set(target, proxy);
|
|
1717
1723
|
return proxy;
|
|
1718
1724
|
}
|
|
1725
|
+
// @__NO_SIDE_EFFECTS__
|
|
1719
1726
|
function isReactive(value) {
|
|
1720
|
-
if (isReadonly(value)) {
|
|
1721
|
-
return isReactive(value["__v_raw"]);
|
|
1727
|
+
if (/* @__PURE__ */ isReadonly(value)) {
|
|
1728
|
+
return /* @__PURE__ */ isReactive(value["__v_raw"]);
|
|
1722
1729
|
}
|
|
1723
1730
|
return !!(value && value["__v_isReactive"]);
|
|
1724
1731
|
}
|
|
1732
|
+
// @__NO_SIDE_EFFECTS__
|
|
1725
1733
|
function isReadonly(value) {
|
|
1726
1734
|
return !!(value && value["__v_isReadonly"]);
|
|
1727
1735
|
}
|
|
1736
|
+
// @__NO_SIDE_EFFECTS__
|
|
1728
1737
|
function isShallow(value) {
|
|
1729
1738
|
return !!(value && value["__v_isShallow"]);
|
|
1730
1739
|
}
|
|
1740
|
+
// @__NO_SIDE_EFFECTS__
|
|
1731
1741
|
function isProxy(value) {
|
|
1732
1742
|
return value ? !!value["__v_raw"] : false;
|
|
1733
1743
|
}
|
|
1744
|
+
// @__NO_SIDE_EFFECTS__
|
|
1734
1745
|
function toRaw(observed) {
|
|
1735
1746
|
const raw = observed && observed["__v_raw"];
|
|
1736
|
-
return raw ? toRaw(raw) : observed;
|
|
1747
|
+
return raw ? /* @__PURE__ */ toRaw(raw) : observed;
|
|
1737
1748
|
}
|
|
1738
1749
|
function markRaw(value) {
|
|
1739
1750
|
if (!hasOwn(value, "__v_skip") && Object.isExtensible(value)) {
|
|
@@ -1741,20 +1752,23 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1741
1752
|
}
|
|
1742
1753
|
return value;
|
|
1743
1754
|
}
|
|
1744
|
-
const toReactive = (value) => isObject(value) ? reactive(value) : value;
|
|
1745
|
-
const toReadonly = (value) => isObject(value) ? readonly(value) : value;
|
|
1755
|
+
const toReactive = (value) => isObject(value) ? /* @__PURE__ */ reactive(value) : value;
|
|
1756
|
+
const toReadonly = (value) => isObject(value) ? /* @__PURE__ */ readonly(value) : value;
|
|
1746
1757
|
|
|
1758
|
+
// @__NO_SIDE_EFFECTS__
|
|
1747
1759
|
function isRef(r) {
|
|
1748
1760
|
return r ? r["__v_isRef"] === true : false;
|
|
1749
1761
|
}
|
|
1762
|
+
// @__NO_SIDE_EFFECTS__
|
|
1750
1763
|
function ref(value) {
|
|
1751
1764
|
return createRef(value, false);
|
|
1752
1765
|
}
|
|
1766
|
+
// @__NO_SIDE_EFFECTS__
|
|
1753
1767
|
function shallowRef(value) {
|
|
1754
1768
|
return createRef(value, true);
|
|
1755
1769
|
}
|
|
1756
1770
|
function createRef(rawValue, shallow) {
|
|
1757
|
-
if (isRef(rawValue)) {
|
|
1771
|
+
if (/* @__PURE__ */ isRef(rawValue)) {
|
|
1758
1772
|
return rawValue;
|
|
1759
1773
|
}
|
|
1760
1774
|
return new RefImpl(rawValue, shallow);
|
|
@@ -1810,7 +1824,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1810
1824
|
}
|
|
1811
1825
|
}
|
|
1812
1826
|
function unref(ref2) {
|
|
1813
|
-
return isRef(ref2) ? ref2.value : ref2;
|
|
1827
|
+
return /* @__PURE__ */ isRef(ref2) ? ref2.value : ref2;
|
|
1814
1828
|
}
|
|
1815
1829
|
function toValue(source) {
|
|
1816
1830
|
return isFunction(source) ? source() : unref(source);
|
|
@@ -1819,7 +1833,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1819
1833
|
get: (target, key, receiver) => key === "__v_raw" ? target : unref(Reflect.get(target, key, receiver)),
|
|
1820
1834
|
set: (target, key, value, receiver) => {
|
|
1821
1835
|
const oldValue = target[key];
|
|
1822
|
-
if (isRef(oldValue) &&
|
|
1836
|
+
if (/* @__PURE__ */ isRef(oldValue) && !/* @__PURE__ */ isRef(value)) {
|
|
1823
1837
|
oldValue.value = value;
|
|
1824
1838
|
return true;
|
|
1825
1839
|
} else {
|
|
@@ -1849,6 +1863,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1849
1863
|
function customRef(factory) {
|
|
1850
1864
|
return new CustomRefImpl(factory);
|
|
1851
1865
|
}
|
|
1866
|
+
// @__NO_SIDE_EFFECTS__
|
|
1852
1867
|
function toRefs(object) {
|
|
1853
1868
|
if (!isProxy(object)) {
|
|
1854
1869
|
warn$2(`toRefs() expects a reactive object but received a plain one.`);
|
|
@@ -1884,9 +1899,9 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1884
1899
|
return this._value = val === void 0 ? this._defaultValue : val;
|
|
1885
1900
|
}
|
|
1886
1901
|
set value(newVal) {
|
|
1887
|
-
if (this._shallow && isRef(this._raw[this._key])) {
|
|
1902
|
+
if (this._shallow && /* @__PURE__ */ isRef(this._raw[this._key])) {
|
|
1888
1903
|
const nestedRef = this._object[this._key];
|
|
1889
|
-
if (isRef(nestedRef)) {
|
|
1904
|
+
if (/* @__PURE__ */ isRef(nestedRef)) {
|
|
1890
1905
|
nestedRef.value = newVal;
|
|
1891
1906
|
return;
|
|
1892
1907
|
}
|
|
@@ -1908,15 +1923,16 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1908
1923
|
return this._value = this._getter();
|
|
1909
1924
|
}
|
|
1910
1925
|
}
|
|
1926
|
+
// @__NO_SIDE_EFFECTS__
|
|
1911
1927
|
function toRef(source, key, defaultValue) {
|
|
1912
|
-
if (isRef(source)) {
|
|
1928
|
+
if (/* @__PURE__ */ isRef(source)) {
|
|
1913
1929
|
return source;
|
|
1914
1930
|
} else if (isFunction(source)) {
|
|
1915
1931
|
return new GetterRefImpl(source);
|
|
1916
1932
|
} else if (isObject(source) && arguments.length > 1) {
|
|
1917
1933
|
return propertyToRef(source, key, defaultValue);
|
|
1918
1934
|
} else {
|
|
1919
|
-
return ref(source);
|
|
1935
|
+
return /* @__PURE__ */ ref(source);
|
|
1920
1936
|
}
|
|
1921
1937
|
}
|
|
1922
1938
|
function propertyToRef(source, key, defaultValue) {
|
|
@@ -1997,6 +2013,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1997
2013
|
}
|
|
1998
2014
|
}
|
|
1999
2015
|
}
|
|
2016
|
+
// @__NO_SIDE_EFFECTS__
|
|
2000
2017
|
function computed$1(getterOrOptions, debugOptions, isSSR = false) {
|
|
2001
2018
|
let getter;
|
|
2002
2019
|
let setter;
|
|
@@ -3397,7 +3414,22 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
3397
3414
|
function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, {
|
|
3398
3415
|
o: { nextSibling, parentNode, querySelector, insert, createText }
|
|
3399
3416
|
}, hydrateChildren) {
|
|
3400
|
-
function
|
|
3417
|
+
function hydrateAnchor(target2, targetNode) {
|
|
3418
|
+
let targetAnchor = targetNode;
|
|
3419
|
+
while (targetAnchor) {
|
|
3420
|
+
if (targetAnchor && targetAnchor.nodeType === 8) {
|
|
3421
|
+
if (targetAnchor.data === "teleport start anchor") {
|
|
3422
|
+
vnode.targetStart = targetAnchor;
|
|
3423
|
+
} else if (targetAnchor.data === "teleport anchor") {
|
|
3424
|
+
vnode.targetAnchor = targetAnchor;
|
|
3425
|
+
target2._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor);
|
|
3426
|
+
break;
|
|
3427
|
+
}
|
|
3428
|
+
}
|
|
3429
|
+
targetAnchor = nextSibling(targetAnchor);
|
|
3430
|
+
}
|
|
3431
|
+
}
|
|
3432
|
+
function hydrateDisabledTeleport(node2, vnode2) {
|
|
3401
3433
|
vnode2.anchor = hydrateChildren(
|
|
3402
3434
|
nextSibling(node2),
|
|
3403
3435
|
vnode2,
|
|
@@ -3407,8 +3439,6 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
3407
3439
|
slotScopeIds,
|
|
3408
3440
|
optimized
|
|
3409
3441
|
);
|
|
3410
|
-
vnode2.targetStart = targetStart;
|
|
3411
|
-
vnode2.targetAnchor = targetAnchor;
|
|
3412
3442
|
}
|
|
3413
3443
|
const target = vnode.target = resolveTarget(
|
|
3414
3444
|
vnode.props,
|
|
@@ -3419,27 +3449,22 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
3419
3449
|
const targetNode = target._lpa || target.firstChild;
|
|
3420
3450
|
if (vnode.shapeFlag & 16) {
|
|
3421
3451
|
if (disabled) {
|
|
3422
|
-
hydrateDisabledTeleport(
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3452
|
+
hydrateDisabledTeleport(node, vnode);
|
|
3453
|
+
hydrateAnchor(target, targetNode);
|
|
3454
|
+
if (!vnode.targetAnchor) {
|
|
3455
|
+
prepareAnchor(
|
|
3456
|
+
target,
|
|
3457
|
+
vnode,
|
|
3458
|
+
createText,
|
|
3459
|
+
insert,
|
|
3460
|
+
// if target is the same as the main view, insert anchors before current node
|
|
3461
|
+
// to avoid hydrating mismatch
|
|
3462
|
+
parentNode(node) === target ? node : null
|
|
3463
|
+
);
|
|
3464
|
+
}
|
|
3428
3465
|
} else {
|
|
3429
3466
|
vnode.anchor = nextSibling(node);
|
|
3430
|
-
|
|
3431
|
-
while (targetAnchor) {
|
|
3432
|
-
if (targetAnchor && targetAnchor.nodeType === 8) {
|
|
3433
|
-
if (targetAnchor.data === "teleport start anchor") {
|
|
3434
|
-
vnode.targetStart = targetAnchor;
|
|
3435
|
-
} else if (targetAnchor.data === "teleport anchor") {
|
|
3436
|
-
vnode.targetAnchor = targetAnchor;
|
|
3437
|
-
target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor);
|
|
3438
|
-
break;
|
|
3439
|
-
}
|
|
3440
|
-
}
|
|
3441
|
-
targetAnchor = nextSibling(targetAnchor);
|
|
3442
|
-
}
|
|
3467
|
+
hydrateAnchor(target, targetNode);
|
|
3443
3468
|
if (!vnode.targetAnchor) {
|
|
3444
3469
|
prepareAnchor(target, vnode, createText, insert);
|
|
3445
3470
|
}
|
|
@@ -3457,7 +3482,9 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
3457
3482
|
updateCssVars(vnode, disabled);
|
|
3458
3483
|
} else if (disabled) {
|
|
3459
3484
|
if (vnode.shapeFlag & 16) {
|
|
3460
|
-
hydrateDisabledTeleport(node, vnode
|
|
3485
|
+
hydrateDisabledTeleport(node, vnode);
|
|
3486
|
+
vnode.targetStart = node;
|
|
3487
|
+
vnode.targetAnchor = nextSibling(node);
|
|
3461
3488
|
}
|
|
3462
3489
|
}
|
|
3463
3490
|
return vnode.anchor && nextSibling(vnode.anchor);
|
|
@@ -3481,13 +3508,13 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
3481
3508
|
ctx.ut();
|
|
3482
3509
|
}
|
|
3483
3510
|
}
|
|
3484
|
-
function prepareAnchor(target, vnode, createText, insert) {
|
|
3511
|
+
function prepareAnchor(target, vnode, createText, insert, anchor = null) {
|
|
3485
3512
|
const targetStart = vnode.targetStart = createText("");
|
|
3486
3513
|
const targetAnchor = vnode.targetAnchor = createText("");
|
|
3487
3514
|
targetStart[TeleportEndKey] = targetAnchor;
|
|
3488
3515
|
if (target) {
|
|
3489
|
-
insert(targetStart, target);
|
|
3490
|
-
insert(targetAnchor, target);
|
|
3516
|
+
insert(targetStart, target, anchor);
|
|
3517
|
+
insert(targetAnchor, target, anchor);
|
|
3491
3518
|
}
|
|
3492
3519
|
return targetAnchor;
|
|
3493
3520
|
}
|
|
@@ -3722,7 +3749,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
3722
3749
|
}
|
|
3723
3750
|
}
|
|
3724
3751
|
let called = false;
|
|
3725
|
-
|
|
3752
|
+
el[enterCbKey$1] = (cancelled) => {
|
|
3726
3753
|
if (called) return;
|
|
3727
3754
|
called = true;
|
|
3728
3755
|
if (cancelled) {
|
|
@@ -3735,6 +3762,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
3735
3762
|
}
|
|
3736
3763
|
el[enterCbKey$1] = void 0;
|
|
3737
3764
|
};
|
|
3765
|
+
const done = el[enterCbKey$1].bind(null, false);
|
|
3738
3766
|
if (hook) {
|
|
3739
3767
|
callAsyncHook(hook, [el, done]);
|
|
3740
3768
|
} else {
|
|
@@ -3754,7 +3782,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
3754
3782
|
}
|
|
3755
3783
|
callHook(onBeforeLeave, [el]);
|
|
3756
3784
|
let called = false;
|
|
3757
|
-
|
|
3785
|
+
el[leaveCbKey] = (cancelled) => {
|
|
3758
3786
|
if (called) return;
|
|
3759
3787
|
called = true;
|
|
3760
3788
|
remove();
|
|
@@ -3768,6 +3796,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
3768
3796
|
delete leavingVNodesCache[key2];
|
|
3769
3797
|
}
|
|
3770
3798
|
};
|
|
3799
|
+
const done = el[leaveCbKey].bind(null, false);
|
|
3771
3800
|
leavingVNodesCache[key2] = vnode;
|
|
3772
3801
|
if (onLeave) {
|
|
3773
3802
|
callAsyncHook(onLeave, [el, done]);
|
|
@@ -3880,8 +3909,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
3880
3909
|
const r = shallowRef(null);
|
|
3881
3910
|
if (i) {
|
|
3882
3911
|
const refs = i.refs === EMPTY_OBJ ? i.refs = {} : i.refs;
|
|
3883
|
-
|
|
3884
|
-
if ((desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable) {
|
|
3912
|
+
if (isTemplateRefKey(refs, key)) {
|
|
3885
3913
|
warn$1(`useTemplateRef('${key}') already exists.`);
|
|
3886
3914
|
} else {
|
|
3887
3915
|
Object.defineProperty(refs, key, {
|
|
@@ -3901,6 +3929,10 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
3901
3929
|
}
|
|
3902
3930
|
return ret;
|
|
3903
3931
|
}
|
|
3932
|
+
function isTemplateRefKey(refs, key) {
|
|
3933
|
+
let desc;
|
|
3934
|
+
return !!((desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable);
|
|
3935
|
+
}
|
|
3904
3936
|
|
|
3905
3937
|
const pendingSetRefMap = /* @__PURE__ */ new WeakMap();
|
|
3906
3938
|
function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
@@ -3946,10 +3978,19 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
3946
3978
|
return false;
|
|
3947
3979
|
}
|
|
3948
3980
|
}
|
|
3981
|
+
if (isTemplateRefKey(refs, key)) {
|
|
3982
|
+
return false;
|
|
3983
|
+
}
|
|
3949
3984
|
return hasOwn(rawSetupState, key);
|
|
3950
3985
|
};
|
|
3951
|
-
const canSetRef = (ref2) => {
|
|
3952
|
-
|
|
3986
|
+
const canSetRef = (ref2, key) => {
|
|
3987
|
+
if (knownTemplateRefs.has(ref2)) {
|
|
3988
|
+
return false;
|
|
3989
|
+
}
|
|
3990
|
+
if (key && isTemplateRefKey(refs, key)) {
|
|
3991
|
+
return false;
|
|
3992
|
+
}
|
|
3993
|
+
return true;
|
|
3953
3994
|
};
|
|
3954
3995
|
if (oldRef != null && oldRef !== ref) {
|
|
3955
3996
|
invalidatePendingSetRef(oldRawRef);
|
|
@@ -3959,10 +4000,10 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
3959
4000
|
setupState[oldRef] = null;
|
|
3960
4001
|
}
|
|
3961
4002
|
} else if (isRef(oldRef)) {
|
|
3962
|
-
|
|
4003
|
+
const oldRawRefAtom = oldRawRef;
|
|
4004
|
+
if (canSetRef(oldRef, oldRawRefAtom.k)) {
|
|
3963
4005
|
oldRef.value = null;
|
|
3964
4006
|
}
|
|
3965
|
-
const oldRawRefAtom = oldRawRef;
|
|
3966
4007
|
if (oldRawRefAtom.k) refs[oldRawRefAtom.k] = null;
|
|
3967
4008
|
}
|
|
3968
4009
|
}
|
|
@@ -3986,7 +4027,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
3986
4027
|
}
|
|
3987
4028
|
} else {
|
|
3988
4029
|
const newVal = [refValue];
|
|
3989
|
-
if (canSetRef(ref)) {
|
|
4030
|
+
if (canSetRef(ref, rawRef.k)) {
|
|
3990
4031
|
ref.value = newVal;
|
|
3991
4032
|
}
|
|
3992
4033
|
if (rawRef.k) refs[rawRef.k] = newVal;
|
|
@@ -4001,7 +4042,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
4001
4042
|
setupState[ref] = value;
|
|
4002
4043
|
}
|
|
4003
4044
|
} else if (_isRef) {
|
|
4004
|
-
if (canSetRef(ref)) {
|
|
4045
|
+
if (canSetRef(ref, rawRef.k)) {
|
|
4005
4046
|
ref.value = value;
|
|
4006
4047
|
}
|
|
4007
4048
|
if (rawRef.k) refs[rawRef.k] = value;
|
|
@@ -4341,7 +4382,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
4341
4382
|
logMismatchError();
|
|
4342
4383
|
}
|
|
4343
4384
|
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
4344
|
-
key[0] === "." || isCustomElement) {
|
|
4385
|
+
key[0] === "." || isCustomElement && !isReservedProp(key)) {
|
|
4345
4386
|
patchProp(el, key, null, props[key], void 0, parentComponent);
|
|
4346
4387
|
}
|
|
4347
4388
|
}
|
|
@@ -6856,7 +6897,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
6856
6897
|
const dynamicProps = nextVNode.dynamicProps;
|
|
6857
6898
|
for (let i = 0; i < dynamicProps.length; i++) {
|
|
6858
6899
|
const key = dynamicProps[i];
|
|
6859
|
-
if (nextProps
|
|
6900
|
+
if (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emits, key)) {
|
|
6860
6901
|
return true;
|
|
6861
6902
|
}
|
|
6862
6903
|
}
|
|
@@ -6887,12 +6928,20 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
6887
6928
|
}
|
|
6888
6929
|
for (let i = 0; i < nextKeys.length; i++) {
|
|
6889
6930
|
const key = nextKeys[i];
|
|
6890
|
-
if (nextProps
|
|
6931
|
+
if (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
|
|
6891
6932
|
return true;
|
|
6892
6933
|
}
|
|
6893
6934
|
}
|
|
6894
6935
|
return false;
|
|
6895
6936
|
}
|
|
6937
|
+
function hasPropValueChanged(nextProps, prevProps, key) {
|
|
6938
|
+
const nextProp = nextProps[key];
|
|
6939
|
+
const prevProp = prevProps[key];
|
|
6940
|
+
if (key === "style" && isObject(nextProp) && isObject(prevProp)) {
|
|
6941
|
+
return !looseEqual(nextProp, prevProp);
|
|
6942
|
+
}
|
|
6943
|
+
return nextProp !== prevProp;
|
|
6944
|
+
}
|
|
6896
6945
|
function updateHOCHostEl({ vnode, parent }, el) {
|
|
6897
6946
|
while (parent) {
|
|
6898
6947
|
const root = parent.subTree;
|
|
@@ -7596,15 +7645,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7596
7645
|
} else {
|
|
7597
7646
|
const el = n2.el = n1.el;
|
|
7598
7647
|
if (n2.children !== n1.children) {
|
|
7599
|
-
|
|
7600
|
-
const childNodes = container.childNodes;
|
|
7601
|
-
const newChild = hostCreateText(n2.children);
|
|
7602
|
-
const oldChild = childNodes[n2.__elIndex = n1.__elIndex];
|
|
7603
|
-
hostInsert(newChild, container, oldChild);
|
|
7604
|
-
hostRemove(oldChild);
|
|
7605
|
-
} else {
|
|
7606
|
-
hostSetText(el, n2.children);
|
|
7607
|
-
}
|
|
7648
|
+
hostSetText(el, n2.children);
|
|
7608
7649
|
}
|
|
7609
7650
|
}
|
|
7610
7651
|
};
|
|
@@ -7680,7 +7721,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7680
7721
|
optimized
|
|
7681
7722
|
);
|
|
7682
7723
|
} else {
|
|
7683
|
-
const customElement =
|
|
7724
|
+
const customElement = n1.el && n1.el._isVueCE ? n1.el : null;
|
|
7684
7725
|
try {
|
|
7685
7726
|
if (customElement) {
|
|
7686
7727
|
customElement._beginPatch();
|
|
@@ -8162,8 +8203,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8162
8203
|
hydrateSubTree();
|
|
8163
8204
|
}
|
|
8164
8205
|
} else {
|
|
8165
|
-
if (root.ce &&
|
|
8166
|
-
root.ce._def.shadowRoot !== false) {
|
|
8206
|
+
if (root.ce && root.ce._hasShadowRoot()) {
|
|
8167
8207
|
root.ce._injectChildStyle(type);
|
|
8168
8208
|
}
|
|
8169
8209
|
{
|
|
@@ -8218,9 +8258,9 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8218
8258
|
updateComponentPreRender(instance, next, optimized);
|
|
8219
8259
|
}
|
|
8220
8260
|
nonHydratedAsyncRoot.asyncDep.then(() => {
|
|
8221
|
-
|
|
8222
|
-
|
|
8223
|
-
}
|
|
8261
|
+
queuePostRenderEffect(() => {
|
|
8262
|
+
if (!instance.isUnmounted) update();
|
|
8263
|
+
}, parentSuspense);
|
|
8224
8264
|
});
|
|
8225
8265
|
return;
|
|
8226
8266
|
}
|
|
@@ -8917,12 +8957,10 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8917
8957
|
traverseStaticChildren(c1, c2);
|
|
8918
8958
|
}
|
|
8919
8959
|
if (c2.type === Text) {
|
|
8920
|
-
if (c2.patchFlag
|
|
8921
|
-
c2
|
|
8922
|
-
} else {
|
|
8923
|
-
c2.__elIndex = i + // take fragment start anchor into account
|
|
8924
|
-
(n1.type === Fragment ? 1 : 0);
|
|
8960
|
+
if (c2.patchFlag === -1) {
|
|
8961
|
+
c2 = ch2[i] = cloneIfMounted(c2);
|
|
8925
8962
|
}
|
|
8963
|
+
c2.el = c1.el;
|
|
8926
8964
|
}
|
|
8927
8965
|
if (c2.type === Comment && !c2.el) {
|
|
8928
8966
|
c2.el = c1.el;
|
|
@@ -10634,7 +10672,7 @@ Component that was made reactive: `,
|
|
|
10634
10672
|
return true;
|
|
10635
10673
|
}
|
|
10636
10674
|
|
|
10637
|
-
const version = "3.5.
|
|
10675
|
+
const version = "3.5.28";
|
|
10638
10676
|
const warn = warn$1 ;
|
|
10639
10677
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
10640
10678
|
const devtools = devtools$1 ;
|
|
@@ -11889,6 +11927,12 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
11889
11927
|
this._update();
|
|
11890
11928
|
}
|
|
11891
11929
|
}
|
|
11930
|
+
/**
|
|
11931
|
+
* @internal
|
|
11932
|
+
*/
|
|
11933
|
+
_hasShadowRoot() {
|
|
11934
|
+
return this._def.shadowRoot !== false;
|
|
11935
|
+
}
|
|
11892
11936
|
/**
|
|
11893
11937
|
* @internal
|
|
11894
11938
|
*/
|
|
@@ -12011,10 +12055,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
12011
12055
|
instance
|
|
12012
12056
|
)
|
|
12013
12057
|
);
|
|
12014
|
-
positionMap.set(child,
|
|
12015
|
-
left: child.el.offsetLeft,
|
|
12016
|
-
top: child.el.offsetTop
|
|
12017
|
-
});
|
|
12058
|
+
positionMap.set(child, getPosition(child.el));
|
|
12018
12059
|
}
|
|
12019
12060
|
}
|
|
12020
12061
|
}
|
|
@@ -12045,10 +12086,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
12045
12086
|
}
|
|
12046
12087
|
}
|
|
12047
12088
|
function recordPosition(c) {
|
|
12048
|
-
newPositionMap.set(c,
|
|
12049
|
-
left: c.el.offsetLeft,
|
|
12050
|
-
top: c.el.offsetTop
|
|
12051
|
-
});
|
|
12089
|
+
newPositionMap.set(c, getPosition(c.el));
|
|
12052
12090
|
}
|
|
12053
12091
|
function applyTranslation(c) {
|
|
12054
12092
|
const oldPos = positionMap.get(c);
|
|
@@ -12056,12 +12094,29 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
12056
12094
|
const dx = oldPos.left - newPos.left;
|
|
12057
12095
|
const dy = oldPos.top - newPos.top;
|
|
12058
12096
|
if (dx || dy) {
|
|
12059
|
-
const
|
|
12060
|
-
s
|
|
12097
|
+
const el = c.el;
|
|
12098
|
+
const s = el.style;
|
|
12099
|
+
const rect = el.getBoundingClientRect();
|
|
12100
|
+
let scaleX = 1;
|
|
12101
|
+
let scaleY = 1;
|
|
12102
|
+
if (el.offsetWidth) scaleX = rect.width / el.offsetWidth;
|
|
12103
|
+
if (el.offsetHeight) scaleY = rect.height / el.offsetHeight;
|
|
12104
|
+
if (!Number.isFinite(scaleX) || scaleX === 0) scaleX = 1;
|
|
12105
|
+
if (!Number.isFinite(scaleY) || scaleY === 0) scaleY = 1;
|
|
12106
|
+
if (Math.abs(scaleX - 1) < 0.01) scaleX = 1;
|
|
12107
|
+
if (Math.abs(scaleY - 1) < 0.01) scaleY = 1;
|
|
12108
|
+
s.transform = s.webkitTransform = `translate(${dx / scaleX}px,${dy / scaleY}px)`;
|
|
12061
12109
|
s.transitionDuration = "0s";
|
|
12062
12110
|
return c;
|
|
12063
12111
|
}
|
|
12064
12112
|
}
|
|
12113
|
+
function getPosition(el) {
|
|
12114
|
+
const rect = el.getBoundingClientRect();
|
|
12115
|
+
return {
|
|
12116
|
+
left: rect.left,
|
|
12117
|
+
top: rect.top
|
|
12118
|
+
};
|
|
12119
|
+
}
|
|
12065
12120
|
function hasCSSTransform(el, root, moveClass) {
|
|
12066
12121
|
const clone = el.cloneNode();
|
|
12067
12122
|
const _vtc = el[vtcKey];
|
|
@@ -12338,6 +12393,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
12338
12393
|
exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m))
|
|
12339
12394
|
};
|
|
12340
12395
|
const withModifiers = (fn, modifiers) => {
|
|
12396
|
+
if (!fn) return fn;
|
|
12341
12397
|
const cache = fn._withMods || (fn._withMods = {});
|
|
12342
12398
|
const cacheKey = modifiers.join(".");
|
|
12343
12399
|
return cache[cacheKey] || (cache[cacheKey] = ((event, ...args) => {
|