wevu 6.15.5 → 6.15.7
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/{index-SDxsBVMY.d.mts → index-51F79u-U.d.mts} +1 -1
- package/dist/{index-DWouSxpz.d.mts → index-B2-lsPjZ.d.mts} +44 -44
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +2 -2
- package/dist/jsx-runtime.d.mts +2 -2
- package/dist/{router-BR3hx21a.mjs → router-B43fz4cM.mjs} +100 -42
- package/dist/router.d.mts +1 -1
- package/dist/router.mjs +1 -1
- package/dist/{src-_P44BAOw.mjs → src-CXeO96dW.mjs} +99 -81
- package/dist/store.d.mts +1 -1
- package/dist/vue-demi.d.mts +5 -5
- package/dist/vue-demi.mjs +2 -2
- package/dist/{vue-types-BUOuHH4O.d.mts → vue-types-Ir1bT6Gp.d.mts} +274 -95
- package/dist/{weappIntrinsicElements-CwA7kB31.d.mts → weappIntrinsicElements-Cdfh6BlL.d.mts} +345 -339
- package/package.json +4 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { n as MiniProgramIntrinsicElements } from "./weappIntrinsicElements-Cdfh6BlL.mjs";
|
|
2
|
+
import { $n as HostMiniProgramNodesRefFields, An as MiniProgramPageLifetimes, Cn as MiniProgramAppOptions, D as ModelBindingPayload, Dn as MiniProgramComponentPropertyValue, E as ModelBindingOptions, En as MiniProgramComponentOptions, Fn as HostMiniProgramBoundingClientRectResult, Hn as HostMiniProgramComponentPropertyOption, Ht as Ref, In as HostMiniProgramComponentAllFullProperty, Jn as HostMiniProgramIntersectionObserverOptions, Ln as HostMiniProgramComponentAllProperty, On as MiniProgramComponentRawOptions, Rn as HostMiniProgramComponentBehaviorOptions, T as ModelBinding, Tn as MiniProgramComponentInstance, Ut as ShallowRef, Vn as HostMiniProgramComponentMethodOption, Xn as HostMiniProgramMemoryWarningResult, Yn as HostMiniProgramLaunchOptions, _ as RuntimeApp, b as ComponentPublicInstance, c as ShallowUnwrapRef, cr as HostMiniProgramSaveExitState, d as SetupContext, dr as HostMiniProgramShareAppMessageOption, er as HostMiniProgramPageLifetime, f as SetupContextNativeInstance, gr as HostMiniProgramUnhandledRejectionResult, h as InternalRuntimeState, hr as HostMiniProgramTriggerEventOptions, i as DefineComponent, jn as HostMiniProgramAddToFavoritesOption, lr as HostMiniProgramScrollOffsetResult, mn as InferProps, mr as HostMiniProgramThemeChangeResult, nr as HostMiniProgramPageResizeOption, p as SetupFunction, pr as HostMiniProgramTabItemTapOption, qn as HostMiniProgramIntersectionObserver, rn as SetupContextRouter, rr as HostMiniProgramPageScrollOption, sn as ComponentPropsOptions, tr as HostMiniProgramPageNotFoundOptions, v as RuntimeInstance, w as MethodDefinitions, x as ComputedDefinitions, y as WevuPlugin, zn as HostMiniProgramComponentEmptyArray } from "./vue-types-Ir1bT6Gp.mjs";
|
|
3
3
|
//#region src/runtime/types/setData.d.ts
|
|
4
4
|
interface SetDataSnapshotOptions {
|
|
5
5
|
/**
|
|
@@ -302,19 +302,19 @@ interface WevuGlobalDirectives {}
|
|
|
302
302
|
interface GlobalComponents extends WevuGlobalComponents {}
|
|
303
303
|
interface GlobalDirectives extends WevuGlobalDirectives {}
|
|
304
304
|
interface TemplateRefs {}
|
|
305
|
-
type NodesRefFields = Parameters<WechatMiniprogram.NodesRef['fields']>[0];
|
|
306
305
|
interface TemplateRefValue {
|
|
307
306
|
selector: string;
|
|
308
|
-
boundingClientRect: (cb?: (value:
|
|
309
|
-
scrollOffset: (cb?: (value:
|
|
310
|
-
fields: (fields:
|
|
307
|
+
boundingClientRect: (cb?: (value: HostMiniProgramBoundingClientRectResult | null) => void) => Promise<HostMiniProgramBoundingClientRectResult | null>;
|
|
308
|
+
scrollOffset: (cb?: (value: HostMiniProgramScrollOffsetResult | null) => void) => Promise<HostMiniProgramScrollOffsetResult | null>;
|
|
309
|
+
fields: (fields: HostMiniProgramNodesRefFields, cb?: (value: any) => void) => Promise<any | null>;
|
|
311
310
|
node: (cb?: (value: any) => void) => Promise<any | null>;
|
|
312
311
|
}
|
|
312
|
+
type MiniProgramTemplateRefValue = TemplateRefValue;
|
|
313
313
|
//#endregion
|
|
314
314
|
//#region src/runtime/templateRefTypes.d.ts
|
|
315
|
-
type
|
|
315
|
+
type MiniProgramTemplateRefElements = { [K in keyof MiniProgramIntrinsicElements]: TemplateRefValue };
|
|
316
316
|
declare global {
|
|
317
|
-
interface HTMLElementTagNameMap extends
|
|
317
|
+
interface HTMLElementTagNameMap extends MiniProgramTemplateRefElements {}
|
|
318
318
|
}
|
|
319
319
|
//#endregion
|
|
320
320
|
//#region src/vue-augment.d.ts
|
|
@@ -429,7 +429,7 @@ declare function defineComponent<P extends ComponentPropsOptions = ComponentProp
|
|
|
429
429
|
* @internal
|
|
430
430
|
*/
|
|
431
431
|
declare function createWevuComponent<P extends ComponentPropsOptions = ComponentPropsOptions, D extends object = Record<string, any>, C extends ComputedDefinitions = ComputedDefinitions, M extends MethodDefinitions = MethodDefinitions>(options: DefineComponentOptions<P, D, C, M> & {
|
|
432
|
-
properties?:
|
|
432
|
+
properties?: HostMiniProgramComponentPropertyOption;
|
|
433
433
|
}): void;
|
|
434
434
|
/**
|
|
435
435
|
* scoped slot 兼容组件入口(编译产物内部使用)。
|
|
@@ -495,31 +495,31 @@ declare function callHookList(target: InternalRuntimeState, name: string, args?:
|
|
|
495
495
|
declare function callHookReturn(target: InternalRuntimeState, name: string, args?: any[]): any;
|
|
496
496
|
//#endregion
|
|
497
497
|
//#region src/runtime/hooks/register.d.ts
|
|
498
|
-
declare function onLaunch(handler: (options:
|
|
499
|
-
declare function onPageNotFound(handler: (options:
|
|
500
|
-
declare function onUnhandledRejection(handler:
|
|
501
|
-
declare function onThemeChange(handler:
|
|
502
|
-
declare function onMemoryWarning(handler:
|
|
498
|
+
declare function onLaunch(handler: (options: HostMiniProgramLaunchOptions) => void): void;
|
|
499
|
+
declare function onPageNotFound(handler: (options: HostMiniProgramPageNotFoundOptions) => void): void;
|
|
500
|
+
declare function onUnhandledRejection(handler: (options: HostMiniProgramUnhandledRejectionResult) => void): void;
|
|
501
|
+
declare function onThemeChange(handler: (options: HostMiniProgramThemeChangeResult) => void): void;
|
|
502
|
+
declare function onMemoryWarning(handler: (options: HostMiniProgramMemoryWarningResult) => void): void;
|
|
503
503
|
declare function onShow(handler: () => void): void;
|
|
504
|
-
declare function onShow(handler: (options:
|
|
505
|
-
declare function onLoad(handler:
|
|
504
|
+
declare function onShow(handler: (options: HostMiniProgramLaunchOptions) => void): void;
|
|
505
|
+
declare function onLoad(handler: HostMiniProgramPageLifetime['onLoad']): void;
|
|
506
506
|
declare function onHide(handler: () => void): void;
|
|
507
507
|
declare function onUnload(handler: () => void): void;
|
|
508
508
|
declare function onReady(handler: () => void): void;
|
|
509
|
-
declare function onPullDownRefresh(handler:
|
|
510
|
-
declare function onReachBottom(handler:
|
|
511
|
-
declare function onPageScroll(handler: (opt:
|
|
512
|
-
declare function onRouteDone(handler:
|
|
513
|
-
declare function onTabItemTap(handler: (opt:
|
|
514
|
-
declare function onResize(handler: (opt:
|
|
509
|
+
declare function onPullDownRefresh(handler: HostMiniProgramPageLifetime['onPullDownRefresh']): void;
|
|
510
|
+
declare function onReachBottom(handler: HostMiniProgramPageLifetime['onReachBottom']): void;
|
|
511
|
+
declare function onPageScroll(handler: (opt: HostMiniProgramPageScrollOption) => void): void;
|
|
512
|
+
declare function onRouteDone(handler: HostMiniProgramPageLifetime['onRouteDone'] | ((opt?: unknown) => void)): void;
|
|
513
|
+
declare function onTabItemTap(handler: (opt: HostMiniProgramTabItemTapOption) => void): void;
|
|
514
|
+
declare function onResize(handler: (opt: HostMiniProgramPageResizeOption) => void): void;
|
|
515
515
|
declare function onMoved(handler: () => void): void;
|
|
516
516
|
declare function onAttached(handler: () => void): void;
|
|
517
517
|
declare function onDetached(handler: () => void): void;
|
|
518
518
|
declare function onError(handler: (err: any) => void): void;
|
|
519
|
-
declare function onSaveExitState(handler: () =>
|
|
520
|
-
declare function onShareAppMessage(handler:
|
|
521
|
-
declare function onShareTimeline(handler:
|
|
522
|
-
declare function onAddToFavorites(handler:
|
|
519
|
+
declare function onSaveExitState(handler: () => HostMiniProgramSaveExitState): void;
|
|
520
|
+
declare function onShareAppMessage(handler: (options: HostMiniProgramShareAppMessageOption) => Record<string, any> | void): void;
|
|
521
|
+
declare function onShareTimeline(handler: HostMiniProgramPageLifetime['onShareTimeline']): void;
|
|
522
|
+
declare function onAddToFavorites(handler: (options: HostMiniProgramAddToFavoritesOption) => Record<string, any> | void): void;
|
|
523
523
|
//#endregion
|
|
524
524
|
//#region src/runtime/hooks/vue.d.ts
|
|
525
525
|
/**
|
|
@@ -572,13 +572,13 @@ declare function onServerPrefetch(_handler: () => void): void;
|
|
|
572
572
|
declare function callUpdateHooks(target: InternalRuntimeState, phase: 'before' | 'after'): void;
|
|
573
573
|
//#endregion
|
|
574
574
|
//#region src/runtime/intersectionObserver.d.ts
|
|
575
|
-
type UseIntersectionObserverOptions =
|
|
576
|
-
type UseIntersectionObserverResult =
|
|
575
|
+
type UseIntersectionObserverOptions = HostMiniProgramIntersectionObserverOptions;
|
|
576
|
+
type UseIntersectionObserverResult = HostMiniProgramIntersectionObserver;
|
|
577
577
|
/**
|
|
578
578
|
* 在 setup 中创建 IntersectionObserver,并在卸载时自动断开。
|
|
579
579
|
*
|
|
580
580
|
* - 优先使用 `ctx.instance.createIntersectionObserver(options)`。
|
|
581
|
-
* -
|
|
581
|
+
* - 不可用时回退到宿主全局对象的 `createIntersectionObserver(...)`。
|
|
582
582
|
*/
|
|
583
583
|
declare function useIntersectionObserver(options?: UseIntersectionObserverOptions): UseIntersectionObserverResult;
|
|
584
584
|
//#endregion
|
|
@@ -693,7 +693,7 @@ type UsePageScrollThrottleStopHandle = () => void;
|
|
|
693
693
|
/**
|
|
694
694
|
* 在 setup 中注册节流后的 onPageScroll 监听,并在卸载时自动清理。
|
|
695
695
|
*/
|
|
696
|
-
declare function usePageScrollThrottle(handler: (opt:
|
|
696
|
+
declare function usePageScrollThrottle(handler: (opt: HostMiniProgramPageScrollOption) => void, options?: UsePageScrollThrottleOptions): UsePageScrollThrottleStopHandle;
|
|
697
697
|
//#endregion
|
|
698
698
|
//#region src/runtime/provide.d.ts
|
|
699
699
|
/**
|
|
@@ -864,7 +864,7 @@ type RuntimeRouter = SetupContextRouter;
|
|
|
864
864
|
*
|
|
865
865
|
* - 优先使用实例上的 `this.router`(组件路径语义)。
|
|
866
866
|
* - 不可用时回退到 `this.pageRouter`。
|
|
867
|
-
* -
|
|
867
|
+
* - 低版本基础库再回退到宿主全局路由方法。
|
|
868
868
|
*
|
|
869
869
|
* 如需更贴近 Vue Router 的高阶能力(导航守卫、失败类型、统一解析),
|
|
870
870
|
* 推荐改用 `wevu/router` 子入口的 `useRouter()`。
|
|
@@ -875,7 +875,7 @@ declare function useNativeRouter(): RuntimeRouter;
|
|
|
875
875
|
*
|
|
876
876
|
* - 优先使用实例上的 `this.pageRouter`(页面路径语义)。
|
|
877
877
|
* - 不可用时回退到 `this.router`。
|
|
878
|
-
* -
|
|
878
|
+
* - 低版本基础库再回退到宿主全局路由方法。
|
|
879
879
|
*
|
|
880
880
|
* 如需更贴近 Vue Router 的高阶能力(导航守卫、失败类型、统一解析),
|
|
881
881
|
* 推荐改用 `wevu/router` 子入口的 `useRouter()`。
|
|
@@ -903,7 +903,7 @@ type NativeType = null | undefined | number | string | boolean | symbol | ((...a
|
|
|
903
903
|
type InferDefault<P, T> = ((props: P) => T & {}) | (T extends NativeType ? T : never);
|
|
904
904
|
type PropsWithDefaults<T, Defaults extends InferDefaults<T>, BKeys extends keyof T> = T extends unknown ? Readonly<MappedOmit<T, keyof Defaults>> & { readonly [K in keyof Defaults as K extends keyof T ? K : never]-?: K extends keyof T ? Defaults[K] extends undefined ? IfAny<Defaults[K], NotUndefined<T[K]>, T[K]> : NotUndefined<T[K]> : never } & { readonly [K in BKeys]-?: K extends keyof Defaults ? Defaults[K] extends undefined ? boolean | undefined : boolean : boolean } : never;
|
|
905
905
|
type UnionToIntersection<U> = (U extends any ? (arg: U) => any : never) extends ((arg: infer I) => any) ? I : never;
|
|
906
|
-
type ScriptSetupTriggerEventOptions =
|
|
906
|
+
type ScriptSetupTriggerEventOptions = HostMiniProgramTriggerEventOptions;
|
|
907
907
|
type EmitArgsWithTriggerEventOptions<Args extends any[]> = Args extends [] ? [] | [detail: undefined, options: ScriptSetupTriggerEventOptions] : Args | [...args: Args, options: ScriptSetupTriggerEventOptions];
|
|
908
908
|
type ObjectEmitsOptions = Record<string, ((...args: any[]) => any) | null>;
|
|
909
909
|
type EmitsOptions = ObjectEmitsOptions | string[];
|
|
@@ -911,14 +911,14 @@ type EmitFn<Options = ObjectEmitsOptions, Event extends keyof Options = keyof Op
|
|
|
911
911
|
type ComponentTypeEmits = ((...args: any[]) => any) | Record<string, any>;
|
|
912
912
|
type RecordToUnion<T extends Record<string, any>> = T[keyof T];
|
|
913
913
|
type ShortEmits<T extends Record<string, any>> = UnionToIntersection<RecordToUnion<{ [K in keyof T]: (evt: K, ...args: EmitArgsWithTriggerEventOptions<T[K]>) => void }>>;
|
|
914
|
-
type ScriptSetupNativePropertyOption =
|
|
915
|
-
type ScriptSetupNativeMethodOption =
|
|
916
|
-
type ScriptSetupNativeBehaviorOption =
|
|
917
|
-
type ScriptSetupNativeInstance<D extends object, P extends ScriptSetupNativePropertyOption, M extends ScriptSetupNativeMethodOption> =
|
|
918
|
-
type ScriptSetupObservedProperty<TProperty extends
|
|
919
|
-
observer?: string | ((this: TInstance, newVal:
|
|
914
|
+
type ScriptSetupNativePropertyOption = HostMiniProgramComponentPropertyOption;
|
|
915
|
+
type ScriptSetupNativeMethodOption = HostMiniProgramComponentMethodOption;
|
|
916
|
+
type ScriptSetupNativeBehaviorOption = HostMiniProgramComponentEmptyArray;
|
|
917
|
+
type ScriptSetupNativeInstance<D extends object, P extends ScriptSetupNativePropertyOption, M extends ScriptSetupNativeMethodOption> = MiniProgramComponentInstance<D, P, M, ScriptSetupNativeBehaviorOption>;
|
|
918
|
+
type ScriptSetupObservedProperty<TProperty extends HostMiniProgramComponentAllFullProperty, TInstance> = Omit<TProperty, 'observer'> & {
|
|
919
|
+
observer?: string | ((this: TInstance, newVal: MiniProgramComponentPropertyValue<TProperty>, oldVal: MiniProgramComponentPropertyValue<TProperty>, changedPath: Array<string | number>) => void);
|
|
920
920
|
};
|
|
921
|
-
type ScriptSetupPropertyObserver<TProperty extends
|
|
921
|
+
type ScriptSetupPropertyObserver<TProperty extends HostMiniProgramComponentAllProperty, TInstance> = TProperty extends infer TCurrent extends HostMiniProgramComponentAllFullProperty ? ScriptSetupObservedProperty<TCurrent, TInstance> : TProperty;
|
|
922
922
|
type ScriptSetupNativeProperties<D extends object, P extends ScriptSetupNativePropertyOption, M extends ScriptSetupNativeMethodOption> = { [K in keyof P]: ScriptSetupPropertyObserver<P[K], ScriptSetupNativeInstance<D, P, M>> };
|
|
923
923
|
type ScriptSetupNativeMethods<D extends object, P extends ScriptSetupNativePropertyOption, M extends ScriptSetupNativeMethodOption> = M & ThisType<ScriptSetupNativeInstance<D, P, M>>;
|
|
924
924
|
type RemoveIndexSignature<T> = { [K in keyof T as string extends K ? never : number extends K ? never : symbol extends K ? never : K]: T[K] };
|
|
@@ -942,7 +942,7 @@ type ScriptSetupDefineOptions<D extends object = Record<string, any>, C extends
|
|
|
942
942
|
/**
|
|
943
943
|
* 小程序 Component 选项(multipleSlots/styleIsolation 等)。
|
|
944
944
|
*/
|
|
945
|
-
options?:
|
|
945
|
+
options?: HostMiniProgramComponentBehaviorOptions;
|
|
946
946
|
/**
|
|
947
947
|
* 小程序原生 properties。
|
|
948
948
|
*/
|
|
@@ -985,8 +985,8 @@ declare function defineExpose<T extends Record<string, any> = Record<string, any
|
|
|
985
985
|
/**
|
|
986
986
|
* defineOptions 设置 `<script setup>` 组件选项(仅类型层)。
|
|
987
987
|
*/
|
|
988
|
-
declare function defineOptions<D extends object = Record<string, any>, C extends ComputedDefinitions = ComputedDefinitions, M extends MethodDefinitions = MethodDefinitions, P extends
|
|
989
|
-
declare function defineOptions<D extends object = Record<string, any>, C extends ComputedDefinitions = ComputedDefinitions, M extends MethodDefinitions = MethodDefinitions, P extends
|
|
988
|
+
declare function defineOptions<D extends object = Record<string, any>, C extends ComputedDefinitions = ComputedDefinitions, M extends MethodDefinitions = MethodDefinitions, P extends HostMiniProgramComponentPropertyOption = HostMiniProgramComponentPropertyOption>(options?: ScriptSetupDefineOptions<D, C, M, P>): void;
|
|
989
|
+
declare function defineOptions<D extends object = Record<string, any>, C extends ComputedDefinitions = ComputedDefinitions, M extends MethodDefinitions = MethodDefinitions, P extends HostMiniProgramComponentPropertyOption = HostMiniProgramComponentPropertyOption>(options?: () => ScriptSetupDefineOptions<D, C, M, P> | Promise<ScriptSetupDefineOptions<D, C, M, P>>): void;
|
|
990
990
|
/**
|
|
991
991
|
* defineSlots 声明 slots 类型(仅类型层)。
|
|
992
992
|
*/
|
|
@@ -1026,4 +1026,4 @@ declare function defineModel<T = any, M extends PropertyKey = string, G = T, S =
|
|
|
1026
1026
|
//#region src/version.d.ts
|
|
1027
1027
|
declare const version: string;
|
|
1028
1028
|
//#endregion
|
|
1029
|
-
export { PageLayoutState as $, onTabItemTap as $t, defineAppSetup as A,
|
|
1029
|
+
export { PageLayoutState as $, onTabItemTap as $t, defineAppSetup as A, MiniProgramTemplateRefValue as An, onServerPrefetch as At, setRuntimeSetDataVisibility as B, SetDataDebugInfo as Bn, onMemoryWarning as Bt, UseModelOptions as C, defineComponent as Cn, onActivated as Ct, useAttrs as D, createApp as Dn, onDeactivated as Dt, useModel as E, setWevuDefaults as En, onBeforeUpdate as Et, useUpdatePerformanceListener as F, CreateAppOptions as Fn, onDetached as Ft, inject as G, onReachBottom as Gt, registerComponent as H, onPageNotFound as Ht, normalizeClass as I, DataOption as In, onError as It, provideGlobal as J, onRouteDone as Jt, injectGlobal as K, onReady as Kt, normalizeStyle as L, DefineAppOptions as Ln, onHide as Lt, UpdatePerformanceListener as M, TemplateRefs as Mn, onUpdated as Mt, UpdatePerformanceListenerResult as N, WevuGlobalComponents as Nn, onAddToFavorites as Nt, useNativeInstance as O, GlobalComponents as On, onErrorCaptured as Ot, UseUpdatePerformanceListenerStopHandle as P, WevuGlobalDirectives as Pn, onAttached as Pt, usePageScrollThrottle as Q, onShow as Qt, runSetupFunction as R, DefineComponentOptions as Rn, onLaunch as Rt, ModelModifiers as S, createWevuScopedSlotComponent as Sn, callUpdateHooks as St, useBindModel as T, resetWevuDefaults as Tn, onBeforeUnmount as Tt, registerApp as U, onPageScroll as Ut, teardownRuntimeInstance as V, SetDataSnapshotOptions as Vn, onMoved as Vt, hasInjectionContext as W, onPullDownRefresh as Wt, UsePageScrollThrottleOptions as X, onShareAppMessage as Xt, setGlobalProvidedValue as Y, onSaveExitState as Yt, UsePageScrollThrottleStopHandle as Z, onShareTimeline as Zt, EmitsOptions as _, SetupContextWithTypeProps as _n, useLayoutHosts as _t, PageLayoutMeta as a, getCurrentInstance as an, usePageLayout as at, useNativePageRouter as b, WevuDefinedComponent as bn, UseIntersectionObserverResult as bt, defineExpose as c, setCurrentSetupContext as cn, LayoutBridgeInstance as ct, definePageMeta as d, DisposableMethodName as dn, registerRuntimeLayoutHosts as dt, onThemeChange as en, WevuPageLayoutMap as et, defineProps as f, DisposableObject as fn, resolveLayoutBridge as ft, EmitFn as g, DefineComponentWithTypeProps as gn, useLayoutBridge as gt, ComponentTypeEmits as h, DefineComponentTypePropsOptions as hn, unregisterRuntimeLayoutHosts as ht, ModelRef as i, callHookReturn as in, syncRuntimePageLayoutStateFromRuntime as it, use as j, TemplateRefValue as jn, onUnmounted as jt, useSlots as k, GlobalDirectives as kn, onMounted as kt, defineModel as l, DisposableBag as ln, LayoutHostBinding as lt, withDefaults as m, ComponentDefinition as mn, unregisterPageLayoutBridge as mt, DefineModelModifiers as n, onUnload as nn, setPageLayout as nt, PageMeta as o, getCurrentSetupContext as on, isNoSetData as ot, defineSlots as p, useDisposables as pn, resolveLayoutHost as pt, provide as q, onResize as qt, DefineModelTransformOptions as r, callHookList as rn, syncRuntimePageLayoutState as rt, defineEmits as s, setCurrentInstance as sn, markNoSetData as st, version as t, onUnhandledRejection as tn, resolveRuntimePageLayoutName as tt, defineOptions as u, DisposableLike as un, registerPageLayoutBridge as ut, TemplateRef as v, SetupFunctionWithTypeProps as vn, waitForLayoutHost as vt, mergeModels as w, WevuDefaults as wn, onBeforeMount as wt, useNativeRouter as x, createWevuComponent as xn, useIntersectionObserver as xt, useTemplateRef as y, WevuComponentConstructor as yn, UseIntersectionObserverOptions as yt, mountRuntimeInstance as z, PageFeatures as zn, onLoad as zt };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { $ as
|
|
3
|
-
import { $ as PageLayoutState, $t as onTabItemTap, A as defineAppSetup, An as
|
|
4
|
-
import { a as ActionContext, c as MutationType, d as SubscriptionCallback, i as defineStore, l as StoreManager, n as storeToRefs, o as ActionSubscriber, r as createStore, s as DefineStoreOptions, t as StoreToRefsResult, u as StoreSubscribeOptions } from "./index-
|
|
5
|
-
export { ActionContext, ActionSubscriber, AllowedComponentProps, AppConfig, ComponentCustomProps, ComponentDefinition, ComponentOptionsMixin, ComponentPropsOptions, ComponentPublicInstance, ComponentTypeEmits, ComputedDefinitions, ComputedGetter, ComputedRef, ComputedSetter, CreateAppOptions, CustomRefFactory, CustomRefOptions, CustomRefSource, DataOption, DefineAppOptions, DefineComponent, DefineComponentOptions, DefineComponentTypePropsOptions, DefineComponentWithTypeProps, DefineModelModifiers, DefineModelTransformOptions, DefineStoreOptions, DisposableBag, DisposableLike, DisposableMethodName, DisposableObject, EffectScope, EmitFn, EmitsOptions, ExtractComputed, ExtractDefaultPropTypes, ExtractMethods, ExtractPropTypes, ExtractPublicPropTypes, GlobalComponents, GlobalDirectives, InferNativePropType, InferNativeProps, InferPropType, InferProps, InternalRuntimeState, InternalRuntimeStateFields, LayoutBridgeInstance, LayoutHostBinding, MapSources, MaybeRef, MaybeRefOrGetter, MaybeUndefined, MethodDefinitions, MiniProgramAdapter, MiniProgramAppOptions, MiniProgramBehaviorIdentifier,
|
|
1
|
+
import { a as MiniProgramCSSProperties, c as MiniProgramIntrinsicEventHandler, d as WeappIntrinsicElementBaseAttributes, f as WeappIntrinsicEventHandler, i as WeappIntrinsicElements, l as WeappCSSProperties, n as MiniProgramIntrinsicElements, o as MiniProgramDatasetAttributes, r as WeappHtmlAliasIntrinsicElements, s as MiniProgramIntrinsicElementBaseAttributes, t as MiniProgramHtmlAliasIntrinsicElements, u as WeappDatasetAttributes } from "./weappIntrinsicElements-Cdfh6BlL.mjs";
|
|
2
|
+
import { $ as shallowRef, $n as HostMiniProgramNodesRefFields, A as watchPostEffect, An as MiniProgramPageLifetimes, Ar as TtMiniProgramHostSourceContract, At as nextTick, B as WatchOptions, Bn as HostMiniProgramComponentInstance, Bt as MaybeRef, C as ExtractMethods, Cn as MiniProgramAppOptions, Cr as MiniProgramHostSourceRegistry, Ct as effect, D as ModelBindingPayload, Dn as MiniProgramComponentPropertyValue, Dr as MiniProgramRuntimeHostNamespaceBySource, Dt as onScopeDispose, E as ModelBindingOptions, En as MiniProgramComponentOptions, Er as MiniProgramPlatformHostSourceRegistry, Et as getCurrentScope, F as OnCleanup, Fn as HostMiniProgramBoundingClientRectResult, Fr as WechatMiniProgramHostNamespace, Ft as WritableComputedRef, G as WatchStopHandle, Gn as HostMiniProgramComponentTrivialInstance, Gt as isRef, H as WatchSource, Hn as HostMiniProgramComponentPropertyOption, Ht as Ref, I as WatchCallback, In as HostMiniProgramComponentAllFullProperty, Ir as DefaultMiniProgramHostNamespace, It as computed, J as traverse, Jn as HostMiniProgramIntersectionObserverOptions, Jt as unref, K as getDeepWatchStrategy, Kn as HostMiniProgramComponentTrivialOption, Kt as ref, L as WatchEffect, Ln as HostMiniProgramComponentAllProperty, Lt as CustomRefFactory, M as MapSources, Mn as HostMiniProgramAppOptions, Mr as DouyinMiniProgramHostNamespace, Mt as ComputedRef, N as MaybeUndefined, Nn as HostMiniProgramAppTrivialInstance, Nr as TtMiniProgramHostNamespace, Nt as ComputedSetter, O as watch, On as MiniProgramComponentRawOptions, Or as MiniProgramRuntimeHostSourceName, Ot as startBatch, P as MultiWatchSources, Pn as HostMiniProgramBehaviorIdentifier, Pr as AlipayMiniProgramHostNamespace, Pt as WritableComputedOptions, Q as isShallowRef, Qn as HostMiniProgramNodesRef, Qt as MiniProgramRouterSwitchTabOption, R as WatchEffectOptions, Rn as HostMiniProgramComponentBehaviorOptions, Rt as CustomRefOptions, S as ExtractComputed, Sn as MiniProgramAdapter, Sr as MiniProgramHostSourceName, St as batch, T as ModelBinding, Tn as MiniProgramComponentInstance, Tr as MiniProgramPlatformHostSourceName, Tt as endBatch, U as WatchSourceValue, Un as HostMiniProgramComponentPropertyValue, Ut as ShallowRef, V as WatchScheduler, Vn as HostMiniProgramComponentMethodOption, Vt as MaybeRefOrGetter, W as WatchSources, Wn as HostMiniProgramComponentShortProperty, Wt as customRef, X as toRef, Xn as HostMiniProgramMemoryWarningResult, Xt as MiniProgramRouterReLaunchOption, Y as ToRefs, Yn as HostMiniProgramLaunchOptions, Yt as MiniProgramRouterNavigateToOption, Z as toRefs, Zn as HostMiniProgramNavigateToOption, Zt as MiniProgramRouterRedirectToOption, _ as RuntimeApp, _n as NativeTypeHint, _r as MiniProgramHostNamespace, _t as MutationOp, a as NativeComponent, ar as HostMiniProgramReLaunchOption, at as getReactiveVersion, b as ComponentPublicInstance, bn as PropOptions, br as DouyinMiniProgramHostSourceContract, bt as removeMutationRecorder, c as ShallowUnwrapRef, cn as ExtractDefaultPropTypes, cr as HostMiniProgramSaveExitState, ct as markRaw, d as SetupContext, dn as InferNativePropType, dr as HostMiniProgramShareAppMessageOption, dt as isShallowReactive, er as HostMiniProgramPageLifetime, et as triggerRef, f as SetupContextNativeInstance, fn as InferNativeProps, fr as HostMiniProgramSwitchTabOption, ft as shallowReactive, g as InternalRuntimeStateFields, gn as NativePropsOptions, gr as HostMiniProgramUnhandledRejectionResult, gt as MutationKind, h as InternalRuntimeState, hn as NativePropType, hr as HostMiniProgramTriggerEventOptions, ht as touchReactive, i as DefineComponent, ir as HostMiniProgramPageTrivialInstance, it as shallowReadonly, j as watchSyncEffect, jn as HostMiniProgramAddToFavoritesOption, jr as WechatMiniProgramHostSourceContract, jt as ComputedGetter, k as watchEffect, kn as MiniProgramInstance, kr as MiniProgramRuntimeHostSourceRegistry, kt as stop, l as VNode, ln as ExtractPropTypes, lr as HostMiniProgramScrollOffsetResult, lt as reactive, m as AppConfig, mn as InferProps, mr as HostMiniProgramThemeChangeResult, mt as prelinkReactiveTree, n as ComponentCustomProps, nr as HostMiniProgramPageResizeOption, nt as isReadonly, o as ObjectDirective, on as WevuTypedRouterRouteMap, or as HostMiniProgramRedirectToOption, ot as isRaw, p as SetupFunction, pn as InferPropType, pr as HostMiniProgramTabItemTapOption, pt as PrelinkReactiveTreeOptions, q as setDeepWatchStrategy, qn as HostMiniProgramIntersectionObserver, qt as toValue, r as ComponentOptionsMixin, rn as SetupContextRouter, rr as HostMiniProgramPageScrollOption, rt as readonly, s as PublicProps, sn as ComponentPropsOptions, sr as HostMiniProgramRouter, st as isReactive, t as AllowedComponentProps, tr as HostMiniProgramPageNotFoundOptions, tt as isProxy, u as VNodeProps, un as ExtractPublicPropTypes, ur as HostMiniProgramSelectorQuery, ut as toRaw, v as RuntimeInstance, vn as NativeTypedProperty, vr as AlipayMiniProgramHostSourceContract, vt as MutationRecord, w as MethodDefinitions, wn as MiniProgramBehaviorIdentifier, wr as MiniProgramPlatformHostNamespaceBySource, wt as effectScope, x as ComputedDefinitions, xn as PropType, xr as MiniProgramHostNamespaceBySource, xt as EffectScope, y as WevuPlugin, yn as PropConstructor, yr as DefaultMiniProgramHostSourceContract, yt as addMutationRecorder, z as WatchMultiSources, zn as HostMiniProgramComponentEmptyArray, zt as CustomRefSource } from "./vue-types-Ir1bT6Gp.mjs";
|
|
3
|
+
import { $ as PageLayoutState, $t as onTabItemTap, A as defineAppSetup, An as MiniProgramTemplateRefValue, At as onServerPrefetch, B as setRuntimeSetDataVisibility, Bn as SetDataDebugInfo, Bt as onMemoryWarning, C as UseModelOptions, Cn as defineComponent, Ct as onActivated, D as useAttrs, Dn as createApp, Dt as onDeactivated, E as useModel, En as setWevuDefaults, Et as onBeforeUpdate, F as useUpdatePerformanceListener, Fn as CreateAppOptions, Ft as onDetached, G as inject, Gt as onReachBottom, H as registerComponent, Ht as onPageNotFound, I as normalizeClass, In as DataOption, It as onError, J as provideGlobal, Jt as onRouteDone, K as injectGlobal, Kt as onReady, L as normalizeStyle, Ln as DefineAppOptions, Lt as onHide, M as UpdatePerformanceListener, Mn as TemplateRefs, Mt as onUpdated, N as UpdatePerformanceListenerResult, Nn as WevuGlobalComponents, Nt as onAddToFavorites, O as useNativeInstance, On as GlobalComponents, Ot as onErrorCaptured, P as UseUpdatePerformanceListenerStopHandle, Pn as WevuGlobalDirectives, Pt as onAttached, Q as usePageScrollThrottle, Qt as onShow, R as runSetupFunction, Rn as DefineComponentOptions, Rt as onLaunch, S as ModelModifiers, Sn as createWevuScopedSlotComponent, St as callUpdateHooks, T as useBindModel, Tn as resetWevuDefaults, Tt as onBeforeUnmount, U as registerApp, Ut as onPageScroll, V as teardownRuntimeInstance, Vn as SetDataSnapshotOptions, Vt as onMoved, W as hasInjectionContext, Wt as onPullDownRefresh, X as UsePageScrollThrottleOptions, Xt as onShareAppMessage, Y as setGlobalProvidedValue, Yt as onSaveExitState, Z as UsePageScrollThrottleStopHandle, Zt as onShareTimeline, _ as EmitsOptions, _n as SetupContextWithTypeProps, _t as useLayoutHosts, a as PageLayoutMeta, an as getCurrentInstance, at as usePageLayout, b as useNativePageRouter, bn as WevuDefinedComponent, bt as UseIntersectionObserverResult, c as defineExpose, cn as setCurrentSetupContext, ct as LayoutBridgeInstance, d as definePageMeta, dn as DisposableMethodName, dt as registerRuntimeLayoutHosts, en as onThemeChange, et as WevuPageLayoutMap, f as defineProps, fn as DisposableObject, ft as resolveLayoutBridge, g as EmitFn, gn as DefineComponentWithTypeProps, gt as useLayoutBridge, h as ComponentTypeEmits, hn as DefineComponentTypePropsOptions, ht as unregisterRuntimeLayoutHosts, i as ModelRef, in as callHookReturn, it as syncRuntimePageLayoutStateFromRuntime, j as use, jn as TemplateRefValue, jt as onUnmounted, k as useSlots, kn as GlobalDirectives, kt as onMounted, l as defineModel, ln as DisposableBag, lt as LayoutHostBinding, m as withDefaults, mn as ComponentDefinition, mt as unregisterPageLayoutBridge, n as DefineModelModifiers, nn as onUnload, nt as setPageLayout, o as PageMeta, on as getCurrentSetupContext, ot as isNoSetData, p as defineSlots, pn as useDisposables, pt as resolveLayoutHost, q as provide, qt as onResize, r as DefineModelTransformOptions, rn as callHookList, rt as syncRuntimePageLayoutState, s as defineEmits, sn as setCurrentInstance, st as markNoSetData, t as version, tn as onUnhandledRejection, tt as resolveRuntimePageLayoutName, u as defineOptions, un as DisposableLike, ut as registerPageLayoutBridge, v as TemplateRef, vn as SetupFunctionWithTypeProps, vt as waitForLayoutHost, w as mergeModels, wn as WevuDefaults, wt as onBeforeMount, x as useNativeRouter, xn as createWevuComponent, xt as useIntersectionObserver, y as useTemplateRef, yn as WevuComponentConstructor, yt as UseIntersectionObserverOptions, z as mountRuntimeInstance, zn as PageFeatures, zt as onLoad } from "./index-B2-lsPjZ.mjs";
|
|
4
|
+
import { a as ActionContext, c as MutationType, d as SubscriptionCallback, i as defineStore, l as StoreManager, n as storeToRefs, o as ActionSubscriber, r as createStore, s as DefineStoreOptions, t as StoreToRefsResult, u as StoreSubscribeOptions } from "./index-51F79u-U.mjs";
|
|
5
|
+
export { ActionContext, ActionSubscriber, AlipayMiniProgramHostNamespace, AlipayMiniProgramHostSourceContract, AllowedComponentProps, AppConfig, ComponentCustomProps, ComponentDefinition, ComponentOptionsMixin, ComponentPropsOptions, ComponentPublicInstance, ComponentTypeEmits, ComputedDefinitions, ComputedGetter, ComputedRef, ComputedSetter, CreateAppOptions, CustomRefFactory, CustomRefOptions, CustomRefSource, DataOption, DefaultMiniProgramHostNamespace, DefaultMiniProgramHostSourceContract, DefineAppOptions, DefineComponent, DefineComponentOptions, DefineComponentTypePropsOptions, DefineComponentWithTypeProps, DefineModelModifiers, DefineModelTransformOptions, DefineStoreOptions, DisposableBag, DisposableLike, DisposableMethodName, DisposableObject, DouyinMiniProgramHostNamespace, DouyinMiniProgramHostSourceContract, EffectScope, EmitFn, EmitsOptions, ExtractComputed, ExtractDefaultPropTypes, ExtractMethods, ExtractPropTypes, ExtractPublicPropTypes, GlobalComponents, GlobalDirectives, HostMiniProgramAddToFavoritesOption, HostMiniProgramAddToFavoritesOption as MiniProgramAddToFavoritesOption, HostMiniProgramAppOptions, HostMiniProgramAppTrivialInstance, HostMiniProgramBehaviorIdentifier, HostMiniProgramBoundingClientRectResult, HostMiniProgramBoundingClientRectResult as MiniProgramBoundingClientRectResult, HostMiniProgramComponentAllFullProperty, HostMiniProgramComponentAllFullProperty as MiniProgramComponentAllFullProperty, HostMiniProgramComponentAllProperty, HostMiniProgramComponentAllProperty as MiniProgramComponentAllProperty, HostMiniProgramComponentBehaviorOptions, HostMiniProgramComponentBehaviorOptions as MiniProgramComponentBehaviorOptions, HostMiniProgramComponentEmptyArray, HostMiniProgramComponentEmptyArray as MiniProgramComponentEmptyArray, HostMiniProgramComponentInstance, HostMiniProgramComponentMethodOption, HostMiniProgramComponentMethodOption as MiniProgramComponentMethodOption, HostMiniProgramComponentPropertyOption, HostMiniProgramComponentPropertyOption as MiniProgramComponentPropertyOption, HostMiniProgramComponentPropertyValue, HostMiniProgramComponentShortProperty, HostMiniProgramComponentShortProperty as MiniProgramComponentShortProperty, HostMiniProgramComponentTrivialInstance, HostMiniProgramComponentTrivialOption, HostMiniProgramIntersectionObserver, HostMiniProgramIntersectionObserver as MiniProgramIntersectionObserver, HostMiniProgramIntersectionObserverOptions, HostMiniProgramIntersectionObserverOptions as MiniProgramIntersectionObserverOptions, HostMiniProgramLaunchOptions, HostMiniProgramLaunchOptions as MiniProgramLaunchOptions, HostMiniProgramMemoryWarningResult, HostMiniProgramMemoryWarningResult as MiniProgramMemoryWarningResult, HostMiniProgramNavigateToOption, HostMiniProgramNavigateToOption as MiniProgramNavigateToOption, HostMiniProgramNodesRef, HostMiniProgramNodesRef as MiniProgramNodesRef, HostMiniProgramNodesRefFields, HostMiniProgramNodesRefFields as MiniProgramNodesRefFields, HostMiniProgramPageLifetime, HostMiniProgramPageLifetime as MiniProgramPageLifetime, HostMiniProgramPageNotFoundOptions, HostMiniProgramPageNotFoundOptions as MiniProgramPageNotFoundOptions, HostMiniProgramPageResizeOption, HostMiniProgramPageResizeOption as MiniProgramPageResizeOption, HostMiniProgramPageScrollOption, HostMiniProgramPageScrollOption as MiniProgramPageScrollOption, HostMiniProgramPageTrivialInstance, HostMiniProgramReLaunchOption, HostMiniProgramReLaunchOption as MiniProgramReLaunchOption, HostMiniProgramRedirectToOption, HostMiniProgramRedirectToOption as MiniProgramRedirectToOption, HostMiniProgramRouter, HostMiniProgramRouter as MiniProgramRouter, HostMiniProgramSaveExitState, HostMiniProgramSaveExitState as MiniProgramSaveExitState, HostMiniProgramScrollOffsetResult, HostMiniProgramScrollOffsetResult as MiniProgramScrollOffsetResult, HostMiniProgramSelectorQuery, HostMiniProgramSelectorQuery as MiniProgramSelectorQuery, HostMiniProgramShareAppMessageOption, HostMiniProgramShareAppMessageOption as MiniProgramShareAppMessageOption, HostMiniProgramSwitchTabOption, HostMiniProgramSwitchTabOption as MiniProgramSwitchTabOption, HostMiniProgramTabItemTapOption, HostMiniProgramTabItemTapOption as MiniProgramTabItemTapOption, HostMiniProgramThemeChangeResult, HostMiniProgramThemeChangeResult as MiniProgramThemeChangeResult, HostMiniProgramTriggerEventOptions, HostMiniProgramTriggerEventOptions as TriggerEventOptions, HostMiniProgramUnhandledRejectionResult, HostMiniProgramUnhandledRejectionResult as MiniProgramUnhandledRejectionResult, InferNativePropType, InferNativeProps, InferPropType, InferProps, InternalRuntimeState, InternalRuntimeStateFields, LayoutBridgeInstance, LayoutHostBinding, MapSources, MaybeRef, MaybeRefOrGetter, MaybeUndefined, MethodDefinitions, MiniProgramAdapter, MiniProgramAppOptions, MiniProgramBehaviorIdentifier, MiniProgramCSSProperties, MiniProgramComponentInstance, MiniProgramComponentOptions, MiniProgramComponentPropertyValue, MiniProgramComponentRawOptions, MiniProgramDatasetAttributes, MiniProgramHostNamespace, MiniProgramHostNamespaceBySource, MiniProgramHostSourceName, MiniProgramHostSourceRegistry, MiniProgramHtmlAliasIntrinsicElements, MiniProgramInstance, MiniProgramIntrinsicElementBaseAttributes, MiniProgramIntrinsicElements, MiniProgramIntrinsicEventHandler, MiniProgramPageLifetimes, MiniProgramPlatformHostNamespaceBySource, MiniProgramPlatformHostSourceName, MiniProgramPlatformHostSourceRegistry, MiniProgramRouterNavigateToOption, MiniProgramRouterReLaunchOption, MiniProgramRouterRedirectToOption, MiniProgramRouterSwitchTabOption, MiniProgramRuntimeHostNamespaceBySource, MiniProgramRuntimeHostSourceName, MiniProgramRuntimeHostSourceRegistry, MiniProgramTemplateRefValue, ModelBinding, ModelBindingOptions, ModelBindingPayload, ModelModifiers, ModelRef, MultiWatchSources, MutationKind, MutationOp, MutationRecord, MutationType, NativeComponent, NativePropType, NativePropsOptions, NativeTypeHint, NativeTypedProperty, ObjectDirective, OnCleanup, PageFeatures, PageLayoutMeta, PageLayoutState, PageMeta, PrelinkReactiveTreeOptions, PropConstructor, PropOptions, PropType, PublicProps, Ref, RuntimeApp, RuntimeInstance, SetDataDebugInfo, SetDataSnapshotOptions, SetupContext, SetupContextNativeInstance, SetupContextRouter, SetupContextWithTypeProps, SetupFunction, SetupFunctionWithTypeProps, ShallowRef, ShallowUnwrapRef, StoreManager, StoreSubscribeOptions, StoreToRefsResult, SubscriptionCallback, TemplateRef, TemplateRefValue, TemplateRefs, ToRefs, TtMiniProgramHostNamespace, TtMiniProgramHostSourceContract, UpdatePerformanceListener, UpdatePerformanceListenerResult, UseIntersectionObserverOptions, UseIntersectionObserverResult, UseModelOptions, UsePageScrollThrottleOptions, UsePageScrollThrottleStopHandle, UseUpdatePerformanceListenerStopHandle, VNode, VNodeProps, WatchCallback, WatchEffect, WatchEffectOptions, WatchMultiSources, WatchOptions, WatchScheduler, WatchSource, WatchSourceValue, WatchSources, WatchStopHandle, WeappCSSProperties, WeappDatasetAttributes, WeappHtmlAliasIntrinsicElements, WeappIntrinsicElementBaseAttributes, WeappIntrinsicElements, WeappIntrinsicEventHandler, WechatMiniProgramHostNamespace, WechatMiniProgramHostSourceContract, WevuComponentConstructor, WevuDefaults, WevuDefinedComponent, WevuGlobalComponents, WevuGlobalDirectives, WevuPageLayoutMap, WevuPlugin, WevuTypedRouterRouteMap, WritableComputedOptions, WritableComputedRef, addMutationRecorder, batch, callHookList, callHookReturn, callUpdateHooks, computed, createApp, createStore, createWevuComponent, createWevuScopedSlotComponent, customRef, defineAppSetup, defineComponent, defineEmits, defineExpose, defineModel, defineOptions, definePageMeta, defineProps, defineSlots, defineStore, effect, effectScope, endBatch, getCurrentInstance, getCurrentScope, getCurrentSetupContext, getDeepWatchStrategy, getReactiveVersion, hasInjectionContext, inject, injectGlobal, isNoSetData, isProxy, isRaw, isReactive, isReadonly, isRef, isShallowReactive, isShallowRef, markNoSetData, markRaw, mergeModels, mountRuntimeInstance, nextTick, normalizeClass, normalizeStyle, onActivated, onAddToFavorites, onAttached, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onDetached, onError, onErrorCaptured, onHide, onLaunch, onLoad, onMemoryWarning, onMounted, onMoved, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onScopeDispose, onServerPrefetch, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload, onUnmounted, onUpdated, prelinkReactiveTree, provide, provideGlobal, reactive, readonly, ref, registerApp, registerComponent, registerPageLayoutBridge, registerRuntimeLayoutHosts, removeMutationRecorder, resetWevuDefaults, resolveLayoutBridge, resolveLayoutHost, resolveRuntimePageLayoutName, runSetupFunction, setCurrentInstance, setCurrentSetupContext, setDeepWatchStrategy, setGlobalProvidedValue, setPageLayout, setRuntimeSetDataVisibility, setWevuDefaults, shallowReactive, shallowReadonly, shallowRef, startBatch, stop, storeToRefs, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, teardownRuntimeInstance, toRaw, toRef, toRefs, toValue, touchReactive, traverse, triggerRef, unref, unregisterPageLayoutBridge, unregisterRuntimeLayoutHosts, use, useAttrs, useBindModel, useDisposables, useIntersectionObserver, useLayoutBridge, useLayoutHosts, useModel, useNativeInstance, useNativePageRouter, useNativeRouter, usePageLayout, usePageScrollThrottle, useSlots, useTemplateRef, useUpdatePerformanceListener, version, waitForLayoutHost, watch, watchEffect, watchPostEffect, watchSyncEffect, withDefaults };
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as startBatch, C as removeMutationRecorder, D as endBatch, E as effectScope, F as nextTick, O as getCurrentScope, S as addMutationRecorder, T as effect, a as toValue, c as isRaw, d as reactive, f as isShallowReactive, g as touchReactive, h as prelinkReactiveTree, i as ref, j as stop, k as onScopeDispose, l as isReactive, n as isRef, o as unref, p as shallowReactive, s as getReactiveVersion, t as customRef, u as markRaw, w as batch, x as toRaw } from "./ref-mshhFqmk.mjs";
|
|
2
2
|
import { i as computed, n as defineStore, r as createStore, t as storeToRefs } from "./store-fwgCLl_K.mjs";
|
|
3
|
-
import { A as onPageScroll, B as onTabItemTap, C as onError, D as onMemoryWarning, E as onLoad, F as onRouteDone, G as callHookList, H as onUnhandledRejection, I as onSaveExitState, J as getCurrentSetupContext, K as callHookReturn, L as onShareAppMessage, M as onReachBottom, N as onReady, O as onMoved, P as onResize, R as onShareTimeline, S as onDetached, T as onLaunch, U as onUnload, V as onThemeChange, X as setCurrentInstance, Z as setCurrentSetupContext, _ as provide,
|
|
4
|
-
import { $ as onBeforeMount, A as registerApp, B as resetWevuDefaults, C as resolveLayoutBridge, D as useLayoutBridge, E as unregisterRuntimeLayoutHosts, F as resolveRuntimePageLayoutName, G as watch, H as isNoSetData, I as setPageLayout, J as watchSyncEffect, K as watchEffect, L as syncRuntimePageLayoutState, M as setRuntimeSetDataVisibility, N as teardownRuntimeInstance, O as useLayoutHosts, P as runSetupFunction, Q as onActivated, R as syncRuntimePageLayoutStateFromRuntime, S as registerRuntimeLayoutHosts, T as unregisterPageLayoutBridge, U as markNoSetData, V as setWevuDefaults, W as version, X as setDeepWatchStrategy, Y as getDeepWatchStrategy, Z as callUpdateHooks, _ as createWevuScopedSlotComponent, a as useAttrs, at as onServerPrefetch, b as registerComponent, c as defineAppSetup, ct as traverse, d as normalizeClass, dt as isShallowRef, et as onBeforeUnmount, f as normalizeStyle, ft as shallowRef, g as createWevuComponent, h as useDisposables, i as useModel, it as onMounted, j as mountRuntimeInstance, k as waitForLayoutHost, l as use, lt as toRef, m as useIntersectionObserver, n as mergeModels, nt as onDeactivated, o as useNativeInstance, ot as onUnmounted, p as usePageScrollThrottle, pt as triggerRef, q as watchPostEffect, r as useBindModel, rt as onErrorCaptured, s as useSlots, st as onUpdated, t as useTemplateRef, tt as onBeforeUpdate, u as useUpdatePerformanceListener, ut as toRefs, v as defineComponent, w as resolveLayoutHost, x as registerPageLayoutBridge, y as createApp, z as usePageLayout } from "./src-
|
|
3
|
+
import { A as onPageScroll, B as onTabItemTap, C as onError, D as onMemoryWarning, E as onLoad, F as onRouteDone, G as callHookList, H as onUnhandledRejection, I as onSaveExitState, J as getCurrentSetupContext, K as callHookReturn, L as onShareAppMessage, M as onReachBottom, N as onReady, O as onMoved, P as onResize, R as onShareTimeline, S as onDetached, T as onLaunch, U as onUnload, V as onThemeChange, X as setCurrentInstance, Z as setCurrentSetupContext, _ as provide, at as isReadonly, b as onAddToFavorites, g as injectGlobal, h as inject, it as isProxy, j as onPullDownRefresh, k as onPageNotFound, m as hasInjectionContext, n as useNativeRouter, ot as readonly, q as getCurrentInstance, st as shallowReadonly, t as useNativePageRouter, v as provideGlobal, w as onHide, x as onAttached, y as setGlobalProvidedValue, z as onShow } from "./router-B43fz4cM.mjs";
|
|
4
|
+
import { $ as onBeforeMount, A as registerApp, B as resetWevuDefaults, C as resolveLayoutBridge, D as useLayoutBridge, E as unregisterRuntimeLayoutHosts, F as resolveRuntimePageLayoutName, G as watch, H as isNoSetData, I as setPageLayout, J as watchSyncEffect, K as watchEffect, L as syncRuntimePageLayoutState, M as setRuntimeSetDataVisibility, N as teardownRuntimeInstance, O as useLayoutHosts, P as runSetupFunction, Q as onActivated, R as syncRuntimePageLayoutStateFromRuntime, S as registerRuntimeLayoutHosts, T as unregisterPageLayoutBridge, U as markNoSetData, V as setWevuDefaults, W as version, X as setDeepWatchStrategy, Y as getDeepWatchStrategy, Z as callUpdateHooks, _ as createWevuScopedSlotComponent, a as useAttrs, at as onServerPrefetch, b as registerComponent, c as defineAppSetup, ct as traverse, d as normalizeClass, dt as isShallowRef, et as onBeforeUnmount, f as normalizeStyle, ft as shallowRef, g as createWevuComponent, h as useDisposables, i as useModel, it as onMounted, j as mountRuntimeInstance, k as waitForLayoutHost, l as use, lt as toRef, m as useIntersectionObserver, n as mergeModels, nt as onDeactivated, o as useNativeInstance, ot as onUnmounted, p as usePageScrollThrottle, pt as triggerRef, q as watchPostEffect, r as useBindModel, rt as onErrorCaptured, s as useSlots, st as onUpdated, t as useTemplateRef, tt as onBeforeUpdate, u as useUpdatePerformanceListener, ut as toRefs, v as defineComponent, w as resolveLayoutHost, x as registerPageLayoutBridge, y as createApp, z as usePageLayout } from "./src-CXeO96dW.mjs";
|
|
5
5
|
export { addMutationRecorder, batch, callHookList, callHookReturn, callUpdateHooks, computed, createApp, createStore, createWevuComponent, createWevuScopedSlotComponent, customRef, defineAppSetup, defineComponent, defineStore, effect, effectScope, endBatch, getCurrentInstance, getCurrentScope, getCurrentSetupContext, getDeepWatchStrategy, getReactiveVersion, hasInjectionContext, inject, injectGlobal, isNoSetData, isProxy, isRaw, isReactive, isReadonly, isRef, isShallowReactive, isShallowRef, markNoSetData, markRaw, mergeModels, mountRuntimeInstance, nextTick, normalizeClass, normalizeStyle, onActivated, onAddToFavorites, onAttached, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onDetached, onError, onErrorCaptured, onHide, onLaunch, onLoad, onMemoryWarning, onMounted, onMoved, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onScopeDispose, onServerPrefetch, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload, onUnmounted, onUpdated, prelinkReactiveTree, provide, provideGlobal, reactive, readonly, ref, registerApp, registerComponent, registerPageLayoutBridge, registerRuntimeLayoutHosts, removeMutationRecorder, resetWevuDefaults, resolveLayoutBridge, resolveLayoutHost, resolveRuntimePageLayoutName, runSetupFunction, setCurrentInstance, setCurrentSetupContext, setDeepWatchStrategy, setGlobalProvidedValue, setPageLayout, setRuntimeSetDataVisibility, setWevuDefaults, shallowReactive, shallowReadonly, shallowRef, startBatch, stop, storeToRefs, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, teardownRuntimeInstance, toRaw, toRef, toRefs, toValue, touchReactive, traverse, triggerRef, unref, unregisterPageLayoutBridge, unregisterRuntimeLayoutHosts, use, useAttrs, useBindModel, useDisposables, useIntersectionObserver, useLayoutBridge, useLayoutHosts, useModel, useNativeInstance, useNativePageRouter, useNativeRouter, usePageLayout, usePageScrollThrottle, useSlots, useTemplateRef, useUpdatePerformanceListener, version, waitForLayoutHost, watch, watchEffect, watchPostEffect, watchSyncEffect };
|
package/dist/jsx-runtime.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as MiniProgramIntrinsicElements } from "./weappIntrinsicElements-Cdfh6BlL.mjs";
|
|
2
2
|
import { GlobalComponents } from "wevu";
|
|
3
3
|
|
|
4
4
|
//#region src/jsx-runtime.d.ts
|
|
@@ -11,7 +11,7 @@ declare namespace JSX {
|
|
|
11
11
|
$props: Record<string, any>;
|
|
12
12
|
}
|
|
13
13
|
interface IntrinsicAttributes {}
|
|
14
|
-
interface IntrinsicElements extends GlobalComponents,
|
|
14
|
+
interface IntrinsicElements extends GlobalComponents, MiniProgramIntrinsicElements {}
|
|
15
15
|
}
|
|
16
16
|
//#endregion
|
|
17
17
|
export { JSX };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { _ as ReactiveFlags, b as isObject, l as isReactive, n as isRef, r as markAsRef, v as TargetType, y as getTargetType } from "./ref-mshhFqmk.mjs";
|
|
2
2
|
import { WEVU_HOOKS_KEY, WEVU_IS_APP_INSTANCE_KEY } from "@weapp-core/constants";
|
|
3
|
+
import { getMiniProgramPlatformByRuntimeGlobalKey, getMiniProgramRuntimeCapabilities, getMiniProgramRuntimeGlobalKey, getMiniProgramRuntimeGlobalKeys, getMiniProgramRuntimeHostConfigKey, resolveMiniProgramPlatform, supportsMiniProgramRuntimeCapability } from "@weapp-core/shared";
|
|
3
4
|
//#region src/reactivity/readonly.ts
|
|
4
5
|
function createReadonlyWrapper(target) {
|
|
5
6
|
if (isRef(target)) {
|
|
@@ -63,20 +64,71 @@ function isProxy(value) {
|
|
|
63
64
|
}
|
|
64
65
|
//#endregion
|
|
65
66
|
//#region src/runtime/platform.ts
|
|
67
|
+
const MINI_PROGRAM_GLOBAL_ROUTER_METHODS = [
|
|
68
|
+
"switchTab",
|
|
69
|
+
"reLaunch",
|
|
70
|
+
"redirectTo",
|
|
71
|
+
"navigateTo",
|
|
72
|
+
"navigateBack"
|
|
73
|
+
];
|
|
66
74
|
function getGlobalRuntime() {
|
|
67
75
|
if (typeof globalThis === "undefined") return;
|
|
68
76
|
return globalThis;
|
|
69
77
|
}
|
|
70
|
-
function
|
|
78
|
+
function resolveCurrentMiniProgramPlatform() {
|
|
71
79
|
var _env;
|
|
72
80
|
const globalRuntime = getGlobalRuntime();
|
|
73
|
-
const
|
|
74
|
-
if (
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
81
|
+
const resolvedCompiledPlatform = resolveMiniProgramPlatform((_env = import.meta.env) === null || _env === void 0 ? void 0 : _env.PLATFORM);
|
|
82
|
+
if (resolvedCompiledPlatform) return resolvedCompiledPlatform;
|
|
83
|
+
for (const globalKey of getMiniProgramRuntimeGlobalKeys()) if (globalRuntime === null || globalRuntime === void 0 ? void 0 : globalRuntime[globalKey]) return getMiniProgramPlatformByRuntimeGlobalKey(globalKey);
|
|
84
|
+
}
|
|
85
|
+
function getCurrentMiniProgramRuntimeCapabilities() {
|
|
86
|
+
return getMiniProgramRuntimeCapabilities(resolveCurrentMiniProgramPlatform());
|
|
87
|
+
}
|
|
88
|
+
function supportsCurrentMiniProgramRuntimeCapability(capabilityName) {
|
|
89
|
+
return supportsMiniProgramRuntimeCapability(resolveCurrentMiniProgramPlatform(), capabilityName);
|
|
90
|
+
}
|
|
91
|
+
function getCurrentMiniProgramPages() {
|
|
92
|
+
if (!supportsCurrentMiniProgramRuntimeCapability("globalPageStack")) return [];
|
|
93
|
+
const getCurrentPagesFn = globalThis.getCurrentPages;
|
|
94
|
+
if (typeof getCurrentPagesFn !== "function") return [];
|
|
95
|
+
try {
|
|
96
|
+
const pages = getCurrentPagesFn();
|
|
97
|
+
return Array.isArray(pages) ? pages : [];
|
|
98
|
+
} catch (_unused) {
|
|
99
|
+
return [];
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
function getCurrentMiniProgramHostConfig() {
|
|
103
|
+
const globalRuntime = getGlobalRuntime();
|
|
104
|
+
const hostConfigKey = getMiniProgramRuntimeHostConfigKey(resolveCurrentMiniProgramPlatform());
|
|
105
|
+
const hostConfig = globalRuntime === null || globalRuntime === void 0 ? void 0 : globalRuntime[hostConfigKey];
|
|
106
|
+
return hostConfig && typeof hostConfig === "object" ? hostConfig : void 0;
|
|
107
|
+
}
|
|
108
|
+
function getMiniProgramGlobalObject(platformInput) {
|
|
109
|
+
var _env2;
|
|
110
|
+
const globalRuntime = getGlobalRuntime();
|
|
111
|
+
const resolvedCompiledPlatform = resolveMiniProgramPlatform(platformInput !== null && platformInput !== void 0 ? platformInput : (_env2 = import.meta.env) === null || _env2 === void 0 ? void 0 : _env2.PLATFORM);
|
|
112
|
+
if (resolvedCompiledPlatform) {
|
|
113
|
+
const globalKey = getMiniProgramRuntimeGlobalKey(resolvedCompiledPlatform);
|
|
114
|
+
return globalRuntime === null || globalRuntime === void 0 ? void 0 : globalRuntime[globalKey];
|
|
115
|
+
}
|
|
116
|
+
for (const globalKey of getMiniProgramRuntimeGlobalKeys()) {
|
|
117
|
+
const candidate = globalRuntime === null || globalRuntime === void 0 ? void 0 : globalRuntime[globalKey];
|
|
118
|
+
if (candidate) return candidate;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
function getCurrentMiniProgramGlobalRouter() {
|
|
122
|
+
if (!supportsCurrentMiniProgramRuntimeCapability("globalRouterApi")) return;
|
|
123
|
+
const miniProgramGlobal = getMiniProgramGlobalObject();
|
|
124
|
+
if (!miniProgramGlobal) return;
|
|
125
|
+
const routerMethods = Object.create(null);
|
|
126
|
+
for (const methodName of MINI_PROGRAM_GLOBAL_ROUTER_METHODS) {
|
|
127
|
+
const handler = miniProgramGlobal[methodName];
|
|
128
|
+
if (typeof handler !== "function") return;
|
|
129
|
+
routerMethods[methodName] = (...args) => handler.apply(miniProgramGlobal, args);
|
|
130
|
+
}
|
|
131
|
+
return routerMethods;
|
|
80
132
|
}
|
|
81
133
|
function getScopedSlotHostGlobalObject() {
|
|
82
134
|
var _getMiniProgramGlobal;
|
|
@@ -114,6 +166,30 @@ function ensureHookBucket(target) {
|
|
|
114
166
|
if (!target[WEVU_HOOKS_KEY]) target[WEVU_HOOKS_KEY] = Object.create(null);
|
|
115
167
|
return target[WEVU_HOOKS_KEY];
|
|
116
168
|
}
|
|
169
|
+
function buildShareMenus(enableOnShareAppMessage, enableOnShareTimeline) {
|
|
170
|
+
const shouldShowShareAppMessage = getCurrentMiniProgramRuntimeCapabilities().shareTimelineRequiresShareAppMessage ? enableOnShareAppMessage || enableOnShareTimeline : enableOnShareAppMessage;
|
|
171
|
+
const menus = [];
|
|
172
|
+
if (shouldShowShareAppMessage) menus.push("shareAppMessage");
|
|
173
|
+
if (enableOnShareTimeline) menus.push("shareTimeline");
|
|
174
|
+
return menus;
|
|
175
|
+
}
|
|
176
|
+
function tryShowShareMenu(showShareMenu, menus) {
|
|
177
|
+
const payloads = [
|
|
178
|
+
{
|
|
179
|
+
withShareTicket: true,
|
|
180
|
+
menus
|
|
181
|
+
},
|
|
182
|
+
{ menus },
|
|
183
|
+
menus.includes("shareTimeline") ? { withShareTicket: true } : void 0,
|
|
184
|
+
menus.includes("shareTimeline") ? {} : void 0,
|
|
185
|
+
void 0
|
|
186
|
+
];
|
|
187
|
+
for (const payload of payloads) try {
|
|
188
|
+
if (payload === void 0) showShareMenu();
|
|
189
|
+
else showShareMenu(payload);
|
|
190
|
+
return;
|
|
191
|
+
} catch (_unused) {}
|
|
192
|
+
}
|
|
117
193
|
function pushHook(target, name, handler, { single = false } = {}) {
|
|
118
194
|
const bucket = ensureHookBucket(target);
|
|
119
195
|
if (single) bucket[name] = handler;
|
|
@@ -136,12 +212,12 @@ function ensureSinglePageHookOnInstance(target, name) {
|
|
|
136
212
|
let ret;
|
|
137
213
|
if (typeof entry === "function") try {
|
|
138
214
|
ret = entry.apply(ctx, args);
|
|
139
|
-
} catch (
|
|
215
|
+
} catch (_unused2) {
|
|
140
216
|
ret = void 0;
|
|
141
217
|
}
|
|
142
218
|
else if (Array.isArray(entry)) for (const fn of entry) try {
|
|
143
219
|
ret = fn.apply(ctx, args);
|
|
144
|
-
} catch (
|
|
220
|
+
} catch (_unused3) {}
|
|
145
221
|
if (ret !== void 0) return ret;
|
|
146
222
|
if (typeof original === "function") return original.apply(this, args);
|
|
147
223
|
};
|
|
@@ -150,20 +226,16 @@ function ensureSinglePageHookOnInstance(target, name) {
|
|
|
150
226
|
}
|
|
151
227
|
function ensurePageShareMenusOnSetup(target) {
|
|
152
228
|
var _target$WEVU_HOOKS_KE;
|
|
153
|
-
|
|
154
|
-
|
|
229
|
+
if (!supportsCurrentMiniProgramRuntimeCapability("pageShareMenu")) return;
|
|
230
|
+
const miniProgramGlobal = getMiniProgramGlobalObject();
|
|
231
|
+
if (!miniProgramGlobal || typeof miniProgramGlobal.showShareMenu !== "function") return;
|
|
155
232
|
const hooks = (_target$WEVU_HOOKS_KE = target[WEVU_HOOKS_KEY]) !== null && _target$WEVU_HOOKS_KE !== void 0 ? _target$WEVU_HOOKS_KE : {};
|
|
156
233
|
const hasShareAppMessage = typeof hooks.onShareAppMessage === "function";
|
|
157
234
|
const hasShareTimeline = typeof hooks.onShareTimeline === "function";
|
|
158
235
|
if (!hasShareAppMessage && !hasShareTimeline) return;
|
|
159
|
-
const menus =
|
|
160
|
-
if (
|
|
161
|
-
|
|
162
|
-
wxGlobal.showShareMenu({
|
|
163
|
-
withShareTicket: true,
|
|
164
|
-
menus
|
|
165
|
-
});
|
|
166
|
-
} catch (_unused3) {}
|
|
236
|
+
const menus = buildShareMenus(hasShareAppMessage, hasShareTimeline);
|
|
237
|
+
if (!menus.length) return;
|
|
238
|
+
tryShowShareMenu(miniProgramGlobal.showShareMenu.bind(miniProgramGlobal), menus);
|
|
167
239
|
}
|
|
168
240
|
/**
|
|
169
241
|
* 调用批量 hook(框架内部调度入口)。
|
|
@@ -596,15 +668,9 @@ function createRouteLocation(path, query, hash = "", name, params = {}, queryStr
|
|
|
596
668
|
return location;
|
|
597
669
|
}
|
|
598
670
|
function getCurrentMiniProgramPage() {
|
|
599
|
-
const
|
|
600
|
-
if (
|
|
601
|
-
|
|
602
|
-
const pages = getCurrentPagesFn();
|
|
603
|
-
if (!Array.isArray(pages) || pages.length === 0) return;
|
|
604
|
-
return pages.at(-1);
|
|
605
|
-
} catch (_unused) {
|
|
606
|
-
return;
|
|
607
|
-
}
|
|
671
|
+
const pages = getCurrentMiniProgramPages();
|
|
672
|
+
if (!Array.isArray(pages) || pages.length === 0) return;
|
|
673
|
+
return pages.at(-1);
|
|
608
674
|
}
|
|
609
675
|
function resolveCurrentRoute(queryOverride) {
|
|
610
676
|
var _currentPage$options;
|
|
@@ -629,15 +695,7 @@ function isRuntimeRouter(candidate) {
|
|
|
629
695
|
});
|
|
630
696
|
}
|
|
631
697
|
function createGlobalRouterFallback() {
|
|
632
|
-
|
|
633
|
-
if (!miniProgramGlobal) return;
|
|
634
|
-
const fallbackRouter = Object.create(null);
|
|
635
|
-
for (const methodName of RUNTIME_ROUTER_METHODS) {
|
|
636
|
-
const handler = miniProgramGlobal[methodName];
|
|
637
|
-
if (typeof handler !== "function") return;
|
|
638
|
-
fallbackRouter[methodName] = (...args) => handler.apply(miniProgramGlobal, args);
|
|
639
|
-
}
|
|
640
|
-
return fallbackRouter;
|
|
698
|
+
return getCurrentMiniProgramGlobalRouter();
|
|
641
699
|
}
|
|
642
700
|
function resolveBasePathCandidate(candidate) {
|
|
643
701
|
if (typeof candidate !== "string" || !candidate) return;
|
|
@@ -697,14 +755,14 @@ function useRuntimeRouterByAccessor(primaryAccessor, fallbackAccessor, helperNam
|
|
|
697
755
|
if (isRuntimeRouter(fallbackRouter)) return createScopedRuntimeRouter(fallbackRouter, basePath);
|
|
698
756
|
const globalFallbackRouter = createGlobalRouterFallback();
|
|
699
757
|
if (globalFallbackRouter) return createScopedRuntimeRouter(globalFallbackRouter, basePath);
|
|
700
|
-
throw new Error("当前运行环境不支持 Router
|
|
758
|
+
throw new Error("当前运行环境不支持 Router,请升级宿主基础库或检查平台路由能力");
|
|
701
759
|
}
|
|
702
760
|
/**
|
|
703
761
|
* 在 setup 中获取与当前组件路径语义一致的原生 Router 对象。
|
|
704
762
|
*
|
|
705
763
|
* - 优先使用实例上的 `this.router`(组件路径语义)。
|
|
706
764
|
* - 不可用时回退到 `this.pageRouter`。
|
|
707
|
-
* -
|
|
765
|
+
* - 低版本基础库再回退到宿主全局路由方法。
|
|
708
766
|
*
|
|
709
767
|
* 如需更贴近 Vue Router 的高阶能力(导航守卫、失败类型、统一解析),
|
|
710
768
|
* 推荐改用 `wevu/router` 子入口的 `useRouter()`。
|
|
@@ -717,7 +775,7 @@ function useNativeRouter() {
|
|
|
717
775
|
*
|
|
718
776
|
* - 优先使用实例上的 `this.pageRouter`(页面路径语义)。
|
|
719
777
|
* - 不可用时回退到 `this.router`。
|
|
720
|
-
* -
|
|
778
|
+
* - 低版本基础库再回退到宿主全局路由方法。
|
|
721
779
|
*
|
|
722
780
|
* 如需更贴近 Vue Router 的高阶能力(导航守卫、失败类型、统一解析),
|
|
723
781
|
* 推荐改用 `wevu/router` 子入口的 `useRouter()`。
|
|
@@ -726,4 +784,4 @@ function useNativePageRouter() {
|
|
|
726
784
|
return useRuntimeRouterByAccessor("pageRouter", "router", "useNativePageRouter");
|
|
727
785
|
}
|
|
728
786
|
//#endregion
|
|
729
|
-
export {
|
|
787
|
+
export { getCurrentMiniProgramPages as $, onPageScroll as A, onTabItemTap as B, onError as C, onMemoryWarning as D, onLoad as E, onRouteDone as F, callHookList as G, onUnhandledRejection as H, onSaveExitState as I, getCurrentSetupContext as J, callHookReturn as K, onShareAppMessage as L, onReachBottom as M, onReady as N, onMoved as O, onResize as P, getCurrentMiniProgramHostConfig as Q, onShareTimeline as R, onDetached as S, onLaunch as T, onUnload as U, onThemeChange as V, assertInSetup as W, setCurrentInstance as X, pushHook as Y, setCurrentSetupContext as Z, provide as _, resolveCurrentRoute as a, isReadonly as at, onAddToFavorites as b, normalizeRouteParams as c, createAbsoluteRoutePath as d, getCurrentMiniProgramRuntimeCapabilities as et, isDynamicRoutePath as f, injectGlobal as g, inject as h, parsePathInput as i, isProxy as it, onPullDownRefresh as j, onPageNotFound as k, parseQuery as l, hasInjectionContext as m, useNativeRouter as n, getScopedSlotHostGlobalObject as nt, normalizeHash as o, readonly as ot, resolvePath as p, getCurrentInstance as q, createRouteLocation as r, supportsCurrentMiniProgramRuntimeCapability as rt, normalizeQuery as s, shallowReadonly as st, useNativePageRouter as t, getMiniProgramGlobalObject as tt, stringifyQuery as u, provideGlobal as v, onHide as w, onAttached as x, setGlobalProvidedValue as y, onShow as z };
|
package/dist/router.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $t as RouterNavigateToOption, an as TypedRouterUrl, en as RouterReLaunchOption, in as TypedRouterTabBarUrl, nn as RouterSwitchTabOption, on as WevuTypedRouterRouteMap, rn as SetupContextRouter, tn as RouterRedirectToOption } from "./vue-types-Ir1bT6Gp.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/routerInternal/types.d.ts
|
|
4
4
|
interface RouteResolveCodec {
|
package/dist/router.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { d as reactive } from "./ref-mshhFqmk.mjs";
|
|
2
|
-
import { E as onLoad, F as onRouteDone, J as getCurrentSetupContext, a as resolveCurrentRoute, c as normalizeRouteParams, d as createAbsoluteRoutePath, f as isDynamicRoutePath, g as injectGlobal, i as parsePathInput, l as parseQuery, n as useNativeRouter$1,
|
|
2
|
+
import { E as onLoad, F as onRouteDone, J as getCurrentSetupContext, a as resolveCurrentRoute, c as normalizeRouteParams, d as createAbsoluteRoutePath, f as isDynamicRoutePath, g as injectGlobal, i as parsePathInput, l as parseQuery, n as useNativeRouter$1, o as normalizeHash, ot as readonly, p as resolvePath, r as createRouteLocation, s as normalizeQuery, t as useNativePageRouter$1, u as stringifyQuery, v as provideGlobal, z as onShow } from "./router-B43fz4cM.mjs";
|
|
3
3
|
//#region src/routerInternal/params.ts
|
|
4
4
|
const PATH_PARAM_TOKEN_RE = /^:(\w+)(?:\([^)]*\))?([+*?])?$/;
|
|
5
5
|
function parsePathParamToken(segment) {
|