@vue/runtime-dom 3.5.27 → 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 +1 -1
- package/dist/runtime-dom.esm-browser.js +111 -70
- 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 +111 -70
- package/dist/runtime-dom.global.prod.js +3 -3
- package/package.json +4 -4
package/dist/runtime-dom.cjs.js
CHANGED
|
@@ -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
|
**/
|
|
@@ -1194,6 +1194,12 @@ class VueElement extends BaseClass {
|
|
|
1194
1194
|
this._update();
|
|
1195
1195
|
}
|
|
1196
1196
|
}
|
|
1197
|
+
/**
|
|
1198
|
+
* @internal
|
|
1199
|
+
*/
|
|
1200
|
+
_hasShadowRoot() {
|
|
1201
|
+
return this._def.shadowRoot !== false;
|
|
1202
|
+
}
|
|
1197
1203
|
/**
|
|
1198
1204
|
* @internal
|
|
1199
1205
|
*/
|
|
@@ -1328,10 +1334,7 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
1328
1334
|
instance
|
|
1329
1335
|
)
|
|
1330
1336
|
);
|
|
1331
|
-
positionMap.set(child,
|
|
1332
|
-
left: child.el.offsetLeft,
|
|
1333
|
-
top: child.el.offsetTop
|
|
1334
|
-
});
|
|
1337
|
+
positionMap.set(child, getPosition(child.el));
|
|
1335
1338
|
}
|
|
1336
1339
|
}
|
|
1337
1340
|
}
|
|
@@ -1362,10 +1365,7 @@ function callPendingCbs(c) {
|
|
|
1362
1365
|
}
|
|
1363
1366
|
}
|
|
1364
1367
|
function recordPosition(c) {
|
|
1365
|
-
newPositionMap.set(c,
|
|
1366
|
-
left: c.el.offsetLeft,
|
|
1367
|
-
top: c.el.offsetTop
|
|
1368
|
-
});
|
|
1368
|
+
newPositionMap.set(c, getPosition(c.el));
|
|
1369
1369
|
}
|
|
1370
1370
|
function applyTranslation(c) {
|
|
1371
1371
|
const oldPos = positionMap.get(c);
|
|
@@ -1373,12 +1373,29 @@ function applyTranslation(c) {
|
|
|
1373
1373
|
const dx = oldPos.left - newPos.left;
|
|
1374
1374
|
const dy = oldPos.top - newPos.top;
|
|
1375
1375
|
if (dx || dy) {
|
|
1376
|
-
const
|
|
1377
|
-
s
|
|
1376
|
+
const el = c.el;
|
|
1377
|
+
const s = el.style;
|
|
1378
|
+
const rect = el.getBoundingClientRect();
|
|
1379
|
+
let scaleX = 1;
|
|
1380
|
+
let scaleY = 1;
|
|
1381
|
+
if (el.offsetWidth) scaleX = rect.width / el.offsetWidth;
|
|
1382
|
+
if (el.offsetHeight) scaleY = rect.height / el.offsetHeight;
|
|
1383
|
+
if (!Number.isFinite(scaleX) || scaleX === 0) scaleX = 1;
|
|
1384
|
+
if (!Number.isFinite(scaleY) || scaleY === 0) scaleY = 1;
|
|
1385
|
+
if (Math.abs(scaleX - 1) < 0.01) scaleX = 1;
|
|
1386
|
+
if (Math.abs(scaleY - 1) < 0.01) scaleY = 1;
|
|
1387
|
+
s.transform = s.webkitTransform = `translate(${dx / scaleX}px,${dy / scaleY}px)`;
|
|
1378
1388
|
s.transitionDuration = "0s";
|
|
1379
1389
|
return c;
|
|
1380
1390
|
}
|
|
1381
1391
|
}
|
|
1392
|
+
function getPosition(el) {
|
|
1393
|
+
const rect = el.getBoundingClientRect();
|
|
1394
|
+
return {
|
|
1395
|
+
left: rect.left,
|
|
1396
|
+
top: rect.top
|
|
1397
|
+
};
|
|
1398
|
+
}
|
|
1382
1399
|
function hasCSSTransform(el, root, moveClass) {
|
|
1383
1400
|
const clone = el.cloneNode();
|
|
1384
1401
|
const _vtc = el[vtcKey];
|
|
@@ -1689,6 +1706,7 @@ const modifierGuards = {
|
|
|
1689
1706
|
exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m))
|
|
1690
1707
|
};
|
|
1691
1708
|
const withModifiers = (fn, modifiers) => {
|
|
1709
|
+
if (!fn) return fn;
|
|
1692
1710
|
const cache = fn._withMods || (fn._withMods = {});
|
|
1693
1711
|
const cacheKey = modifiers.join(".");
|
|
1694
1712
|
return cache[cacheKey] || (cache[cacheKey] = ((event, ...args) => {
|
|
@@ -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
|
**/
|
|
@@ -1127,6 +1127,12 @@ class VueElement extends BaseClass {
|
|
|
1127
1127
|
this._update();
|
|
1128
1128
|
}
|
|
1129
1129
|
}
|
|
1130
|
+
/**
|
|
1131
|
+
* @internal
|
|
1132
|
+
*/
|
|
1133
|
+
_hasShadowRoot() {
|
|
1134
|
+
return this._def.shadowRoot !== false;
|
|
1135
|
+
}
|
|
1130
1136
|
/**
|
|
1131
1137
|
* @internal
|
|
1132
1138
|
*/
|
|
@@ -1238,10 +1244,7 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
1238
1244
|
instance
|
|
1239
1245
|
)
|
|
1240
1246
|
);
|
|
1241
|
-
positionMap.set(child,
|
|
1242
|
-
left: child.el.offsetLeft,
|
|
1243
|
-
top: child.el.offsetTop
|
|
1244
|
-
});
|
|
1247
|
+
positionMap.set(child, getPosition(child.el));
|
|
1245
1248
|
}
|
|
1246
1249
|
}
|
|
1247
1250
|
}
|
|
@@ -1270,10 +1273,7 @@ function callPendingCbs(c) {
|
|
|
1270
1273
|
}
|
|
1271
1274
|
}
|
|
1272
1275
|
function recordPosition(c) {
|
|
1273
|
-
newPositionMap.set(c,
|
|
1274
|
-
left: c.el.offsetLeft,
|
|
1275
|
-
top: c.el.offsetTop
|
|
1276
|
-
});
|
|
1276
|
+
newPositionMap.set(c, getPosition(c.el));
|
|
1277
1277
|
}
|
|
1278
1278
|
function applyTranslation(c) {
|
|
1279
1279
|
const oldPos = positionMap.get(c);
|
|
@@ -1281,12 +1281,29 @@ function applyTranslation(c) {
|
|
|
1281
1281
|
const dx = oldPos.left - newPos.left;
|
|
1282
1282
|
const dy = oldPos.top - newPos.top;
|
|
1283
1283
|
if (dx || dy) {
|
|
1284
|
-
const
|
|
1285
|
-
s
|
|
1284
|
+
const el = c.el;
|
|
1285
|
+
const s = el.style;
|
|
1286
|
+
const rect = el.getBoundingClientRect();
|
|
1287
|
+
let scaleX = 1;
|
|
1288
|
+
let scaleY = 1;
|
|
1289
|
+
if (el.offsetWidth) scaleX = rect.width / el.offsetWidth;
|
|
1290
|
+
if (el.offsetHeight) scaleY = rect.height / el.offsetHeight;
|
|
1291
|
+
if (!Number.isFinite(scaleX) || scaleX === 0) scaleX = 1;
|
|
1292
|
+
if (!Number.isFinite(scaleY) || scaleY === 0) scaleY = 1;
|
|
1293
|
+
if (Math.abs(scaleX - 1) < 0.01) scaleX = 1;
|
|
1294
|
+
if (Math.abs(scaleY - 1) < 0.01) scaleY = 1;
|
|
1295
|
+
s.transform = s.webkitTransform = `translate(${dx / scaleX}px,${dy / scaleY}px)`;
|
|
1286
1296
|
s.transitionDuration = "0s";
|
|
1287
1297
|
return c;
|
|
1288
1298
|
}
|
|
1289
1299
|
}
|
|
1300
|
+
function getPosition(el) {
|
|
1301
|
+
const rect = el.getBoundingClientRect();
|
|
1302
|
+
return {
|
|
1303
|
+
left: rect.left,
|
|
1304
|
+
top: rect.top
|
|
1305
|
+
};
|
|
1306
|
+
}
|
|
1290
1307
|
function hasCSSTransform(el, root, moveClass) {
|
|
1291
1308
|
const clone = el.cloneNode();
|
|
1292
1309
|
const _vtc = el[vtcKey];
|
|
@@ -1594,6 +1611,7 @@ const modifierGuards = {
|
|
|
1594
1611
|
exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m))
|
|
1595
1612
|
};
|
|
1596
1613
|
const withModifiers = (fn, modifiers) => {
|
|
1614
|
+
if (!fn) return fn;
|
|
1597
1615
|
const cache = fn._withMods || (fn._withMods = {});
|
|
1598
1616
|
const cacheKey = modifiers.join(".");
|
|
1599
1617
|
return cache[cacheKey] || (cache[cacheKey] = ((event, ...args) => {
|
package/dist/runtime-dom.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RendererOptions, BaseTransitionProps, FunctionalComponent, ObjectDirective, Directive,
|
|
1
|
+
import { RendererOptions, BaseTransitionProps, FunctionalComponent, ObjectDirective, Directive, App, ComponentCustomElementInterface, ConcreteComponent, CreateAppFunction, SetupContext, RenderFunction, ComponentOptions, ComponentObjectPropsOptions, EmitsOptions, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentInjectOptions, SlotsType, Component, ComponentProvideOptions, ExtractPropTypes, EmitsToProps, ComponentOptionsBase, CreateComponentPublicInstanceWithMixins, ComponentPublicInstance, DefineComponent, VNodeRef, RootHydrateFunction, RootRenderFunction } from '@vue/runtime-core';
|
|
2
2
|
export * from '@vue/runtime-core';
|
|
3
3
|
import * as CSS from 'csstype';
|
|
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
|
**/
|
|
@@ -334,6 +334,7 @@ function warn$2(msg, ...args) {
|
|
|
334
334
|
|
|
335
335
|
let activeEffectScope;
|
|
336
336
|
class EffectScope {
|
|
337
|
+
// TODO isolatedDeclarations "__v_skip"
|
|
337
338
|
constructor(detached = false) {
|
|
338
339
|
this.detached = detached;
|
|
339
340
|
/**
|
|
@@ -353,6 +354,7 @@ class EffectScope {
|
|
|
353
354
|
*/
|
|
354
355
|
this.cleanups = [];
|
|
355
356
|
this._isPaused = false;
|
|
357
|
+
this.__v_skip = true;
|
|
356
358
|
this.parent = activeEffectScope;
|
|
357
359
|
if (!detached && activeEffectScope) {
|
|
358
360
|
this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(
|
|
@@ -3437,7 +3439,22 @@ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }
|
|
|
3437
3439
|
function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, {
|
|
3438
3440
|
o: { nextSibling, parentNode, querySelector, insert, createText }
|
|
3439
3441
|
}, hydrateChildren) {
|
|
3440
|
-
function
|
|
3442
|
+
function hydrateAnchor(target2, targetNode) {
|
|
3443
|
+
let targetAnchor = targetNode;
|
|
3444
|
+
while (targetAnchor) {
|
|
3445
|
+
if (targetAnchor && targetAnchor.nodeType === 8) {
|
|
3446
|
+
if (targetAnchor.data === "teleport start anchor") {
|
|
3447
|
+
vnode.targetStart = targetAnchor;
|
|
3448
|
+
} else if (targetAnchor.data === "teleport anchor") {
|
|
3449
|
+
vnode.targetAnchor = targetAnchor;
|
|
3450
|
+
target2._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor);
|
|
3451
|
+
break;
|
|
3452
|
+
}
|
|
3453
|
+
}
|
|
3454
|
+
targetAnchor = nextSibling(targetAnchor);
|
|
3455
|
+
}
|
|
3456
|
+
}
|
|
3457
|
+
function hydrateDisabledTeleport(node2, vnode2) {
|
|
3441
3458
|
vnode2.anchor = hydrateChildren(
|
|
3442
3459
|
nextSibling(node2),
|
|
3443
3460
|
vnode2,
|
|
@@ -3447,8 +3464,6 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
|
|
|
3447
3464
|
slotScopeIds,
|
|
3448
3465
|
optimized
|
|
3449
3466
|
);
|
|
3450
|
-
vnode2.targetStart = targetStart;
|
|
3451
|
-
vnode2.targetAnchor = targetAnchor;
|
|
3452
3467
|
}
|
|
3453
3468
|
const target = vnode.target = resolveTarget(
|
|
3454
3469
|
vnode.props,
|
|
@@ -3459,27 +3474,22 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
|
|
|
3459
3474
|
const targetNode = target._lpa || target.firstChild;
|
|
3460
3475
|
if (vnode.shapeFlag & 16) {
|
|
3461
3476
|
if (disabled) {
|
|
3462
|
-
hydrateDisabledTeleport(
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3477
|
+
hydrateDisabledTeleport(node, vnode);
|
|
3478
|
+
hydrateAnchor(target, targetNode);
|
|
3479
|
+
if (!vnode.targetAnchor) {
|
|
3480
|
+
prepareAnchor(
|
|
3481
|
+
target,
|
|
3482
|
+
vnode,
|
|
3483
|
+
createText,
|
|
3484
|
+
insert,
|
|
3485
|
+
// if target is the same as the main view, insert anchors before current node
|
|
3486
|
+
// to avoid hydrating mismatch
|
|
3487
|
+
parentNode(node) === target ? node : null
|
|
3488
|
+
);
|
|
3489
|
+
}
|
|
3468
3490
|
} else {
|
|
3469
3491
|
vnode.anchor = nextSibling(node);
|
|
3470
|
-
|
|
3471
|
-
while (targetAnchor) {
|
|
3472
|
-
if (targetAnchor && targetAnchor.nodeType === 8) {
|
|
3473
|
-
if (targetAnchor.data === "teleport start anchor") {
|
|
3474
|
-
vnode.targetStart = targetAnchor;
|
|
3475
|
-
} else if (targetAnchor.data === "teleport anchor") {
|
|
3476
|
-
vnode.targetAnchor = targetAnchor;
|
|
3477
|
-
target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor);
|
|
3478
|
-
break;
|
|
3479
|
-
}
|
|
3480
|
-
}
|
|
3481
|
-
targetAnchor = nextSibling(targetAnchor);
|
|
3482
|
-
}
|
|
3492
|
+
hydrateAnchor(target, targetNode);
|
|
3483
3493
|
if (!vnode.targetAnchor) {
|
|
3484
3494
|
prepareAnchor(target, vnode, createText, insert);
|
|
3485
3495
|
}
|
|
@@ -3497,7 +3507,9 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
|
|
|
3497
3507
|
updateCssVars(vnode, disabled);
|
|
3498
3508
|
} else if (disabled) {
|
|
3499
3509
|
if (vnode.shapeFlag & 16) {
|
|
3500
|
-
hydrateDisabledTeleport(node, vnode
|
|
3510
|
+
hydrateDisabledTeleport(node, vnode);
|
|
3511
|
+
vnode.targetStart = node;
|
|
3512
|
+
vnode.targetAnchor = nextSibling(node);
|
|
3501
3513
|
}
|
|
3502
3514
|
}
|
|
3503
3515
|
return vnode.anchor && nextSibling(vnode.anchor);
|
|
@@ -3521,13 +3533,13 @@ function updateCssVars(vnode, isDisabled) {
|
|
|
3521
3533
|
ctx.ut();
|
|
3522
3534
|
}
|
|
3523
3535
|
}
|
|
3524
|
-
function prepareAnchor(target, vnode, createText, insert) {
|
|
3536
|
+
function prepareAnchor(target, vnode, createText, insert, anchor = null) {
|
|
3525
3537
|
const targetStart = vnode.targetStart = createText("");
|
|
3526
3538
|
const targetAnchor = vnode.targetAnchor = createText("");
|
|
3527
3539
|
targetStart[TeleportEndKey] = targetAnchor;
|
|
3528
3540
|
if (target) {
|
|
3529
|
-
insert(targetStart, target);
|
|
3530
|
-
insert(targetAnchor, target);
|
|
3541
|
+
insert(targetStart, target, anchor);
|
|
3542
|
+
insert(targetAnchor, target, anchor);
|
|
3531
3543
|
}
|
|
3532
3544
|
return targetAnchor;
|
|
3533
3545
|
}
|
|
@@ -3762,7 +3774,7 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
3762
3774
|
}
|
|
3763
3775
|
}
|
|
3764
3776
|
let called = false;
|
|
3765
|
-
|
|
3777
|
+
el[enterCbKey$1] = (cancelled) => {
|
|
3766
3778
|
if (called) return;
|
|
3767
3779
|
called = true;
|
|
3768
3780
|
if (cancelled) {
|
|
@@ -3775,6 +3787,7 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
3775
3787
|
}
|
|
3776
3788
|
el[enterCbKey$1] = void 0;
|
|
3777
3789
|
};
|
|
3790
|
+
const done = el[enterCbKey$1].bind(null, false);
|
|
3778
3791
|
if (hook) {
|
|
3779
3792
|
callAsyncHook(hook, [el, done]);
|
|
3780
3793
|
} else {
|
|
@@ -3794,7 +3807,7 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
3794
3807
|
}
|
|
3795
3808
|
callHook(onBeforeLeave, [el]);
|
|
3796
3809
|
let called = false;
|
|
3797
|
-
|
|
3810
|
+
el[leaveCbKey] = (cancelled) => {
|
|
3798
3811
|
if (called) return;
|
|
3799
3812
|
called = true;
|
|
3800
3813
|
remove();
|
|
@@ -3808,6 +3821,7 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
3808
3821
|
delete leavingVNodesCache[key2];
|
|
3809
3822
|
}
|
|
3810
3823
|
};
|
|
3824
|
+
const done = el[leaveCbKey].bind(null, false);
|
|
3811
3825
|
leavingVNodesCache[key2] = vnode;
|
|
3812
3826
|
if (onLeave) {
|
|
3813
3827
|
callAsyncHook(onLeave, [el, done]);
|
|
@@ -3920,8 +3934,7 @@ function useTemplateRef(key) {
|
|
|
3920
3934
|
const r = shallowRef(null);
|
|
3921
3935
|
if (i) {
|
|
3922
3936
|
const refs = i.refs === EMPTY_OBJ ? i.refs = {} : i.refs;
|
|
3923
|
-
|
|
3924
|
-
if ((desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable) {
|
|
3937
|
+
if (isTemplateRefKey(refs, key)) {
|
|
3925
3938
|
warn$1(`useTemplateRef('${key}') already exists.`);
|
|
3926
3939
|
} else {
|
|
3927
3940
|
Object.defineProperty(refs, key, {
|
|
@@ -3941,6 +3954,10 @@ function useTemplateRef(key) {
|
|
|
3941
3954
|
}
|
|
3942
3955
|
return ret;
|
|
3943
3956
|
}
|
|
3957
|
+
function isTemplateRefKey(refs, key) {
|
|
3958
|
+
let desc;
|
|
3959
|
+
return !!((desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable);
|
|
3960
|
+
}
|
|
3944
3961
|
|
|
3945
3962
|
const pendingSetRefMap = /* @__PURE__ */ new WeakMap();
|
|
3946
3963
|
function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
@@ -3986,10 +4003,19 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
3986
4003
|
return false;
|
|
3987
4004
|
}
|
|
3988
4005
|
}
|
|
4006
|
+
if (isTemplateRefKey(refs, key)) {
|
|
4007
|
+
return false;
|
|
4008
|
+
}
|
|
3989
4009
|
return hasOwn(rawSetupState, key);
|
|
3990
4010
|
};
|
|
3991
|
-
const canSetRef = (ref2) => {
|
|
3992
|
-
|
|
4011
|
+
const canSetRef = (ref2, key) => {
|
|
4012
|
+
if (knownTemplateRefs.has(ref2)) {
|
|
4013
|
+
return false;
|
|
4014
|
+
}
|
|
4015
|
+
if (key && isTemplateRefKey(refs, key)) {
|
|
4016
|
+
return false;
|
|
4017
|
+
}
|
|
4018
|
+
return true;
|
|
3993
4019
|
};
|
|
3994
4020
|
if (oldRef != null && oldRef !== ref) {
|
|
3995
4021
|
invalidatePendingSetRef(oldRawRef);
|
|
@@ -3999,10 +4025,10 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
3999
4025
|
setupState[oldRef] = null;
|
|
4000
4026
|
}
|
|
4001
4027
|
} else if (isRef(oldRef)) {
|
|
4002
|
-
|
|
4028
|
+
const oldRawRefAtom = oldRawRef;
|
|
4029
|
+
if (canSetRef(oldRef, oldRawRefAtom.k)) {
|
|
4003
4030
|
oldRef.value = null;
|
|
4004
4031
|
}
|
|
4005
|
-
const oldRawRefAtom = oldRawRef;
|
|
4006
4032
|
if (oldRawRefAtom.k) refs[oldRawRefAtom.k] = null;
|
|
4007
4033
|
}
|
|
4008
4034
|
}
|
|
@@ -4026,7 +4052,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
4026
4052
|
}
|
|
4027
4053
|
} else {
|
|
4028
4054
|
const newVal = [refValue];
|
|
4029
|
-
if (canSetRef(ref)) {
|
|
4055
|
+
if (canSetRef(ref, rawRef.k)) {
|
|
4030
4056
|
ref.value = newVal;
|
|
4031
4057
|
}
|
|
4032
4058
|
if (rawRef.k) refs[rawRef.k] = newVal;
|
|
@@ -4041,7 +4067,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
4041
4067
|
setupState[ref] = value;
|
|
4042
4068
|
}
|
|
4043
4069
|
} else if (_isRef) {
|
|
4044
|
-
if (canSetRef(ref)) {
|
|
4070
|
+
if (canSetRef(ref, rawRef.k)) {
|
|
4045
4071
|
ref.value = value;
|
|
4046
4072
|
}
|
|
4047
4073
|
if (rawRef.k) refs[rawRef.k] = value;
|
|
@@ -6905,7 +6931,7 @@ function shouldUpdateComponent(prevVNode, nextVNode, optimized) {
|
|
|
6905
6931
|
const dynamicProps = nextVNode.dynamicProps;
|
|
6906
6932
|
for (let i = 0; i < dynamicProps.length; i++) {
|
|
6907
6933
|
const key = dynamicProps[i];
|
|
6908
|
-
if (nextProps
|
|
6934
|
+
if (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emits, key)) {
|
|
6909
6935
|
return true;
|
|
6910
6936
|
}
|
|
6911
6937
|
}
|
|
@@ -6936,12 +6962,20 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
|
|
|
6936
6962
|
}
|
|
6937
6963
|
for (let i = 0; i < nextKeys.length; i++) {
|
|
6938
6964
|
const key = nextKeys[i];
|
|
6939
|
-
if (nextProps
|
|
6965
|
+
if (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
|
|
6940
6966
|
return true;
|
|
6941
6967
|
}
|
|
6942
6968
|
}
|
|
6943
6969
|
return false;
|
|
6944
6970
|
}
|
|
6971
|
+
function hasPropValueChanged(nextProps, prevProps, key) {
|
|
6972
|
+
const nextProp = nextProps[key];
|
|
6973
|
+
const prevProp = prevProps[key];
|
|
6974
|
+
if (key === "style" && isObject(nextProp) && isObject(prevProp)) {
|
|
6975
|
+
return !looseEqual(nextProp, prevProp);
|
|
6976
|
+
}
|
|
6977
|
+
return nextProp !== prevProp;
|
|
6978
|
+
}
|
|
6945
6979
|
function updateHOCHostEl({ vnode, parent }, el) {
|
|
6946
6980
|
while (parent) {
|
|
6947
6981
|
const root = parent.subTree;
|
|
@@ -7645,15 +7679,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7645
7679
|
} else {
|
|
7646
7680
|
const el = n2.el = n1.el;
|
|
7647
7681
|
if (n2.children !== n1.children) {
|
|
7648
|
-
|
|
7649
|
-
const childNodes = container.childNodes;
|
|
7650
|
-
const newChild = hostCreateText(n2.children);
|
|
7651
|
-
const oldChild = childNodes[n2.__elIndex = n1.__elIndex];
|
|
7652
|
-
hostInsert(newChild, container, oldChild);
|
|
7653
|
-
hostRemove(oldChild);
|
|
7654
|
-
} else {
|
|
7655
|
-
hostSetText(el, n2.children);
|
|
7656
|
-
}
|
|
7682
|
+
hostSetText(el, n2.children);
|
|
7657
7683
|
}
|
|
7658
7684
|
}
|
|
7659
7685
|
};
|
|
@@ -7729,7 +7755,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7729
7755
|
optimized
|
|
7730
7756
|
);
|
|
7731
7757
|
} else {
|
|
7732
|
-
const customElement =
|
|
7758
|
+
const customElement = n1.el && n1.el._isVueCE ? n1.el : null;
|
|
7733
7759
|
try {
|
|
7734
7760
|
if (customElement) {
|
|
7735
7761
|
customElement._beginPatch();
|
|
@@ -8211,8 +8237,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8211
8237
|
hydrateSubTree();
|
|
8212
8238
|
}
|
|
8213
8239
|
} else {
|
|
8214
|
-
if (root.ce &&
|
|
8215
|
-
root.ce._def.shadowRoot !== false) {
|
|
8240
|
+
if (root.ce && root.ce._hasShadowRoot()) {
|
|
8216
8241
|
root.ce._injectChildStyle(type);
|
|
8217
8242
|
}
|
|
8218
8243
|
{
|
|
@@ -8267,9 +8292,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8267
8292
|
updateComponentPreRender(instance, next, optimized);
|
|
8268
8293
|
}
|
|
8269
8294
|
nonHydratedAsyncRoot.asyncDep.then(() => {
|
|
8270
|
-
|
|
8271
|
-
|
|
8272
|
-
}
|
|
8295
|
+
queuePostRenderEffect(() => {
|
|
8296
|
+
if (!instance.isUnmounted) update();
|
|
8297
|
+
}, parentSuspense);
|
|
8273
8298
|
});
|
|
8274
8299
|
return;
|
|
8275
8300
|
}
|
|
@@ -8966,12 +8991,10 @@ function traverseStaticChildren(n1, n2, shallow = false) {
|
|
|
8966
8991
|
traverseStaticChildren(c1, c2);
|
|
8967
8992
|
}
|
|
8968
8993
|
if (c2.type === Text) {
|
|
8969
|
-
if (c2.patchFlag
|
|
8970
|
-
c2
|
|
8971
|
-
} else {
|
|
8972
|
-
c2.__elIndex = i + // take fragment start anchor into account
|
|
8973
|
-
(n1.type === Fragment ? 1 : 0);
|
|
8994
|
+
if (c2.patchFlag === -1) {
|
|
8995
|
+
c2 = ch2[i] = cloneIfMounted(c2);
|
|
8974
8996
|
}
|
|
8997
|
+
c2.el = c1.el;
|
|
8975
8998
|
}
|
|
8976
8999
|
if (c2.type === Comment && !c2.el) {
|
|
8977
9000
|
c2.el = c1.el;
|
|
@@ -10697,7 +10720,7 @@ function isMemoSame(cached, memo) {
|
|
|
10697
10720
|
return true;
|
|
10698
10721
|
}
|
|
10699
10722
|
|
|
10700
|
-
const version = "3.5.
|
|
10723
|
+
const version = "3.5.28";
|
|
10701
10724
|
const warn = warn$1 ;
|
|
10702
10725
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
10703
10726
|
const devtools = devtools$1 ;
|
|
@@ -11971,6 +11994,12 @@ class VueElement extends BaseClass {
|
|
|
11971
11994
|
this._update();
|
|
11972
11995
|
}
|
|
11973
11996
|
}
|
|
11997
|
+
/**
|
|
11998
|
+
* @internal
|
|
11999
|
+
*/
|
|
12000
|
+
_hasShadowRoot() {
|
|
12001
|
+
return this._def.shadowRoot !== false;
|
|
12002
|
+
}
|
|
11974
12003
|
/**
|
|
11975
12004
|
* @internal
|
|
11976
12005
|
*/
|
|
@@ -12105,10 +12134,7 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
12105
12134
|
instance
|
|
12106
12135
|
)
|
|
12107
12136
|
);
|
|
12108
|
-
positionMap.set(child,
|
|
12109
|
-
left: child.el.offsetLeft,
|
|
12110
|
-
top: child.el.offsetTop
|
|
12111
|
-
});
|
|
12137
|
+
positionMap.set(child, getPosition(child.el));
|
|
12112
12138
|
}
|
|
12113
12139
|
}
|
|
12114
12140
|
}
|
|
@@ -12139,10 +12165,7 @@ function callPendingCbs(c) {
|
|
|
12139
12165
|
}
|
|
12140
12166
|
}
|
|
12141
12167
|
function recordPosition(c) {
|
|
12142
|
-
newPositionMap.set(c,
|
|
12143
|
-
left: c.el.offsetLeft,
|
|
12144
|
-
top: c.el.offsetTop
|
|
12145
|
-
});
|
|
12168
|
+
newPositionMap.set(c, getPosition(c.el));
|
|
12146
12169
|
}
|
|
12147
12170
|
function applyTranslation(c) {
|
|
12148
12171
|
const oldPos = positionMap.get(c);
|
|
@@ -12150,12 +12173,29 @@ function applyTranslation(c) {
|
|
|
12150
12173
|
const dx = oldPos.left - newPos.left;
|
|
12151
12174
|
const dy = oldPos.top - newPos.top;
|
|
12152
12175
|
if (dx || dy) {
|
|
12153
|
-
const
|
|
12154
|
-
s
|
|
12176
|
+
const el = c.el;
|
|
12177
|
+
const s = el.style;
|
|
12178
|
+
const rect = el.getBoundingClientRect();
|
|
12179
|
+
let scaleX = 1;
|
|
12180
|
+
let scaleY = 1;
|
|
12181
|
+
if (el.offsetWidth) scaleX = rect.width / el.offsetWidth;
|
|
12182
|
+
if (el.offsetHeight) scaleY = rect.height / el.offsetHeight;
|
|
12183
|
+
if (!Number.isFinite(scaleX) || scaleX === 0) scaleX = 1;
|
|
12184
|
+
if (!Number.isFinite(scaleY) || scaleY === 0) scaleY = 1;
|
|
12185
|
+
if (Math.abs(scaleX - 1) < 0.01) scaleX = 1;
|
|
12186
|
+
if (Math.abs(scaleY - 1) < 0.01) scaleY = 1;
|
|
12187
|
+
s.transform = s.webkitTransform = `translate(${dx / scaleX}px,${dy / scaleY}px)`;
|
|
12155
12188
|
s.transitionDuration = "0s";
|
|
12156
12189
|
return c;
|
|
12157
12190
|
}
|
|
12158
12191
|
}
|
|
12192
|
+
function getPosition(el) {
|
|
12193
|
+
const rect = el.getBoundingClientRect();
|
|
12194
|
+
return {
|
|
12195
|
+
left: rect.left,
|
|
12196
|
+
top: rect.top
|
|
12197
|
+
};
|
|
12198
|
+
}
|
|
12159
12199
|
function hasCSSTransform(el, root, moveClass) {
|
|
12160
12200
|
const clone = el.cloneNode();
|
|
12161
12201
|
const _vtc = el[vtcKey];
|
|
@@ -12466,6 +12506,7 @@ const modifierGuards = {
|
|
|
12466
12506
|
exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m))
|
|
12467
12507
|
};
|
|
12468
12508
|
const withModifiers = (fn, modifiers) => {
|
|
12509
|
+
if (!fn) return fn;
|
|
12469
12510
|
const cache = fn._withMods || (fn._withMods = {});
|
|
12470
12511
|
const cacheKey = modifiers.join(".");
|
|
12471
12512
|
return cache[cacheKey] || (cache[cacheKey] = ((event, ...args) => {
|