@cabloy/vue-runtime-core 3.4.29 → 3.4.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/runtime-core.cjs.js
CHANGED
|
@@ -667,7 +667,7 @@ function emit(instance, event, ...rawArgs) {
|
|
|
667
667
|
if (emitsOptions) {
|
|
668
668
|
if (!(event in emitsOptions) && true) {
|
|
669
669
|
if (!propsOptions || !(shared.toHandlerKey(event) in propsOptions)) {
|
|
670
|
-
if (event !== "
|
|
670
|
+
if (event !== "controllerRef") {
|
|
671
671
|
warn$1(
|
|
672
672
|
`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${shared.toHandlerKey(event)}" prop.`
|
|
673
673
|
);
|
|
@@ -2711,7 +2711,13 @@ const KeepAliveImpl = {
|
|
|
2711
2711
|
let pendingCacheKey = null;
|
|
2712
2712
|
const cacheSubtree = () => {
|
|
2713
2713
|
if (pendingCacheKey != null) {
|
|
2714
|
-
|
|
2714
|
+
if (isSuspense(instance.subTree.type)) {
|
|
2715
|
+
queuePostRenderEffect(() => {
|
|
2716
|
+
cache.set(pendingCacheKey, getInnerChild(instance.subTree));
|
|
2717
|
+
}, instance.subTree.suspense);
|
|
2718
|
+
} else {
|
|
2719
|
+
cache.set(pendingCacheKey, getInnerChild(instance.subTree));
|
|
2720
|
+
}
|
|
2715
2721
|
}
|
|
2716
2722
|
};
|
|
2717
2723
|
onMounted(cacheSubtree);
|
|
@@ -2872,10 +2878,14 @@ function injectHook(type, hook, target = currentInstance, prepend = false) {
|
|
|
2872
2878
|
);
|
|
2873
2879
|
}
|
|
2874
2880
|
}
|
|
2875
|
-
const createHook = (lifecycle) => (hook, target = currentInstance) =>
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2881
|
+
const createHook = (lifecycle) => (hook, target = currentInstance) => {
|
|
2882
|
+
if (!isInSSRComponentSetup || lifecycle === "sp") {
|
|
2883
|
+
injectHook(lifecycle, (...args) => hook(...args), target);
|
|
2884
|
+
}
|
|
2885
|
+
if (lifecycle === "m" && (target == null ? void 0 : target.isMounted)) {
|
|
2886
|
+
hook();
|
|
2887
|
+
}
|
|
2888
|
+
};
|
|
2879
2889
|
const onBeforeMount = createHook("bm");
|
|
2880
2890
|
const onMounted = createHook("m");
|
|
2881
2891
|
const onBeforeUpdate = createHook("bu");
|
|
@@ -4951,7 +4961,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
4951
4961
|
optimized
|
|
4952
4962
|
);
|
|
4953
4963
|
} else if (vnode.type === Text && !vnode.children) {
|
|
4954
|
-
|
|
4964
|
+
insert(vnode.el = createText(""), container);
|
|
4955
4965
|
} else {
|
|
4956
4966
|
hasMismatch = true;
|
|
4957
4967
|
if (!hasWarned) {
|
|
@@ -7692,7 +7702,7 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
7692
7702
|
`Component provided template option but runtime compilation is not supported in this build of Vue.` + (``)
|
|
7693
7703
|
);
|
|
7694
7704
|
} else {
|
|
7695
|
-
warn$1(`Component is missing template or render function
|
|
7705
|
+
warn$1(`Component is missing template or render function: `, Component);
|
|
7696
7706
|
}
|
|
7697
7707
|
}
|
|
7698
7708
|
}
|
|
@@ -2081,7 +2081,13 @@ const KeepAliveImpl = {
|
|
|
2081
2081
|
let pendingCacheKey = null;
|
|
2082
2082
|
const cacheSubtree = () => {
|
|
2083
2083
|
if (pendingCacheKey != null) {
|
|
2084
|
-
|
|
2084
|
+
if (isSuspense(instance.subTree.type)) {
|
|
2085
|
+
queuePostRenderEffect(() => {
|
|
2086
|
+
cache.set(pendingCacheKey, getInnerChild(instance.subTree));
|
|
2087
|
+
}, instance.subTree.suspense);
|
|
2088
|
+
} else {
|
|
2089
|
+
cache.set(pendingCacheKey, getInnerChild(instance.subTree));
|
|
2090
|
+
}
|
|
2085
2091
|
}
|
|
2086
2092
|
};
|
|
2087
2093
|
onMounted(cacheSubtree);
|
|
@@ -2234,10 +2240,14 @@ function injectHook(type, hook, target = currentInstance, prepend = false) {
|
|
|
2234
2240
|
return wrappedHook;
|
|
2235
2241
|
}
|
|
2236
2242
|
}
|
|
2237
|
-
const createHook = (lifecycle) => (hook, target = currentInstance) =>
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2243
|
+
const createHook = (lifecycle) => (hook, target = currentInstance) => {
|
|
2244
|
+
if (!isInSSRComponentSetup || lifecycle === "sp") {
|
|
2245
|
+
injectHook(lifecycle, (...args) => hook(...args), target);
|
|
2246
|
+
}
|
|
2247
|
+
if (lifecycle === "m" && (target == null ? void 0 : target.isMounted)) {
|
|
2248
|
+
hook();
|
|
2249
|
+
}
|
|
2250
|
+
};
|
|
2241
2251
|
const onBeforeMount = createHook("bm");
|
|
2242
2252
|
const onMounted = createHook("m");
|
|
2243
2253
|
const onBeforeUpdate = createHook("bu");
|
|
@@ -3822,7 +3832,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
3822
3832
|
optimized
|
|
3823
3833
|
);
|
|
3824
3834
|
} else if (vnode.type === Text && !vnode.children) {
|
|
3825
|
-
|
|
3835
|
+
insert(vnode.el = createText(""), container);
|
|
3826
3836
|
} else {
|
|
3827
3837
|
hasMismatch = true;
|
|
3828
3838
|
patch(
|
package/dist/runtime-core.d.ts
CHANGED
|
@@ -128,7 +128,7 @@ C extends ComputedOptions = {}, M extends MethodOptions = {}, E extends EmitsOpt
|
|
|
128
128
|
$options: Options & MergedComponentOptionsOverride;
|
|
129
129
|
$forceUpdate: () => void;
|
|
130
130
|
$nextTick: typeof nextTick;
|
|
131
|
-
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R]) => any : (...args: any) => any, options?: WatchOptions): WatchStopHandle;
|
|
131
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, OnCleanup]) => any : (...args: [any, any, OnCleanup]) => any, options?: WatchOptions): WatchStopHandle;
|
|
132
132
|
} & IfAny<P, P, Omit<P, keyof ShallowUnwrapRef<B>>> & ShallowUnwrapRef<B> & UnwrapNestedRefs<D> & ExtractComputedReturns<C> & M & ComponentCustomProperties & InjectToObject<I>;
|
|
133
133
|
|
|
134
134
|
declare enum LifecycleHooks {
|
|
@@ -369,16 +369,16 @@ export declare const KeepAlive: {
|
|
|
369
369
|
export declare function onActivated(hook: Function, target?: ComponentInternalInstance | null): void;
|
|
370
370
|
export declare function onDeactivated(hook: Function, target?: ComponentInternalInstance | null): void;
|
|
371
371
|
|
|
372
|
-
export declare const onBeforeMount: (hook: () => any, target?: ComponentInternalInstance | null) =>
|
|
373
|
-
export declare const onMounted: (hook: () => any, target?: ComponentInternalInstance | null) =>
|
|
374
|
-
export declare const onBeforeUpdate: (hook: () => any, target?: ComponentInternalInstance | null) =>
|
|
375
|
-
export declare const onUpdated: (hook: () => any, target?: ComponentInternalInstance | null) =>
|
|
376
|
-
export declare const onBeforeUnmount: (hook: () => any, target?: ComponentInternalInstance | null) =>
|
|
377
|
-
export declare const onUnmounted: (hook: () => any, target?: ComponentInternalInstance | null) =>
|
|
378
|
-
export declare const onServerPrefetch: (hook: () => any, target?: ComponentInternalInstance | null) =>
|
|
372
|
+
export declare const onBeforeMount: (hook: () => any, target?: ComponentInternalInstance | null) => void;
|
|
373
|
+
export declare const onMounted: (hook: () => any, target?: ComponentInternalInstance | null) => void;
|
|
374
|
+
export declare const onBeforeUpdate: (hook: () => any, target?: ComponentInternalInstance | null) => void;
|
|
375
|
+
export declare const onUpdated: (hook: () => any, target?: ComponentInternalInstance | null) => void;
|
|
376
|
+
export declare const onBeforeUnmount: (hook: () => any, target?: ComponentInternalInstance | null) => void;
|
|
377
|
+
export declare const onUnmounted: (hook: () => any, target?: ComponentInternalInstance | null) => void;
|
|
378
|
+
export declare const onServerPrefetch: (hook: () => any, target?: ComponentInternalInstance | null) => void;
|
|
379
379
|
type DebuggerHook = (e: DebuggerEvent) => void;
|
|
380
|
-
export declare const onRenderTriggered: (hook: DebuggerHook, target?: ComponentInternalInstance | null) =>
|
|
381
|
-
export declare const onRenderTracked: (hook: DebuggerHook, target?: ComponentInternalInstance | null) =>
|
|
380
|
+
export declare const onRenderTriggered: (hook: DebuggerHook, target?: ComponentInternalInstance | null) => void;
|
|
381
|
+
export declare const onRenderTracked: (hook: DebuggerHook, target?: ComponentInternalInstance | null) => void;
|
|
382
382
|
type ErrorCapturedHook<TError = unknown> = (err: TError, instance: ComponentPublicInstance | null, info: string) => boolean | void;
|
|
383
383
|
export declare function onErrorCaptured<TError = Error>(hook: ErrorCapturedHook<TError>, target?: ComponentInternalInstance | null): void;
|
|
384
384
|
|
|
@@ -496,7 +496,7 @@ export interface DirectiveBinding<V = any> {
|
|
|
496
496
|
dir: ObjectDirective<any, V>;
|
|
497
497
|
}
|
|
498
498
|
export type DirectiveHook<T = any, Prev = VNode<any, T> | null, V = any> = (el: T, binding: DirectiveBinding<V>, vnode: VNode<any, T>, prevVNode: Prev) => void;
|
|
499
|
-
type SSRDirectiveHook = (binding: DirectiveBinding
|
|
499
|
+
type SSRDirectiveHook<V> = (binding: DirectiveBinding<V>, vnode: VNode) => Data | undefined;
|
|
500
500
|
export interface ObjectDirective<T = any, V = any> {
|
|
501
501
|
created?: DirectiveHook<T, null, V>;
|
|
502
502
|
beforeMount?: DirectiveHook<T, null, V>;
|
|
@@ -505,7 +505,7 @@ export interface ObjectDirective<T = any, V = any> {
|
|
|
505
505
|
updated?: DirectiveHook<T, VNode<any, T>, V>;
|
|
506
506
|
beforeUnmount?: DirectiveHook<T, null, V>;
|
|
507
507
|
unmounted?: DirectiveHook<T, null, V>;
|
|
508
|
-
getSSRProps?: SSRDirectiveHook
|
|
508
|
+
getSSRProps?: SSRDirectiveHook<V>;
|
|
509
509
|
deep?: boolean;
|
|
510
510
|
}
|
|
511
511
|
export type FunctionDirective<T = any, V = any> = DirectiveHook<T, any, V>;
|
|
@@ -1521,7 +1521,7 @@ export declare function renderList<T>(source: Iterable<T>, renderItem: (value: T
|
|
|
1521
1521
|
/**
|
|
1522
1522
|
* v-for object
|
|
1523
1523
|
*/
|
|
1524
|
-
export declare function renderList<T>(source: T, renderItem: <K extends keyof T>(value: T[K], key:
|
|
1524
|
+
export declare function renderList<T>(source: T, renderItem: <K extends keyof T>(value: T[K], key: string, index: number) => VNodeChild): VNodeChild[];
|
|
1525
1525
|
|
|
1526
1526
|
/**
|
|
1527
1527
|
* For prefixing keys in v-on="obj" with "on"
|
|
@@ -669,7 +669,7 @@ function emit(instance, event, ...rawArgs) {
|
|
|
669
669
|
if (emitsOptions) {
|
|
670
670
|
if (!(event in emitsOptions) && true) {
|
|
671
671
|
if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {
|
|
672
|
-
if (event !== "
|
|
672
|
+
if (event !== "controllerRef") {
|
|
673
673
|
warn$1(
|
|
674
674
|
`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.`
|
|
675
675
|
);
|
|
@@ -2715,7 +2715,13 @@ const KeepAliveImpl = {
|
|
|
2715
2715
|
let pendingCacheKey = null;
|
|
2716
2716
|
const cacheSubtree = () => {
|
|
2717
2717
|
if (pendingCacheKey != null) {
|
|
2718
|
-
|
|
2718
|
+
if (isSuspense(instance.subTree.type)) {
|
|
2719
|
+
queuePostRenderEffect(() => {
|
|
2720
|
+
cache.set(pendingCacheKey, getInnerChild(instance.subTree));
|
|
2721
|
+
}, instance.subTree.suspense);
|
|
2722
|
+
} else {
|
|
2723
|
+
cache.set(pendingCacheKey, getInnerChild(instance.subTree));
|
|
2724
|
+
}
|
|
2719
2725
|
}
|
|
2720
2726
|
};
|
|
2721
2727
|
onMounted(cacheSubtree);
|
|
@@ -2876,10 +2882,14 @@ function injectHook(type, hook, target = currentInstance, prepend = false) {
|
|
|
2876
2882
|
);
|
|
2877
2883
|
}
|
|
2878
2884
|
}
|
|
2879
|
-
const createHook = (lifecycle) => (hook, target = currentInstance) =>
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2885
|
+
const createHook = (lifecycle) => (hook, target = currentInstance) => {
|
|
2886
|
+
if (!isInSSRComponentSetup || lifecycle === "sp") {
|
|
2887
|
+
injectHook(lifecycle, (...args) => hook(...args), target);
|
|
2888
|
+
}
|
|
2889
|
+
if (lifecycle === "m" && (target == null ? void 0 : target.isMounted)) {
|
|
2890
|
+
hook();
|
|
2891
|
+
}
|
|
2892
|
+
};
|
|
2883
2893
|
const onBeforeMount = createHook("bm");
|
|
2884
2894
|
const onMounted = createHook("m");
|
|
2885
2895
|
const onBeforeUpdate = createHook("bu");
|
|
@@ -4969,7 +4979,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
4969
4979
|
optimized
|
|
4970
4980
|
);
|
|
4971
4981
|
} else if (vnode.type === Text && !vnode.children) {
|
|
4972
|
-
|
|
4982
|
+
insert(vnode.el = createText(""), container);
|
|
4973
4983
|
} else {
|
|
4974
4984
|
hasMismatch = true;
|
|
4975
4985
|
if ((!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && !hasWarned) {
|
|
@@ -7750,7 +7760,7 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
7750
7760
|
`Component provided template option but runtime compilation is not supported in this build of Vue.` + (` Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".` )
|
|
7751
7761
|
);
|
|
7752
7762
|
} else {
|
|
7753
|
-
warn$1(`Component is missing template or render function
|
|
7763
|
+
warn$1(`Component is missing template or render function: `, Component);
|
|
7754
7764
|
}
|
|
7755
7765
|
}
|
|
7756
7766
|
}
|