@cabloy/vue-runtime-core 3.4.35 → 3.4.37
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/README.md +1 -1
- package/dist/runtime-core.cjs.js +79 -44
- package/dist/runtime-core.cjs.prod.js +77 -54
- package/dist/runtime-core.d.ts +4 -4
- package/dist/runtime-core.esm-bundler.js +79 -44
- package/package.json +3 -3
package/README.md
CHANGED
package/dist/runtime-core.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @cabloy/vue-runtime-core v3.4.
|
|
2
|
+
* @cabloy/vue-runtime-core v3.4.37
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -1359,7 +1359,7 @@ const KeepAliveImpl = {
|
|
|
1359
1359
|
}
|
|
1360
1360
|
function pruneCacheEntry(key) {
|
|
1361
1361
|
const cached = cache.get(key);
|
|
1362
|
-
if (!current || !isSameVNodeType(cached, current)) {
|
|
1362
|
+
if (cached && (!current || !isSameVNodeType(cached, current))) {
|
|
1363
1363
|
unmount(cached);
|
|
1364
1364
|
} else if (current) {
|
|
1365
1365
|
resetShapeFlag(current);
|
|
@@ -1421,6 +1421,10 @@ const KeepAliveImpl = {
|
|
|
1421
1421
|
return rawVNode;
|
|
1422
1422
|
}
|
|
1423
1423
|
let vnode = getInnerChild(rawVNode);
|
|
1424
|
+
if (vnode.type === Comment) {
|
|
1425
|
+
current = null;
|
|
1426
|
+
return vnode;
|
|
1427
|
+
}
|
|
1424
1428
|
const comp = vnode.type;
|
|
1425
1429
|
const name = getComponentName(
|
|
1426
1430
|
isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp
|
|
@@ -2716,7 +2720,7 @@ function provide(key, value) {
|
|
|
2716
2720
|
function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
2717
2721
|
const instance = currentInstance || currentRenderingInstance;
|
|
2718
2722
|
if (instance || currentApp) {
|
|
2719
|
-
const provides = instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides :
|
|
2723
|
+
const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
|
|
2720
2724
|
if (provides && key in provides) {
|
|
2721
2725
|
return provides[key];
|
|
2722
2726
|
} else if (arguments.length > 1) {
|
|
@@ -2985,14 +2989,27 @@ function normalizePropsOptions(comp, appContext, asMixin = false) {
|
|
|
2985
2989
|
if (validatePropName(normalizedKey)) {
|
|
2986
2990
|
const opt = raw[key];
|
|
2987
2991
|
const prop = normalized[normalizedKey] = shared.isArray(opt) || shared.isFunction(opt) ? { type: opt } : shared.extend({}, opt);
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2992
|
+
const propType = prop.type;
|
|
2993
|
+
let shouldCast = false;
|
|
2994
|
+
let shouldCastTrue = true;
|
|
2995
|
+
if (shared.isArray(propType)) {
|
|
2996
|
+
for (let index = 0; index < propType.length; ++index) {
|
|
2997
|
+
const type = propType[index];
|
|
2998
|
+
const typeName = shared.isFunction(type) && type.name;
|
|
2999
|
+
if (typeName === "Boolean") {
|
|
3000
|
+
shouldCast = true;
|
|
3001
|
+
break;
|
|
3002
|
+
} else if (typeName === "String") {
|
|
3003
|
+
shouldCastTrue = false;
|
|
3004
|
+
}
|
|
2995
3005
|
}
|
|
3006
|
+
} else {
|
|
3007
|
+
shouldCast = shared.isFunction(propType) && propType.name === "Boolean";
|
|
3008
|
+
}
|
|
3009
|
+
prop[0 /* shouldCast */] = shouldCast;
|
|
3010
|
+
prop[1 /* shouldCastTrue */] = shouldCastTrue;
|
|
3011
|
+
if (shouldCast || shared.hasOwn(prop, "default")) {
|
|
3012
|
+
needCastKeys.push(normalizedKey);
|
|
2996
3013
|
}
|
|
2997
3014
|
}
|
|
2998
3015
|
}
|
|
@@ -3023,17 +3040,6 @@ function getType(ctor) {
|
|
|
3023
3040
|
}
|
|
3024
3041
|
return "";
|
|
3025
3042
|
}
|
|
3026
|
-
function isSameType(a, b) {
|
|
3027
|
-
return getType(a) === getType(b);
|
|
3028
|
-
}
|
|
3029
|
-
function getTypeIndex(type, expectedTypes) {
|
|
3030
|
-
if (shared.isArray(expectedTypes)) {
|
|
3031
|
-
return expectedTypes.findIndex((t) => isSameType(t, type));
|
|
3032
|
-
} else if (shared.isFunction(expectedTypes)) {
|
|
3033
|
-
return isSameType(expectedTypes, type) ? 0 : -1;
|
|
3034
|
-
}
|
|
3035
|
-
return -1;
|
|
3036
|
-
}
|
|
3037
3043
|
function validateProps(rawProps, props, instance) {
|
|
3038
3044
|
const resolvedValues = reactivity.toRaw(props);
|
|
3039
3045
|
const options = instance.propsOptions[0];
|
|
@@ -3373,15 +3379,11 @@ const TeleportImpl = {
|
|
|
3373
3379
|
if (n1 == null) {
|
|
3374
3380
|
const placeholder = n2.el = createComment("teleport start") ;
|
|
3375
3381
|
const mainAnchor = n2.anchor = createComment("teleport end") ;
|
|
3376
|
-
const target = n2.target = resolveTarget(n2.props, querySelector);
|
|
3377
|
-
const targetStart = n2.targetStart = createText("");
|
|
3378
|
-
const targetAnchor = n2.targetAnchor = createText("");
|
|
3379
3382
|
insert(placeholder, container, anchor);
|
|
3380
3383
|
insert(mainAnchor, container, anchor);
|
|
3381
|
-
|
|
3384
|
+
const target = n2.target = resolveTarget(n2.props, querySelector);
|
|
3385
|
+
const targetAnchor = prepareAnchor(target, n2, createText, insert);
|
|
3382
3386
|
if (target) {
|
|
3383
|
-
insert(targetStart, target);
|
|
3384
|
-
insert(targetAnchor, target);
|
|
3385
3387
|
if (namespace === "svg" || isTargetSVG(target)) {
|
|
3386
3388
|
namespace = "svg";
|
|
3387
3389
|
} else if (namespace === "mathml" || isTargetMathML(target)) {
|
|
@@ -3553,7 +3555,7 @@ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }
|
|
|
3553
3555
|
}
|
|
3554
3556
|
}
|
|
3555
3557
|
function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, {
|
|
3556
|
-
o: { nextSibling, parentNode, querySelector }
|
|
3558
|
+
o: { nextSibling, parentNode, querySelector, insert, createText }
|
|
3557
3559
|
}, hydrateChildren) {
|
|
3558
3560
|
const target = vnode.target = resolveTarget(
|
|
3559
3561
|
vnode.props,
|
|
@@ -3572,20 +3574,28 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
|
|
|
3572
3574
|
slotScopeIds,
|
|
3573
3575
|
optimized
|
|
3574
3576
|
);
|
|
3575
|
-
vnode.
|
|
3577
|
+
vnode.targetStart = targetNode;
|
|
3578
|
+
vnode.targetAnchor = targetNode && nextSibling(targetNode);
|
|
3576
3579
|
} else {
|
|
3577
3580
|
vnode.anchor = nextSibling(node);
|
|
3578
3581
|
let targetAnchor = targetNode;
|
|
3579
3582
|
while (targetAnchor) {
|
|
3580
|
-
targetAnchor
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3583
|
+
if (targetAnchor && targetAnchor.nodeType === 8) {
|
|
3584
|
+
if (targetAnchor.data === "teleport start anchor") {
|
|
3585
|
+
vnode.targetStart = targetAnchor;
|
|
3586
|
+
} else if (targetAnchor.data === "teleport anchor") {
|
|
3587
|
+
vnode.targetAnchor = targetAnchor;
|
|
3588
|
+
target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor);
|
|
3589
|
+
break;
|
|
3590
|
+
}
|
|
3585
3591
|
}
|
|
3592
|
+
targetAnchor = nextSibling(targetAnchor);
|
|
3593
|
+
}
|
|
3594
|
+
if (!vnode.targetAnchor) {
|
|
3595
|
+
prepareAnchor(target, vnode, createText, insert);
|
|
3586
3596
|
}
|
|
3587
3597
|
hydrateChildren(
|
|
3588
|
-
targetNode,
|
|
3598
|
+
targetNode && nextSibling(targetNode),
|
|
3589
3599
|
vnode,
|
|
3590
3600
|
target,
|
|
3591
3601
|
parentComponent,
|
|
@@ -3611,6 +3621,16 @@ function updateCssVars(vnode) {
|
|
|
3611
3621
|
ctx.ut();
|
|
3612
3622
|
}
|
|
3613
3623
|
}
|
|
3624
|
+
function prepareAnchor(target, vnode, createText, insert) {
|
|
3625
|
+
const targetStart = vnode.targetStart = createText("");
|
|
3626
|
+
const targetAnchor = vnode.targetAnchor = createText("");
|
|
3627
|
+
targetStart[TeleportEndKey] = targetAnchor;
|
|
3628
|
+
if (target) {
|
|
3629
|
+
insert(targetStart, target);
|
|
3630
|
+
insert(targetAnchor, target);
|
|
3631
|
+
}
|
|
3632
|
+
return targetAnchor;
|
|
3633
|
+
}
|
|
3614
3634
|
|
|
3615
3635
|
let hasLoggedMismatchError = false;
|
|
3616
3636
|
const logMismatchError = () => {
|
|
@@ -3894,6 +3914,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
3894
3914
|
}
|
|
3895
3915
|
if (props) {
|
|
3896
3916
|
{
|
|
3917
|
+
const isCustomElement = el.tagName.includes("-");
|
|
3897
3918
|
for (const key in props) {
|
|
3898
3919
|
if (// #11189 skip if this node has directives that have created hooks
|
|
3899
3920
|
// as it could have mutated the DOM in any possible way
|
|
@@ -3901,7 +3922,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
3901
3922
|
logMismatchError();
|
|
3902
3923
|
}
|
|
3903
3924
|
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || shared.isOn(key) && !shared.isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
3904
|
-
key[0] === ".") {
|
|
3925
|
+
key[0] === "." || isCustomElement) {
|
|
3905
3926
|
patchProp(el, key, null, props[key], void 0, parentComponent);
|
|
3906
3927
|
}
|
|
3907
3928
|
}
|
|
@@ -4917,7 +4938,16 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4917
4938
|
() => !instance.isUnmounted && hydrateSubTree()
|
|
4918
4939
|
);
|
|
4919
4940
|
} else {
|
|
4920
|
-
|
|
4941
|
+
const zova = instance.ctx._.zova;
|
|
4942
|
+
if (zova) {
|
|
4943
|
+
zova.meta.ssr.increase();
|
|
4944
|
+
zova.meta.state.inited.wait().then(() => {
|
|
4945
|
+
!instance.isUnmounted && hydrateSubTree();
|
|
4946
|
+
zova.meta.ssr.decrease();
|
|
4947
|
+
});
|
|
4948
|
+
} else {
|
|
4949
|
+
hydrateSubTree();
|
|
4950
|
+
}
|
|
4921
4951
|
}
|
|
4922
4952
|
} else {
|
|
4923
4953
|
{
|
|
@@ -4964,6 +4994,10 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4964
4994
|
initialVNode = container = anchor = null;
|
|
4965
4995
|
} else {
|
|
4966
4996
|
let { next, bu, u, parent, vnode } = instance;
|
|
4997
|
+
const zova = instance.ctx._.zova;
|
|
4998
|
+
if (zova && zova.meta.ssr.isRuntimeSsrPreHydration) {
|
|
4999
|
+
return;
|
|
5000
|
+
}
|
|
4967
5001
|
{
|
|
4968
5002
|
const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance);
|
|
4969
5003
|
if (nonHydratedAsyncRoot) {
|
|
@@ -5599,13 +5633,13 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5599
5633
|
namespace
|
|
5600
5634
|
);
|
|
5601
5635
|
}
|
|
5636
|
+
container._vnode = vnode;
|
|
5602
5637
|
if (!isFlushing) {
|
|
5603
5638
|
isFlushing = true;
|
|
5604
5639
|
flushPreFlushCbs();
|
|
5605
5640
|
flushPostFlushCbs();
|
|
5606
5641
|
isFlushing = false;
|
|
5607
5642
|
}
|
|
5608
|
-
container._vnode = vnode;
|
|
5609
5643
|
};
|
|
5610
5644
|
const internals = {
|
|
5611
5645
|
p: patch,
|
|
@@ -6033,7 +6067,8 @@ function useModel(props, name, options = shared.EMPTY_OBJ) {
|
|
|
6033
6067
|
return options.get ? options.get(localValue) : localValue;
|
|
6034
6068
|
},
|
|
6035
6069
|
set(value) {
|
|
6036
|
-
|
|
6070
|
+
const emittedValue = options.set ? options.set(value) : value;
|
|
6071
|
+
if (!shared.hasChanged(emittedValue, localValue) && !(prevSetValue !== shared.EMPTY_OBJ && shared.hasChanged(value, prevSetValue))) {
|
|
6037
6072
|
return;
|
|
6038
6073
|
}
|
|
6039
6074
|
const rawProps = i.vnode.props;
|
|
@@ -6042,7 +6077,6 @@ function useModel(props, name, options = shared.EMPTY_OBJ) {
|
|
|
6042
6077
|
localValue = value;
|
|
6043
6078
|
trigger();
|
|
6044
6079
|
}
|
|
6045
|
-
const emittedValue = options.set ? options.set(value) : value;
|
|
6046
6080
|
i.emit(`update:${name}`, emittedValue);
|
|
6047
6081
|
if (shared.hasChanged(value, emittedValue) && shared.hasChanged(value, prevSetValue) && !shared.hasChanged(emittedValue, prevEmittedValue)) {
|
|
6048
6082
|
trigger();
|
|
@@ -6080,9 +6114,9 @@ function emit(instance, event, ...rawArgs) {
|
|
|
6080
6114
|
} = instance;
|
|
6081
6115
|
if (emitsOptions) {
|
|
6082
6116
|
if (!(event in emitsOptions) && true) {
|
|
6083
|
-
if (!propsOptions || !(shared.toHandlerKey(event) in propsOptions)) {
|
|
6117
|
+
if (!propsOptions || !(shared.toHandlerKey(shared.camelize(event)) in propsOptions)) {
|
|
6084
6118
|
warn$1(
|
|
6085
|
-
`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${shared.toHandlerKey(event)}" prop.`
|
|
6119
|
+
`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${shared.toHandlerKey(shared.camelize(event))}" prop.`
|
|
6086
6120
|
);
|
|
6087
6121
|
}
|
|
6088
6122
|
} else {
|
|
@@ -8122,7 +8156,7 @@ function isMemoSame(cached, memo) {
|
|
|
8122
8156
|
return true;
|
|
8123
8157
|
}
|
|
8124
8158
|
|
|
8125
|
-
const version = "3.4.
|
|
8159
|
+
const version = "3.4.37";
|
|
8126
8160
|
const warn = warn$1 ;
|
|
8127
8161
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
8128
8162
|
const devtools = devtools$1 ;
|
|
@@ -8134,7 +8168,8 @@ const _ssrUtils = {
|
|
|
8134
8168
|
setCurrentRenderingInstance,
|
|
8135
8169
|
isVNode: isVNode,
|
|
8136
8170
|
normalizeVNode,
|
|
8137
|
-
getComponentPublicInstance
|
|
8171
|
+
getComponentPublicInstance,
|
|
8172
|
+
ensureValidVNode
|
|
8138
8173
|
};
|
|
8139
8174
|
const ssrUtils = _ssrUtils ;
|
|
8140
8175
|
const resolveFilter = null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @cabloy/vue-runtime-core v3.4.
|
|
2
|
+
* @cabloy/vue-runtime-core v3.4.37
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -928,7 +928,7 @@ const KeepAliveImpl = {
|
|
|
928
928
|
}
|
|
929
929
|
function pruneCacheEntry(key) {
|
|
930
930
|
const cached = cache.get(key);
|
|
931
|
-
if (!current || !isSameVNodeType(cached, current)) {
|
|
931
|
+
if (cached && (!current || !isSameVNodeType(cached, current))) {
|
|
932
932
|
unmount(cached);
|
|
933
933
|
} else if (current) {
|
|
934
934
|
resetShapeFlag(current);
|
|
@@ -987,6 +987,10 @@ const KeepAliveImpl = {
|
|
|
987
987
|
return rawVNode;
|
|
988
988
|
}
|
|
989
989
|
let vnode = getInnerChild(rawVNode);
|
|
990
|
+
if (vnode.type === Comment) {
|
|
991
|
+
current = null;
|
|
992
|
+
return vnode;
|
|
993
|
+
}
|
|
990
994
|
const comp = vnode.type;
|
|
991
995
|
const name = getComponentName(
|
|
992
996
|
isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp
|
|
@@ -1971,7 +1975,7 @@ function provide(key, value) {
|
|
|
1971
1975
|
function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
1972
1976
|
const instance = currentInstance || currentRenderingInstance;
|
|
1973
1977
|
if (instance || currentApp) {
|
|
1974
|
-
const provides = instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides :
|
|
1978
|
+
const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
|
|
1975
1979
|
if (provides && key in provides) {
|
|
1976
1980
|
return provides[key];
|
|
1977
1981
|
} else if (arguments.length > 1) {
|
|
@@ -2218,14 +2222,27 @@ function normalizePropsOptions(comp, appContext, asMixin = false) {
|
|
|
2218
2222
|
if (validatePropName(normalizedKey)) {
|
|
2219
2223
|
const opt = raw[key];
|
|
2220
2224
|
const prop = normalized[normalizedKey] = shared.isArray(opt) || shared.isFunction(opt) ? { type: opt } : shared.extend({}, opt);
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2225
|
+
const propType = prop.type;
|
|
2226
|
+
let shouldCast = false;
|
|
2227
|
+
let shouldCastTrue = true;
|
|
2228
|
+
if (shared.isArray(propType)) {
|
|
2229
|
+
for (let index = 0; index < propType.length; ++index) {
|
|
2230
|
+
const type = propType[index];
|
|
2231
|
+
const typeName = shared.isFunction(type) && type.name;
|
|
2232
|
+
if (typeName === "Boolean") {
|
|
2233
|
+
shouldCast = true;
|
|
2234
|
+
break;
|
|
2235
|
+
} else if (typeName === "String") {
|
|
2236
|
+
shouldCastTrue = false;
|
|
2237
|
+
}
|
|
2228
2238
|
}
|
|
2239
|
+
} else {
|
|
2240
|
+
shouldCast = shared.isFunction(propType) && propType.name === "Boolean";
|
|
2241
|
+
}
|
|
2242
|
+
prop[0 /* shouldCast */] = shouldCast;
|
|
2243
|
+
prop[1 /* shouldCastTrue */] = shouldCastTrue;
|
|
2244
|
+
if (shouldCast || shared.hasOwn(prop, "default")) {
|
|
2245
|
+
needCastKeys.push(normalizedKey);
|
|
2229
2246
|
}
|
|
2230
2247
|
}
|
|
2231
2248
|
}
|
|
@@ -2242,29 +2259,6 @@ function validatePropName(key) {
|
|
|
2242
2259
|
}
|
|
2243
2260
|
return false;
|
|
2244
2261
|
}
|
|
2245
|
-
function getType(ctor) {
|
|
2246
|
-
if (ctor === null) {
|
|
2247
|
-
return "null";
|
|
2248
|
-
}
|
|
2249
|
-
if (typeof ctor === "function") {
|
|
2250
|
-
return ctor.name || "";
|
|
2251
|
-
} else if (typeof ctor === "object") {
|
|
2252
|
-
const name = ctor.constructor && ctor.constructor.name;
|
|
2253
|
-
return name || "";
|
|
2254
|
-
}
|
|
2255
|
-
return "";
|
|
2256
|
-
}
|
|
2257
|
-
function isSameType(a, b) {
|
|
2258
|
-
return getType(a) === getType(b);
|
|
2259
|
-
}
|
|
2260
|
-
function getTypeIndex(type, expectedTypes) {
|
|
2261
|
-
if (shared.isArray(expectedTypes)) {
|
|
2262
|
-
return expectedTypes.findIndex((t) => isSameType(t, type));
|
|
2263
|
-
} else if (shared.isFunction(expectedTypes)) {
|
|
2264
|
-
return isSameType(expectedTypes, type) ? 0 : -1;
|
|
2265
|
-
}
|
|
2266
|
-
return -1;
|
|
2267
|
-
}
|
|
2268
2262
|
|
|
2269
2263
|
const isInternalKey = (key) => key[0] === "_" || key === "$stable";
|
|
2270
2264
|
const normalizeSlotValue = (value) => shared.isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
|
|
@@ -2460,15 +2454,11 @@ const TeleportImpl = {
|
|
|
2460
2454
|
if (n1 == null) {
|
|
2461
2455
|
const placeholder = n2.el = createText("");
|
|
2462
2456
|
const mainAnchor = n2.anchor = createText("");
|
|
2463
|
-
const target = n2.target = resolveTarget(n2.props, querySelector);
|
|
2464
|
-
const targetStart = n2.targetStart = createText("");
|
|
2465
|
-
const targetAnchor = n2.targetAnchor = createText("");
|
|
2466
2457
|
insert(placeholder, container, anchor);
|
|
2467
2458
|
insert(mainAnchor, container, anchor);
|
|
2468
|
-
|
|
2459
|
+
const target = n2.target = resolveTarget(n2.props, querySelector);
|
|
2460
|
+
const targetAnchor = prepareAnchor(target, n2, createText, insert);
|
|
2469
2461
|
if (target) {
|
|
2470
|
-
insert(targetStart, target);
|
|
2471
|
-
insert(targetAnchor, target);
|
|
2472
2462
|
if (namespace === "svg" || isTargetSVG(target)) {
|
|
2473
2463
|
namespace = "svg";
|
|
2474
2464
|
} else if (namespace === "mathml" || isTargetMathML(target)) {
|
|
@@ -2632,7 +2622,7 @@ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }
|
|
|
2632
2622
|
}
|
|
2633
2623
|
}
|
|
2634
2624
|
function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, {
|
|
2635
|
-
o: { nextSibling, parentNode, querySelector }
|
|
2625
|
+
o: { nextSibling, parentNode, querySelector, insert, createText }
|
|
2636
2626
|
}, hydrateChildren) {
|
|
2637
2627
|
const target = vnode.target = resolveTarget(
|
|
2638
2628
|
vnode.props,
|
|
@@ -2651,20 +2641,28 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
|
|
|
2651
2641
|
slotScopeIds,
|
|
2652
2642
|
optimized
|
|
2653
2643
|
);
|
|
2654
|
-
vnode.
|
|
2644
|
+
vnode.targetStart = targetNode;
|
|
2645
|
+
vnode.targetAnchor = targetNode && nextSibling(targetNode);
|
|
2655
2646
|
} else {
|
|
2656
2647
|
vnode.anchor = nextSibling(node);
|
|
2657
2648
|
let targetAnchor = targetNode;
|
|
2658
2649
|
while (targetAnchor) {
|
|
2659
|
-
targetAnchor
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2650
|
+
if (targetAnchor && targetAnchor.nodeType === 8) {
|
|
2651
|
+
if (targetAnchor.data === "teleport start anchor") {
|
|
2652
|
+
vnode.targetStart = targetAnchor;
|
|
2653
|
+
} else if (targetAnchor.data === "teleport anchor") {
|
|
2654
|
+
vnode.targetAnchor = targetAnchor;
|
|
2655
|
+
target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor);
|
|
2656
|
+
break;
|
|
2657
|
+
}
|
|
2664
2658
|
}
|
|
2659
|
+
targetAnchor = nextSibling(targetAnchor);
|
|
2660
|
+
}
|
|
2661
|
+
if (!vnode.targetAnchor) {
|
|
2662
|
+
prepareAnchor(target, vnode, createText, insert);
|
|
2665
2663
|
}
|
|
2666
2664
|
hydrateChildren(
|
|
2667
|
-
targetNode,
|
|
2665
|
+
targetNode && nextSibling(targetNode),
|
|
2668
2666
|
vnode,
|
|
2669
2667
|
target,
|
|
2670
2668
|
parentComponent,
|
|
@@ -2690,6 +2688,16 @@ function updateCssVars(vnode) {
|
|
|
2690
2688
|
ctx.ut();
|
|
2691
2689
|
}
|
|
2692
2690
|
}
|
|
2691
|
+
function prepareAnchor(target, vnode, createText, insert) {
|
|
2692
|
+
const targetStart = vnode.targetStart = createText("");
|
|
2693
|
+
const targetAnchor = vnode.targetAnchor = createText("");
|
|
2694
|
+
targetStart[TeleportEndKey] = targetAnchor;
|
|
2695
|
+
if (target) {
|
|
2696
|
+
insert(targetStart, target);
|
|
2697
|
+
insert(targetAnchor, target);
|
|
2698
|
+
}
|
|
2699
|
+
return targetAnchor;
|
|
2700
|
+
}
|
|
2693
2701
|
|
|
2694
2702
|
let hasLoggedMismatchError = false;
|
|
2695
2703
|
const logMismatchError = () => {
|
|
@@ -2938,9 +2946,10 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
2938
2946
|
}
|
|
2939
2947
|
if (props) {
|
|
2940
2948
|
if (forcePatch || !optimized || patchFlag & (16 | 32)) {
|
|
2949
|
+
const isCustomElement = el.tagName.includes("-");
|
|
2941
2950
|
for (const key in props) {
|
|
2942
2951
|
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || shared.isOn(key) && !shared.isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
2943
|
-
key[0] === ".") {
|
|
2952
|
+
key[0] === "." || isCustomElement) {
|
|
2944
2953
|
patchProp(el, key, null, props[key], void 0, parentComponent);
|
|
2945
2954
|
}
|
|
2946
2955
|
}
|
|
@@ -3721,7 +3730,16 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3721
3730
|
() => !instance.isUnmounted && hydrateSubTree()
|
|
3722
3731
|
);
|
|
3723
3732
|
} else {
|
|
3724
|
-
|
|
3733
|
+
const zova = instance.ctx._.zova;
|
|
3734
|
+
if (zova) {
|
|
3735
|
+
zova.meta.ssr.increase();
|
|
3736
|
+
zova.meta.state.inited.wait().then(() => {
|
|
3737
|
+
!instance.isUnmounted && hydrateSubTree();
|
|
3738
|
+
zova.meta.ssr.decrease();
|
|
3739
|
+
});
|
|
3740
|
+
} else {
|
|
3741
|
+
hydrateSubTree();
|
|
3742
|
+
}
|
|
3725
3743
|
}
|
|
3726
3744
|
} else {
|
|
3727
3745
|
const subTree = instance.subTree = renderComponentRoot(instance);
|
|
@@ -3753,6 +3771,10 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3753
3771
|
initialVNode = container = anchor = null;
|
|
3754
3772
|
} else {
|
|
3755
3773
|
let { next, bu, u, parent, vnode } = instance;
|
|
3774
|
+
const zova = instance.ctx._.zova;
|
|
3775
|
+
if (zova && zova.meta.ssr.isRuntimeSsrPreHydration) {
|
|
3776
|
+
return;
|
|
3777
|
+
}
|
|
3756
3778
|
{
|
|
3757
3779
|
const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance);
|
|
3758
3780
|
if (nonHydratedAsyncRoot) {
|
|
@@ -4342,13 +4364,13 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4342
4364
|
namespace
|
|
4343
4365
|
);
|
|
4344
4366
|
}
|
|
4367
|
+
container._vnode = vnode;
|
|
4345
4368
|
if (!isFlushing) {
|
|
4346
4369
|
isFlushing = true;
|
|
4347
4370
|
flushPreFlushCbs();
|
|
4348
4371
|
flushPostFlushCbs();
|
|
4349
4372
|
isFlushing = false;
|
|
4350
4373
|
}
|
|
4351
|
-
container._vnode = vnode;
|
|
4352
4374
|
};
|
|
4353
4375
|
const internals = {
|
|
4354
4376
|
p: patch,
|
|
@@ -4719,7 +4741,8 @@ function useModel(props, name, options = shared.EMPTY_OBJ) {
|
|
|
4719
4741
|
return options.get ? options.get(localValue) : localValue;
|
|
4720
4742
|
},
|
|
4721
4743
|
set(value) {
|
|
4722
|
-
|
|
4744
|
+
const emittedValue = options.set ? options.set(value) : value;
|
|
4745
|
+
if (!shared.hasChanged(emittedValue, localValue) && !(prevSetValue !== shared.EMPTY_OBJ && shared.hasChanged(value, prevSetValue))) {
|
|
4723
4746
|
return;
|
|
4724
4747
|
}
|
|
4725
4748
|
const rawProps = i.vnode.props;
|
|
@@ -4728,7 +4751,6 @@ function useModel(props, name, options = shared.EMPTY_OBJ) {
|
|
|
4728
4751
|
localValue = value;
|
|
4729
4752
|
trigger();
|
|
4730
4753
|
}
|
|
4731
|
-
const emittedValue = options.set ? options.set(value) : value;
|
|
4732
4754
|
i.emit(`update:${name}`, emittedValue);
|
|
4733
4755
|
if (shared.hasChanged(value, emittedValue) && shared.hasChanged(value, prevSetValue) && !shared.hasChanged(emittedValue, prevEmittedValue)) {
|
|
4734
4756
|
trigger();
|
|
@@ -6304,7 +6326,7 @@ function isMemoSame(cached, memo) {
|
|
|
6304
6326
|
return true;
|
|
6305
6327
|
}
|
|
6306
6328
|
|
|
6307
|
-
const version = "3.4.
|
|
6329
|
+
const version = "3.4.37";
|
|
6308
6330
|
const warn$1 = shared.NOOP;
|
|
6309
6331
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
6310
6332
|
const devtools = void 0;
|
|
@@ -6316,7 +6338,8 @@ const _ssrUtils = {
|
|
|
6316
6338
|
setCurrentRenderingInstance,
|
|
6317
6339
|
isVNode: isVNode,
|
|
6318
6340
|
normalizeVNode,
|
|
6319
|
-
getComponentPublicInstance
|
|
6341
|
+
getComponentPublicInstance,
|
|
6342
|
+
ensureValidVNode
|
|
6320
6343
|
};
|
|
6321
6344
|
const ssrUtils = _ssrUtils ;
|
|
6322
6345
|
const resolveFilter = null;
|
package/dist/runtime-core.d.ts
CHANGED
|
@@ -507,7 +507,7 @@ export interface ObjectDirective<T = any, V = any> {
|
|
|
507
507
|
export type FunctionDirective<T = any, V = any> = DirectiveHook<T, any, V>;
|
|
508
508
|
export type Directive<T = any, V = any> = ObjectDirective<T, V> | FunctionDirective<T, V>;
|
|
509
509
|
type DirectiveModifiers = Record<string, boolean>;
|
|
510
|
-
export type DirectiveArguments = Array<[Directive | undefined] | [Directive | undefined, any] | [Directive | undefined, any, string] | [Directive | undefined, any, string, DirectiveModifiers]>;
|
|
510
|
+
export type DirectiveArguments = Array<[Directive | undefined] | [Directive | undefined, any] | [Directive | undefined, any, string] | [Directive | undefined, any, string | undefined, DirectiveModifiers]>;
|
|
511
511
|
/**
|
|
512
512
|
* Adds directives to a VNode.
|
|
513
513
|
*/
|
|
@@ -846,7 +846,7 @@ declare enum TeleportMoveTypes {
|
|
|
846
846
|
REORDER = 2
|
|
847
847
|
}
|
|
848
848
|
declare function moveTeleport(vnode: VNode, container: RendererElement, parentAnchor: RendererNode | null, { o: { insert }, m: move }: RendererInternals, moveType?: TeleportMoveTypes): void;
|
|
849
|
-
declare function hydrateTeleport(node: Node, vnode: TeleportVNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean, { o: { nextSibling, parentNode, querySelector }, }: RendererInternals<Node, Element>, hydrateChildren: (node: Node | null, vnode: VNode, container: Element, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean) => Node | null): Node | null;
|
|
849
|
+
declare function hydrateTeleport(node: Node, vnode: TeleportVNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean, { o: { nextSibling, parentNode, querySelector, insert, createText }, }: RendererInternals<Node, Element>, hydrateChildren: (node: Node | null, vnode: VNode, container: Element, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean) => Node | null): Node | null;
|
|
850
850
|
export declare const Teleport: {
|
|
851
851
|
new (): {
|
|
852
852
|
$props: VNodeProps & TeleportProps;
|
|
@@ -1147,7 +1147,7 @@ export declare function registerRuntimeCompiler(_compile: any): void;
|
|
|
1147
1147
|
export declare const isRuntimeOnly: () => boolean;
|
|
1148
1148
|
|
|
1149
1149
|
export type WatchEffect = (onCleanup: OnCleanup) => void;
|
|
1150
|
-
export type WatchSource<T = any> = Ref<T
|
|
1150
|
+
export type WatchSource<T = any> = Ref<T> | ComputedRef<T> | (() => T);
|
|
1151
1151
|
export type WatchCallback<V = any, OV = any> = (value: V, oldValue: OV, onCleanup: OnCleanup) => any;
|
|
1152
1152
|
type MaybeUndefined<T, I> = I extends true ? T | undefined : T;
|
|
1153
1153
|
type MapSources<T, Immediate> = {
|
|
@@ -1357,7 +1357,7 @@ type InferDefaults<T> = {
|
|
|
1357
1357
|
type NativeType = null | number | string | boolean | symbol | Function;
|
|
1358
1358
|
type InferDefault<P, T> = ((props: P) => T & {}) | (T extends NativeType ? T : never);
|
|
1359
1359
|
type PropsWithDefaults<T, Defaults extends InferDefaults<T>, BKeys extends keyof T> = Readonly<MappedOmit<T, keyof Defaults>> & {
|
|
1360
|
-
readonly [K in keyof Defaults]-?: K extends keyof T ? Defaults[K] extends undefined ? T[K] : NotUndefined<T[K]> : never;
|
|
1360
|
+
readonly [K in keyof Defaults]-?: K extends keyof T ? Defaults[K] extends undefined ? IfAny<Defaults[K], NotUndefined<T[K]>, T[K]> : NotUndefined<T[K]> : never;
|
|
1361
1361
|
} & {
|
|
1362
1362
|
readonly [K in BKeys]-?: K extends keyof Defaults ? Defaults[K] extends undefined ? boolean | undefined : boolean : boolean;
|
|
1363
1363
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @cabloy/vue-runtime-core v3.4.
|
|
2
|
+
* @cabloy/vue-runtime-core v3.4.37
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -1361,7 +1361,7 @@ const KeepAliveImpl = {
|
|
|
1361
1361
|
}
|
|
1362
1362
|
function pruneCacheEntry(key) {
|
|
1363
1363
|
const cached = cache.get(key);
|
|
1364
|
-
if (!current || !isSameVNodeType(cached, current)) {
|
|
1364
|
+
if (cached && (!current || !isSameVNodeType(cached, current))) {
|
|
1365
1365
|
unmount(cached);
|
|
1366
1366
|
} else if (current) {
|
|
1367
1367
|
resetShapeFlag(current);
|
|
@@ -1423,6 +1423,10 @@ const KeepAliveImpl = {
|
|
|
1423
1423
|
return rawVNode;
|
|
1424
1424
|
}
|
|
1425
1425
|
let vnode = getInnerChild(rawVNode);
|
|
1426
|
+
if (vnode.type === Comment) {
|
|
1427
|
+
current = null;
|
|
1428
|
+
return vnode;
|
|
1429
|
+
}
|
|
1426
1430
|
const comp = vnode.type;
|
|
1427
1431
|
const name = getComponentName(
|
|
1428
1432
|
isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp
|
|
@@ -2722,7 +2726,7 @@ function provide(key, value) {
|
|
|
2722
2726
|
function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
2723
2727
|
const instance = currentInstance || currentRenderingInstance;
|
|
2724
2728
|
if (instance || currentApp) {
|
|
2725
|
-
const provides = instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides :
|
|
2729
|
+
const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
|
|
2726
2730
|
if (provides && key in provides) {
|
|
2727
2731
|
return provides[key];
|
|
2728
2732
|
} else if (arguments.length > 1) {
|
|
@@ -2991,14 +2995,27 @@ function normalizePropsOptions(comp, appContext, asMixin = false) {
|
|
|
2991
2995
|
if (validatePropName(normalizedKey)) {
|
|
2992
2996
|
const opt = raw[key];
|
|
2993
2997
|
const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt);
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
2998
|
+
const propType = prop.type;
|
|
2999
|
+
let shouldCast = false;
|
|
3000
|
+
let shouldCastTrue = true;
|
|
3001
|
+
if (isArray(propType)) {
|
|
3002
|
+
for (let index = 0; index < propType.length; ++index) {
|
|
3003
|
+
const type = propType[index];
|
|
3004
|
+
const typeName = isFunction(type) && type.name;
|
|
3005
|
+
if (typeName === "Boolean") {
|
|
3006
|
+
shouldCast = true;
|
|
3007
|
+
break;
|
|
3008
|
+
} else if (typeName === "String") {
|
|
3009
|
+
shouldCastTrue = false;
|
|
3010
|
+
}
|
|
3001
3011
|
}
|
|
3012
|
+
} else {
|
|
3013
|
+
shouldCast = isFunction(propType) && propType.name === "Boolean";
|
|
3014
|
+
}
|
|
3015
|
+
prop[0 /* shouldCast */] = shouldCast;
|
|
3016
|
+
prop[1 /* shouldCastTrue */] = shouldCastTrue;
|
|
3017
|
+
if (shouldCast || hasOwn(prop, "default")) {
|
|
3018
|
+
needCastKeys.push(normalizedKey);
|
|
3002
3019
|
}
|
|
3003
3020
|
}
|
|
3004
3021
|
}
|
|
@@ -3029,17 +3046,6 @@ function getType(ctor) {
|
|
|
3029
3046
|
}
|
|
3030
3047
|
return "";
|
|
3031
3048
|
}
|
|
3032
|
-
function isSameType(a, b) {
|
|
3033
|
-
return getType(a) === getType(b);
|
|
3034
|
-
}
|
|
3035
|
-
function getTypeIndex(type, expectedTypes) {
|
|
3036
|
-
if (isArray(expectedTypes)) {
|
|
3037
|
-
return expectedTypes.findIndex((t) => isSameType(t, type));
|
|
3038
|
-
} else if (isFunction(expectedTypes)) {
|
|
3039
|
-
return isSameType(expectedTypes, type) ? 0 : -1;
|
|
3040
|
-
}
|
|
3041
|
-
return -1;
|
|
3042
|
-
}
|
|
3043
3049
|
function validateProps(rawProps, props, instance) {
|
|
3044
3050
|
const resolvedValues = toRaw(props);
|
|
3045
3051
|
const options = instance.propsOptions[0];
|
|
@@ -3379,15 +3385,11 @@ const TeleportImpl = {
|
|
|
3379
3385
|
if (n1 == null) {
|
|
3380
3386
|
const placeholder = n2.el = !!(process.env.NODE_ENV !== "production") ? createComment("teleport start") : createText("");
|
|
3381
3387
|
const mainAnchor = n2.anchor = !!(process.env.NODE_ENV !== "production") ? createComment("teleport end") : createText("");
|
|
3382
|
-
const target = n2.target = resolveTarget(n2.props, querySelector);
|
|
3383
|
-
const targetStart = n2.targetStart = createText("");
|
|
3384
|
-
const targetAnchor = n2.targetAnchor = createText("");
|
|
3385
3388
|
insert(placeholder, container, anchor);
|
|
3386
3389
|
insert(mainAnchor, container, anchor);
|
|
3387
|
-
|
|
3390
|
+
const target = n2.target = resolveTarget(n2.props, querySelector);
|
|
3391
|
+
const targetAnchor = prepareAnchor(target, n2, createText, insert);
|
|
3388
3392
|
if (target) {
|
|
3389
|
-
insert(targetStart, target);
|
|
3390
|
-
insert(targetAnchor, target);
|
|
3391
3393
|
if (namespace === "svg" || isTargetSVG(target)) {
|
|
3392
3394
|
namespace = "svg";
|
|
3393
3395
|
} else if (namespace === "mathml" || isTargetMathML(target)) {
|
|
@@ -3559,7 +3561,7 @@ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }
|
|
|
3559
3561
|
}
|
|
3560
3562
|
}
|
|
3561
3563
|
function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, {
|
|
3562
|
-
o: { nextSibling, parentNode, querySelector }
|
|
3564
|
+
o: { nextSibling, parentNode, querySelector, insert, createText }
|
|
3563
3565
|
}, hydrateChildren) {
|
|
3564
3566
|
const target = vnode.target = resolveTarget(
|
|
3565
3567
|
vnode.props,
|
|
@@ -3578,20 +3580,28 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
|
|
|
3578
3580
|
slotScopeIds,
|
|
3579
3581
|
optimized
|
|
3580
3582
|
);
|
|
3581
|
-
vnode.
|
|
3583
|
+
vnode.targetStart = targetNode;
|
|
3584
|
+
vnode.targetAnchor = targetNode && nextSibling(targetNode);
|
|
3582
3585
|
} else {
|
|
3583
3586
|
vnode.anchor = nextSibling(node);
|
|
3584
3587
|
let targetAnchor = targetNode;
|
|
3585
3588
|
while (targetAnchor) {
|
|
3586
|
-
targetAnchor
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3589
|
+
if (targetAnchor && targetAnchor.nodeType === 8) {
|
|
3590
|
+
if (targetAnchor.data === "teleport start anchor") {
|
|
3591
|
+
vnode.targetStart = targetAnchor;
|
|
3592
|
+
} else if (targetAnchor.data === "teleport anchor") {
|
|
3593
|
+
vnode.targetAnchor = targetAnchor;
|
|
3594
|
+
target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor);
|
|
3595
|
+
break;
|
|
3596
|
+
}
|
|
3591
3597
|
}
|
|
3598
|
+
targetAnchor = nextSibling(targetAnchor);
|
|
3599
|
+
}
|
|
3600
|
+
if (!vnode.targetAnchor) {
|
|
3601
|
+
prepareAnchor(target, vnode, createText, insert);
|
|
3592
3602
|
}
|
|
3593
3603
|
hydrateChildren(
|
|
3594
|
-
targetNode,
|
|
3604
|
+
targetNode && nextSibling(targetNode),
|
|
3595
3605
|
vnode,
|
|
3596
3606
|
target,
|
|
3597
3607
|
parentComponent,
|
|
@@ -3617,6 +3627,16 @@ function updateCssVars(vnode) {
|
|
|
3617
3627
|
ctx.ut();
|
|
3618
3628
|
}
|
|
3619
3629
|
}
|
|
3630
|
+
function prepareAnchor(target, vnode, createText, insert) {
|
|
3631
|
+
const targetStart = vnode.targetStart = createText("");
|
|
3632
|
+
const targetAnchor = vnode.targetAnchor = createText("");
|
|
3633
|
+
targetStart[TeleportEndKey] = targetAnchor;
|
|
3634
|
+
if (target) {
|
|
3635
|
+
insert(targetStart, target);
|
|
3636
|
+
insert(targetAnchor, target);
|
|
3637
|
+
}
|
|
3638
|
+
return targetAnchor;
|
|
3639
|
+
}
|
|
3620
3640
|
|
|
3621
3641
|
let hasLoggedMismatchError = false;
|
|
3622
3642
|
const logMismatchError = () => {
|
|
@@ -3900,6 +3920,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
3900
3920
|
}
|
|
3901
3921
|
if (props) {
|
|
3902
3922
|
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ || forcePatch || !optimized || patchFlag & (16 | 32)) {
|
|
3923
|
+
const isCustomElement = el.tagName.includes("-");
|
|
3903
3924
|
for (const key in props) {
|
|
3904
3925
|
if ((!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && // #11189 skip if this node has directives that have created hooks
|
|
3905
3926
|
// as it could have mutated the DOM in any possible way
|
|
@@ -3907,7 +3928,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
3907
3928
|
logMismatchError();
|
|
3908
3929
|
}
|
|
3909
3930
|
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
3910
|
-
key[0] === ".") {
|
|
3931
|
+
key[0] === "." || isCustomElement) {
|
|
3911
3932
|
patchProp(el, key, null, props[key], void 0, parentComponent);
|
|
3912
3933
|
}
|
|
3913
3934
|
}
|
|
@@ -4972,7 +4993,16 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4972
4993
|
() => !instance.isUnmounted && hydrateSubTree()
|
|
4973
4994
|
);
|
|
4974
4995
|
} else {
|
|
4975
|
-
|
|
4996
|
+
const zova = instance.ctx._.zova;
|
|
4997
|
+
if (zova) {
|
|
4998
|
+
zova.meta.ssr.increase();
|
|
4999
|
+
zova.meta.state.inited.wait().then(() => {
|
|
5000
|
+
!instance.isUnmounted && hydrateSubTree();
|
|
5001
|
+
zova.meta.ssr.decrease();
|
|
5002
|
+
});
|
|
5003
|
+
} else {
|
|
5004
|
+
hydrateSubTree();
|
|
5005
|
+
}
|
|
4976
5006
|
}
|
|
4977
5007
|
} else {
|
|
4978
5008
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
@@ -5019,6 +5049,10 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5019
5049
|
initialVNode = container = anchor = null;
|
|
5020
5050
|
} else {
|
|
5021
5051
|
let { next, bu, u, parent, vnode } = instance;
|
|
5052
|
+
const zova = instance.ctx._.zova;
|
|
5053
|
+
if (zova && zova.meta.ssr.isRuntimeSsrPreHydration) {
|
|
5054
|
+
return;
|
|
5055
|
+
}
|
|
5022
5056
|
{
|
|
5023
5057
|
const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance);
|
|
5024
5058
|
if (nonHydratedAsyncRoot) {
|
|
@@ -5654,13 +5688,13 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5654
5688
|
namespace
|
|
5655
5689
|
);
|
|
5656
5690
|
}
|
|
5691
|
+
container._vnode = vnode;
|
|
5657
5692
|
if (!isFlushing) {
|
|
5658
5693
|
isFlushing = true;
|
|
5659
5694
|
flushPreFlushCbs();
|
|
5660
5695
|
flushPostFlushCbs();
|
|
5661
5696
|
isFlushing = false;
|
|
5662
5697
|
}
|
|
5663
|
-
container._vnode = vnode;
|
|
5664
5698
|
};
|
|
5665
5699
|
const internals = {
|
|
5666
5700
|
p: patch,
|
|
@@ -6088,7 +6122,8 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
6088
6122
|
return options.get ? options.get(localValue) : localValue;
|
|
6089
6123
|
},
|
|
6090
6124
|
set(value) {
|
|
6091
|
-
|
|
6125
|
+
const emittedValue = options.set ? options.set(value) : value;
|
|
6126
|
+
if (!hasChanged(emittedValue, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) {
|
|
6092
6127
|
return;
|
|
6093
6128
|
}
|
|
6094
6129
|
const rawProps = i.vnode.props;
|
|
@@ -6097,7 +6132,6 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
6097
6132
|
localValue = value;
|
|
6098
6133
|
trigger();
|
|
6099
6134
|
}
|
|
6100
|
-
const emittedValue = options.set ? options.set(value) : value;
|
|
6101
6135
|
i.emit(`update:${name}`, emittedValue);
|
|
6102
6136
|
if (hasChanged(value, emittedValue) && hasChanged(value, prevSetValue) && !hasChanged(emittedValue, prevEmittedValue)) {
|
|
6103
6137
|
trigger();
|
|
@@ -6135,9 +6169,9 @@ function emit(instance, event, ...rawArgs) {
|
|
|
6135
6169
|
} = instance;
|
|
6136
6170
|
if (emitsOptions) {
|
|
6137
6171
|
if (!(event in emitsOptions) && true) {
|
|
6138
|
-
if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {
|
|
6172
|
+
if (!propsOptions || !(toHandlerKey(camelize(event)) in propsOptions)) {
|
|
6139
6173
|
warn$1(
|
|
6140
|
-
`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.`
|
|
6174
|
+
`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize(event))}" prop.`
|
|
6141
6175
|
);
|
|
6142
6176
|
}
|
|
6143
6177
|
} else {
|
|
@@ -8191,7 +8225,7 @@ function isMemoSame(cached, memo) {
|
|
|
8191
8225
|
return true;
|
|
8192
8226
|
}
|
|
8193
8227
|
|
|
8194
|
-
const version = "3.4.
|
|
8228
|
+
const version = "3.4.37";
|
|
8195
8229
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
8196
8230
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
8197
8231
|
const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
|
|
@@ -8203,7 +8237,8 @@ const _ssrUtils = {
|
|
|
8203
8237
|
setCurrentRenderingInstance,
|
|
8204
8238
|
isVNode: isVNode,
|
|
8205
8239
|
normalizeVNode,
|
|
8206
|
-
getComponentPublicInstance
|
|
8240
|
+
getComponentPublicInstance,
|
|
8241
|
+
ensureValidVNode
|
|
8207
8242
|
};
|
|
8208
8243
|
const ssrUtils = _ssrUtils ;
|
|
8209
8244
|
const resolveFilter = null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cabloy/vue-runtime-core",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.37",
|
|
4
4
|
"description": "@vue/runtime-core",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/runtime-core.esm-bundler.js",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
},
|
|
47
47
|
"homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-core#readme",
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@vue/shared": "3.4.
|
|
50
|
-
"@vue/reactivity": "npm:@cabloy/vue-reactivity@3.4.
|
|
49
|
+
"@vue/shared": "3.4.37",
|
|
50
|
+
"@vue/reactivity": "npm:@cabloy/vue-reactivity@3.4.37"
|
|
51
51
|
}
|
|
52
52
|
}
|