wevu 6.15.4 → 6.15.5
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-CLkMXvCU.d.mts → index-DWouSxpz.d.mts} +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +2 -2
- package/dist/{router-Ci6Zqi7I.mjs → router-BR3hx21a.mjs} +257 -4
- package/dist/router.mjs +1 -205
- package/dist/{src-BD3I133J.mjs → src-_P44BAOw.mjs} +3 -3
- package/dist/vue-demi.d.mts +1 -1
- package/dist/vue-demi.mjs +2 -2
- package/package.json +2 -2
|
@@ -667,7 +667,7 @@ declare function syncRuntimePageLayoutState(target: Record<string, any>, layout:
|
|
|
667
667
|
declare function syncRuntimePageLayoutStateFromRuntime(target: Record<string, any>): void;
|
|
668
668
|
declare function setPageLayout(layout: false): void;
|
|
669
669
|
declare function setPageLayout<Name extends ResolveTypedPageLayoutName>(layout: Name, props?: ResolveTypedPageLayoutProps<Name>): void;
|
|
670
|
-
declare function resolveRuntimePageLayoutName(layout: string | false):
|
|
670
|
+
declare function resolveRuntimePageLayoutName(layout: string | false): string;
|
|
671
671
|
//#endregion
|
|
672
672
|
//#region src/runtime/pageScroll.d.ts
|
|
673
673
|
interface UsePageScrollThrottleOptions {
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as WeappIntrinsicElementBaseAttributes, r as WeappIntrinsicEventHandler } from "./weappIntrinsicElements-CwA7kB31.mjs";
|
|
2
2
|
import { $ as WatchSources, $t as customRef, A as ComputedDefinitions, At as EffectScope, B as watchSyncEffect, Bt as ComputedGetter, C as MiniProgramComponentBehaviorOptions, Cn as NativeTypedProperty, Ct as prelinkReactiveTree, D as MiniProgramPageLifetimes, Dt as MutationRecord, E as MiniProgramInstance, En as PropType, Et as MutationOp, F as ModelBindingOptions, Ft as getCurrentScope, G as WatchCallback, Gt as computed, H as MaybeUndefined, Ht as ComputedSetter, I as ModelBindingPayload, It as onScopeDispose, J as WatchMultiSources, Jt as CustomRefSource, K as WatchEffect, Kt as CustomRefFactory, L as watch, Lt as startBatch, M as ExtractMethods, Mt as effect, N as MethodDefinitions, Nt as effectScope, O as TriggerEventOptions, Ot as addMutationRecorder, P as ModelBinding, Pt as endBatch, Q as WatchSourceValue, Qt as ShallowRef, R as watchEffect, Rt as stop, S as MiniProgramBehaviorIdentifier, Sn as NativeTypeHint, St as PrelinkReactiveTreeOptions, T as MiniProgramComponentRawOptions, Tn as PropOptions, Tt as MutationKind, U as MultiWatchSources, Ut as WritableComputedOptions, V as MapSources, Vt as ComputedRef, W as OnCleanup, Wt as WritableComputedRef, X as WatchScheduler, Xt as MaybeRefOrGetter, Y as WatchOptions, Yt as MaybeRef, Z as WatchSource, Zt as Ref, _ as RuntimeApp, _n as InferNativeProps, _t as markRaw, a as NativeComponent, at as toRef, b as MiniProgramAdapter, bn as NativePropType, bt as isShallowReactive, c as ShallowUnwrapRef, cn as SetupContextRouter, ct as shallowRef, d as SetupContext, dn as WevuTypedRouterRouteMap, dt as isReadonly, en as isRef, et as WatchStopHandle, f as SetupContextNativeInstance, fn as ComponentPropsOptions, ft as readonly, g as InternalRuntimeStateFields, gn as InferNativePropType, gt as isReactive, h as InternalRuntimeState, hn as ExtractPublicPropTypes, ht as isRaw, i as DefineComponent, it as ToRefs, j as ExtractComputed, jt as batch, k as ComponentPublicInstance, kt as removeMutationRecorder, l as VNode, lt as triggerRef, m as AppConfig, mn as ExtractPropTypes, mt as getReactiveVersion, n as ComponentCustomProps, nn as toValue, nt as setDeepWatchStrategy, o as ObjectDirective, ot as toRefs, p as SetupFunction, pn as ExtractDefaultPropTypes, pt as shallowReadonly, q as WatchEffectOptions, qt as CustomRefOptions, r as ComponentOptionsMixin, rn as unref, rt as traverse, s as PublicProps, st as isShallowRef, t as AllowedComponentProps, tn as ref, tt as getDeepWatchStrategy, u as VNodeProps, ut as isProxy, v as RuntimeInstance, vn as InferPropType, vt as reactive, w as MiniProgramComponentOptions, wn as PropConstructor, wt as touchReactive, x as MiniProgramAppOptions, xn as NativePropsOptions, xt as shallowReactive, y as WevuPlugin, yn as InferProps, yt as toRaw, z as watchPostEffect, zt as nextTick } from "./vue-types-BUOuHH4O.mjs";
|
|
3
|
-
import { $ as PageLayoutState, $t as onTabItemTap, A as defineAppSetup, An as TemplateRefValue, At as onServerPrefetch, B as setRuntimeSetDataVisibility, Bn as SetDataSnapshotOptions, 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 DataOption, Ft as onDetached, G as inject, Gt as onReachBottom, H as registerComponent, Ht as onPageNotFound, I as normalizeClass, In as DefineAppOptions, It as onError, J as provideGlobal, Jt as onRouteDone, K as injectGlobal, Kt as onReady, L as normalizeStyle, Ln as DefineComponentOptions, Lt as onHide, M as UpdatePerformanceListener, Mn as WevuGlobalComponents, Mt as onUpdated, N as UpdatePerformanceListenerResult, Nn as WevuGlobalDirectives, Nt as onAddToFavorites, O as useNativeInstance, On as GlobalComponents, Ot as onErrorCaptured, P as UseUpdatePerformanceListenerStopHandle, Pn as CreateAppOptions, Pt as onAttached, Q as usePageScrollThrottle, Qt as onShow, R as runSetupFunction, Rn as PageFeatures, 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, 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 TemplateRefs, 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 SetDataDebugInfo, zt as onLoad } from "./index-
|
|
3
|
+
import { $ as PageLayoutState, $t as onTabItemTap, A as defineAppSetup, An as TemplateRefValue, At as onServerPrefetch, B as setRuntimeSetDataVisibility, Bn as SetDataSnapshotOptions, 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 DataOption, Ft as onDetached, G as inject, Gt as onReachBottom, H as registerComponent, Ht as onPageNotFound, I as normalizeClass, In as DefineAppOptions, It as onError, J as provideGlobal, Jt as onRouteDone, K as injectGlobal, Kt as onReady, L as normalizeStyle, Ln as DefineComponentOptions, Lt as onHide, M as UpdatePerformanceListener, Mn as WevuGlobalComponents, Mt as onUpdated, N as UpdatePerformanceListenerResult, Nn as WevuGlobalDirectives, Nt as onAddToFavorites, O as useNativeInstance, On as GlobalComponents, Ot as onErrorCaptured, P as UseUpdatePerformanceListenerStopHandle, Pn as CreateAppOptions, Pt as onAttached, Q as usePageScrollThrottle, Qt as onShow, R as runSetupFunction, Rn as PageFeatures, 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, 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 TemplateRefs, 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 SetDataDebugInfo, zt as onLoad } from "./index-DWouSxpz.mjs";
|
|
4
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-SDxsBVMY.mjs";
|
|
5
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, MiniProgramComponentBehaviorOptions, MiniProgramComponentOptions, MiniProgramComponentRawOptions, MiniProgramInstance, MiniProgramPageLifetimes, 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, TriggerEventOptions, UpdatePerformanceListener, UpdatePerformanceListenerResult, UseIntersectionObserverOptions, UseIntersectionObserverResult, UseModelOptions, UsePageScrollThrottleOptions, UsePageScrollThrottleStopHandle, UseUpdatePerformanceListenerStopHandle, VNode, VNodeProps, WatchCallback, WatchEffect, WatchEffectOptions, WatchMultiSources, WatchOptions, WatchScheduler, WatchSource, WatchSourceValue, WatchSources, WatchStopHandle, WeappIntrinsicElementBaseAttributes, WeappIntrinsicEventHandler, 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
|
|
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, b as onAddToFavorites, et as isProxy, g as injectGlobal, h as inject, j as onPullDownRefresh, k as onPageNotFound, m as hasInjectionContext, n as useNativeRouter, nt as readonly, q as getCurrentInstance, rt as shallowReadonly, t as useNativePageRouter, tt as isReadonly, v as provideGlobal, w as onHide, x as onAttached, y as setGlobalProvidedValue, z as onShow } from "./router-BR3hx21a.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-_P44BAOw.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 };
|
|
@@ -409,6 +409,210 @@ function injectGlobal(key, defaultValue) {
|
|
|
409
409
|
throw new Error(`injectGlobal():未找到对应 key 的 provider:${String(key)}`);
|
|
410
410
|
}
|
|
411
411
|
//#endregion
|
|
412
|
+
//#region src/routerInternal/path.ts
|
|
413
|
+
function normalizePathSegments(path) {
|
|
414
|
+
const segments = [];
|
|
415
|
+
for (const segment of path.split("/")) {
|
|
416
|
+
if (!segment || segment === ".") continue;
|
|
417
|
+
if (segment === "..") {
|
|
418
|
+
if (segments.length > 0) segments.pop();
|
|
419
|
+
continue;
|
|
420
|
+
}
|
|
421
|
+
segments.push(segment);
|
|
422
|
+
}
|
|
423
|
+
return segments;
|
|
424
|
+
}
|
|
425
|
+
function resolvePath(path, currentPath) {
|
|
426
|
+
if (!path) return normalizePathSegments(currentPath).join("/");
|
|
427
|
+
if (path.startsWith("/")) return normalizePathSegments(path).join("/");
|
|
428
|
+
if (path.startsWith("./") || path.startsWith("../")) {
|
|
429
|
+
const baseSegments = normalizePathSegments(currentPath);
|
|
430
|
+
if (baseSegments.length > 0) baseSegments.pop();
|
|
431
|
+
for (const segment of path.split("/")) {
|
|
432
|
+
if (!segment || segment === ".") continue;
|
|
433
|
+
if (segment === "..") {
|
|
434
|
+
if (baseSegments.length > 0) baseSegments.pop();
|
|
435
|
+
continue;
|
|
436
|
+
}
|
|
437
|
+
baseSegments.push(segment);
|
|
438
|
+
}
|
|
439
|
+
return baseSegments.join("/");
|
|
440
|
+
}
|
|
441
|
+
return normalizePathSegments(path).join("/");
|
|
442
|
+
}
|
|
443
|
+
function createAbsoluteRoutePath(path) {
|
|
444
|
+
return path ? `/${path}` : "/";
|
|
445
|
+
}
|
|
446
|
+
const DYNAMIC_ROUTE_RE = /(?:^|\/):/;
|
|
447
|
+
function isDynamicRoutePath(path) {
|
|
448
|
+
return DYNAMIC_ROUTE_RE.test(path);
|
|
449
|
+
}
|
|
450
|
+
//#endregion
|
|
451
|
+
//#region src/routerInternal/query.ts
|
|
452
|
+
const PLUS_RE = /\+/g;
|
|
453
|
+
function decodeQuerySegment(value) {
|
|
454
|
+
return decodeURIComponent(value.replace(PLUS_RE, " "));
|
|
455
|
+
}
|
|
456
|
+
function encodeQuerySegment(value) {
|
|
457
|
+
return encodeURIComponent(value);
|
|
458
|
+
}
|
|
459
|
+
function pushQueryValue(target, key, value) {
|
|
460
|
+
const previous = target[key];
|
|
461
|
+
if (previous === void 0) {
|
|
462
|
+
target[key] = value;
|
|
463
|
+
return;
|
|
464
|
+
}
|
|
465
|
+
if (Array.isArray(previous)) {
|
|
466
|
+
previous.push(value);
|
|
467
|
+
return;
|
|
468
|
+
}
|
|
469
|
+
target[key] = [previous, value];
|
|
470
|
+
}
|
|
471
|
+
function pushRouteParamValue(target, key, value) {
|
|
472
|
+
const previous = target[key];
|
|
473
|
+
if (previous === void 0) {
|
|
474
|
+
target[key] = value;
|
|
475
|
+
return;
|
|
476
|
+
}
|
|
477
|
+
if (Array.isArray(previous)) {
|
|
478
|
+
previous.push(value);
|
|
479
|
+
return;
|
|
480
|
+
}
|
|
481
|
+
target[key] = [previous, value];
|
|
482
|
+
}
|
|
483
|
+
function normalizeQueryValue(value) {
|
|
484
|
+
if (value === void 0) return;
|
|
485
|
+
if (value === null) return null;
|
|
486
|
+
return String(value);
|
|
487
|
+
}
|
|
488
|
+
function normalizeQuery(query) {
|
|
489
|
+
const normalized = {};
|
|
490
|
+
for (const key of Object.keys(query)) {
|
|
491
|
+
const rawValue = query[key];
|
|
492
|
+
if (Array.isArray(rawValue)) {
|
|
493
|
+
for (const item of rawValue) {
|
|
494
|
+
const next = normalizeQueryValue(item);
|
|
495
|
+
if (next !== void 0) pushQueryValue(normalized, key, next);
|
|
496
|
+
}
|
|
497
|
+
continue;
|
|
498
|
+
}
|
|
499
|
+
const next = normalizeQueryValue(rawValue);
|
|
500
|
+
if (next !== void 0) pushQueryValue(normalized, key, next);
|
|
501
|
+
}
|
|
502
|
+
return normalized;
|
|
503
|
+
}
|
|
504
|
+
function normalizeRouteParamValue(value) {
|
|
505
|
+
if (value === void 0 || value === null) return;
|
|
506
|
+
return String(value);
|
|
507
|
+
}
|
|
508
|
+
function normalizeRouteParams(params) {
|
|
509
|
+
const normalized = {};
|
|
510
|
+
for (const key of Object.keys(params)) {
|
|
511
|
+
const rawValue = params[key];
|
|
512
|
+
if (Array.isArray(rawValue)) {
|
|
513
|
+
for (const item of rawValue) {
|
|
514
|
+
const next = normalizeRouteParamValue(item);
|
|
515
|
+
if (next !== void 0) pushRouteParamValue(normalized, key, next);
|
|
516
|
+
}
|
|
517
|
+
continue;
|
|
518
|
+
}
|
|
519
|
+
const next = normalizeRouteParamValue(rawValue);
|
|
520
|
+
if (next !== void 0) pushRouteParamValue(normalized, key, next);
|
|
521
|
+
}
|
|
522
|
+
return normalized;
|
|
523
|
+
}
|
|
524
|
+
function normalizeHash(rawHash) {
|
|
525
|
+
if (!rawHash) return "";
|
|
526
|
+
return rawHash.startsWith("#") ? rawHash : `#${rawHash}`;
|
|
527
|
+
}
|
|
528
|
+
function parseQuery(search) {
|
|
529
|
+
const normalizedSearch = search.startsWith("?") ? search.slice(1) : search;
|
|
530
|
+
const query = {};
|
|
531
|
+
if (!normalizedSearch) return query;
|
|
532
|
+
for (const segment of normalizedSearch.split("&")) {
|
|
533
|
+
if (!segment) continue;
|
|
534
|
+
const equalIndex = segment.indexOf("=");
|
|
535
|
+
const rawKey = equalIndex >= 0 ? segment.slice(0, equalIndex) : segment;
|
|
536
|
+
if (!rawKey) continue;
|
|
537
|
+
pushQueryValue(query, decodeQuerySegment(rawKey), equalIndex >= 0 ? decodeQuerySegment(segment.slice(equalIndex + 1)) : null);
|
|
538
|
+
}
|
|
539
|
+
return query;
|
|
540
|
+
}
|
|
541
|
+
function stringifyQuery(query = {}) {
|
|
542
|
+
const normalizedQuery = normalizeQuery(query);
|
|
543
|
+
const segments = [];
|
|
544
|
+
for (const key of Object.keys(normalizedQuery)) {
|
|
545
|
+
const encodedKey = encodeQuerySegment(key);
|
|
546
|
+
const rawValue = normalizedQuery[key];
|
|
547
|
+
if (Array.isArray(rawValue)) {
|
|
548
|
+
for (const item of rawValue) if (item === null) segments.push(encodedKey);
|
|
549
|
+
else segments.push(`${encodedKey}=${encodeQuerySegment(item)}`);
|
|
550
|
+
continue;
|
|
551
|
+
}
|
|
552
|
+
if (rawValue === null) {
|
|
553
|
+
segments.push(encodedKey);
|
|
554
|
+
continue;
|
|
555
|
+
}
|
|
556
|
+
segments.push(`${encodedKey}=${encodeQuerySegment(rawValue)}`);
|
|
557
|
+
}
|
|
558
|
+
return segments.join("&");
|
|
559
|
+
}
|
|
560
|
+
//#endregion
|
|
561
|
+
//#region src/routerInternal/location.ts
|
|
562
|
+
const DEFAULT_ROUTE_RESOLVE_CODEC = {
|
|
563
|
+
parseQuery,
|
|
564
|
+
stringifyQuery
|
|
565
|
+
};
|
|
566
|
+
function parsePathInput(input, codec = DEFAULT_ROUTE_RESOLVE_CODEC) {
|
|
567
|
+
const hashIndex = input.indexOf("#");
|
|
568
|
+
const withoutHash = hashIndex >= 0 ? input.slice(0, hashIndex) : input;
|
|
569
|
+
const hash = hashIndex >= 0 ? normalizeHash(input.slice(hashIndex + 1)) : "";
|
|
570
|
+
const queryIndex = withoutHash.indexOf("?");
|
|
571
|
+
if (queryIndex < 0) return {
|
|
572
|
+
path: withoutHash,
|
|
573
|
+
query: {},
|
|
574
|
+
hash
|
|
575
|
+
};
|
|
576
|
+
return {
|
|
577
|
+
path: withoutHash.slice(0, queryIndex),
|
|
578
|
+
query: normalizeQuery(codec.parseQuery(withoutHash.slice(queryIndex + 1))),
|
|
579
|
+
hash
|
|
580
|
+
};
|
|
581
|
+
}
|
|
582
|
+
function createRouteLocation(path, query, hash = "", name, params = {}, queryStringifier = stringifyQuery) {
|
|
583
|
+
const normalizedPath = resolvePath(path, "");
|
|
584
|
+
const queryString = queryStringifier(query);
|
|
585
|
+
const fullPathBase = createAbsoluteRoutePath(normalizedPath);
|
|
586
|
+
const normalizedHash = normalizeHash(hash);
|
|
587
|
+
const fullPath = queryString ? `${fullPathBase}?${queryString}` : fullPathBase;
|
|
588
|
+
const location = {
|
|
589
|
+
path: normalizedPath,
|
|
590
|
+
fullPath: normalizedHash ? `${fullPath}${normalizedHash}` : fullPath,
|
|
591
|
+
query,
|
|
592
|
+
hash: normalizedHash,
|
|
593
|
+
params
|
|
594
|
+
};
|
|
595
|
+
if (name !== void 0) location.name = name;
|
|
596
|
+
return location;
|
|
597
|
+
}
|
|
598
|
+
function getCurrentMiniProgramPage() {
|
|
599
|
+
const getCurrentPagesFn = globalThis.getCurrentPages;
|
|
600
|
+
if (typeof getCurrentPagesFn !== "function") return;
|
|
601
|
+
try {
|
|
602
|
+
const pages = getCurrentPagesFn();
|
|
603
|
+
if (!Array.isArray(pages) || pages.length === 0) return;
|
|
604
|
+
return pages.at(-1);
|
|
605
|
+
} catch (_unused) {
|
|
606
|
+
return;
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
function resolveCurrentRoute(queryOverride) {
|
|
610
|
+
var _currentPage$options;
|
|
611
|
+
const currentPage = getCurrentMiniProgramPage();
|
|
612
|
+
if (!currentPage) return createRouteLocation("", {});
|
|
613
|
+
return createRouteLocation(typeof currentPage.route === "string" ? currentPage.route : typeof currentPage.__route__ === "string" ? currentPage.__route__ : "", normalizeQuery(queryOverride !== null && queryOverride !== void 0 ? queryOverride : (_currentPage$options = currentPage.options) !== null && _currentPage$options !== void 0 ? _currentPage$options : {}), "", void 0, {});
|
|
614
|
+
}
|
|
615
|
+
//#endregion
|
|
412
616
|
//#region src/runtime/vueCompat/router.ts
|
|
413
617
|
const RUNTIME_ROUTER_METHODS = [
|
|
414
618
|
"switchTab",
|
|
@@ -417,6 +621,7 @@ const RUNTIME_ROUTER_METHODS = [
|
|
|
417
621
|
"navigateTo",
|
|
418
622
|
"navigateBack"
|
|
419
623
|
];
|
|
624
|
+
const runtimeRouterWrapperCache = /* @__PURE__ */ new WeakMap();
|
|
420
625
|
function isRuntimeRouter(candidate) {
|
|
421
626
|
if (!candidate || typeof candidate !== "object") return false;
|
|
422
627
|
return RUNTIME_ROUTER_METHODS.every((methodName) => {
|
|
@@ -434,16 +639,64 @@ function createGlobalRouterFallback() {
|
|
|
434
639
|
}
|
|
435
640
|
return fallbackRouter;
|
|
436
641
|
}
|
|
642
|
+
function resolveBasePathCandidate(candidate) {
|
|
643
|
+
if (typeof candidate !== "string" || !candidate) return;
|
|
644
|
+
return resolvePath(candidate, "") || void 0;
|
|
645
|
+
}
|
|
646
|
+
function resolveRouterBasePath(nativeInstance, accessor) {
|
|
647
|
+
const candidates = accessor === "pageRouter" ? [
|
|
648
|
+
nativeInstance.route,
|
|
649
|
+
nativeInstance.__route__,
|
|
650
|
+
nativeInstance.is
|
|
651
|
+
] : [
|
|
652
|
+
nativeInstance.is,
|
|
653
|
+
nativeInstance.route,
|
|
654
|
+
nativeInstance.__route__
|
|
655
|
+
];
|
|
656
|
+
for (const candidate of candidates) {
|
|
657
|
+
const resolved = resolveBasePathCandidate(candidate);
|
|
658
|
+
if (resolved) return resolved;
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
function resolveScopedRouterUrl(url, basePath) {
|
|
662
|
+
if (!basePath || !url.startsWith("./") && !url.startsWith("../")) return url;
|
|
663
|
+
const { path, query, hash } = parsePathInput(url);
|
|
664
|
+
const resolvedPath = createAbsoluteRoutePath(resolvePath(path, basePath));
|
|
665
|
+
const queryString = stringifyQuery(query);
|
|
666
|
+
return `${resolvedPath}${queryString ? `?${queryString}` : ""}${hash}`;
|
|
667
|
+
}
|
|
668
|
+
function createScopedRuntimeRouter(rawRouter, basePath) {
|
|
669
|
+
const cacheKey = basePath !== null && basePath !== void 0 ? basePath : "";
|
|
670
|
+
const cachedByBasePath = runtimeRouterWrapperCache.get(rawRouter);
|
|
671
|
+
const cachedRouter = cachedByBasePath === null || cachedByBasePath === void 0 ? void 0 : cachedByBasePath.get(cacheKey);
|
|
672
|
+
if (cachedRouter) return cachedRouter;
|
|
673
|
+
const scopedRouter = Object.create(null);
|
|
674
|
+
for (const methodName of RUNTIME_ROUTER_METHODS) scopedRouter[methodName] = (option) => {
|
|
675
|
+
const rawMethod = rawRouter[methodName];
|
|
676
|
+
if (methodName === "navigateBack" || !option || typeof option !== "object") return rawMethod.call(rawRouter, option);
|
|
677
|
+
const nextUrl = typeof option.url === "string" ? resolveScopedRouterUrl(option.url, basePath) : option.url;
|
|
678
|
+
const nextOption = nextUrl === option.url ? option : {
|
|
679
|
+
...option,
|
|
680
|
+
url: nextUrl
|
|
681
|
+
};
|
|
682
|
+
return rawMethod.call(rawRouter, nextOption);
|
|
683
|
+
};
|
|
684
|
+
const nextCache = cachedByBasePath !== null && cachedByBasePath !== void 0 ? cachedByBasePath : /* @__PURE__ */ new Map();
|
|
685
|
+
nextCache.set(cacheKey, scopedRouter);
|
|
686
|
+
runtimeRouterWrapperCache.set(rawRouter, nextCache);
|
|
687
|
+
return scopedRouter;
|
|
688
|
+
}
|
|
437
689
|
function useRuntimeRouterByAccessor(primaryAccessor, fallbackAccessor, helperName) {
|
|
438
690
|
const ctx = getCurrentSetupContext();
|
|
439
691
|
if (!(ctx === null || ctx === void 0 ? void 0 : ctx.instance)) throw new Error(`${helperName}() 必须在 setup() 的同步阶段调用`);
|
|
440
692
|
const nativeInstance = ctx.instance;
|
|
693
|
+
const basePath = resolveRouterBasePath(nativeInstance, primaryAccessor);
|
|
441
694
|
const primaryRouter = nativeInstance[primaryAccessor];
|
|
442
|
-
if (isRuntimeRouter(primaryRouter)) return primaryRouter;
|
|
695
|
+
if (isRuntimeRouter(primaryRouter)) return createScopedRuntimeRouter(primaryRouter, basePath);
|
|
443
696
|
const fallbackRouter = nativeInstance[fallbackAccessor];
|
|
444
|
-
if (isRuntimeRouter(fallbackRouter)) return fallbackRouter;
|
|
697
|
+
if (isRuntimeRouter(fallbackRouter)) return createScopedRuntimeRouter(fallbackRouter, basePath);
|
|
445
698
|
const globalFallbackRouter = createGlobalRouterFallback();
|
|
446
|
-
if (globalFallbackRouter) return globalFallbackRouter;
|
|
699
|
+
if (globalFallbackRouter) return createScopedRuntimeRouter(globalFallbackRouter, basePath);
|
|
447
700
|
throw new Error("当前运行环境不支持 Router,请升级微信基础库到 2.16.1+ 或检查平台路由能力");
|
|
448
701
|
}
|
|
449
702
|
/**
|
|
@@ -473,4 +726,4 @@ function useNativePageRouter() {
|
|
|
473
726
|
return useRuntimeRouterByAccessor("pageRouter", "router", "useNativePageRouter");
|
|
474
727
|
}
|
|
475
728
|
//#endregion
|
|
476
|
-
export {
|
|
729
|
+
export { getScopedSlotHostGlobalObject 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, getMiniProgramGlobalObject 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, onAddToFavorites as b, normalizeRouteParams as c, createAbsoluteRoutePath as d, isProxy as et, isDynamicRoutePath as f, injectGlobal as g, inject as h, parsePathInput as i, onPullDownRefresh as j, onPageNotFound as k, parseQuery as l, hasInjectionContext as m, useNativeRouter as n, readonly as nt, normalizeHash as o, resolvePath as p, getCurrentInstance as q, createRouteLocation as r, shallowReadonly as rt, normalizeQuery as s, useNativePageRouter as t, isReadonly as tt, stringifyQuery as u, provideGlobal as v, onHide as w, onAttached as x, setGlobalProvidedValue as y, onShow as z };
|
package/dist/router.mjs
CHANGED
|
@@ -1,209 +1,5 @@
|
|
|
1
1
|
import { d as reactive } from "./ref-mshhFqmk.mjs";
|
|
2
|
-
import {
|
|
3
|
-
//#region src/routerInternal/path.ts
|
|
4
|
-
function normalizePathSegments(path) {
|
|
5
|
-
const segments = [];
|
|
6
|
-
for (const segment of path.split("/")) {
|
|
7
|
-
if (!segment || segment === ".") continue;
|
|
8
|
-
if (segment === "..") {
|
|
9
|
-
if (segments.length > 0) segments.pop();
|
|
10
|
-
continue;
|
|
11
|
-
}
|
|
12
|
-
segments.push(segment);
|
|
13
|
-
}
|
|
14
|
-
return segments;
|
|
15
|
-
}
|
|
16
|
-
function resolvePath(path, currentPath) {
|
|
17
|
-
if (!path) return normalizePathSegments(currentPath).join("/");
|
|
18
|
-
if (path.startsWith("/")) return normalizePathSegments(path).join("/");
|
|
19
|
-
if (path.startsWith("./") || path.startsWith("../")) {
|
|
20
|
-
const baseSegments = normalizePathSegments(currentPath);
|
|
21
|
-
if (baseSegments.length > 0) baseSegments.pop();
|
|
22
|
-
for (const segment of path.split("/")) {
|
|
23
|
-
if (!segment || segment === ".") continue;
|
|
24
|
-
if (segment === "..") {
|
|
25
|
-
if (baseSegments.length > 0) baseSegments.pop();
|
|
26
|
-
continue;
|
|
27
|
-
}
|
|
28
|
-
baseSegments.push(segment);
|
|
29
|
-
}
|
|
30
|
-
return baseSegments.join("/");
|
|
31
|
-
}
|
|
32
|
-
return normalizePathSegments(path).join("/");
|
|
33
|
-
}
|
|
34
|
-
function createAbsoluteRoutePath(path) {
|
|
35
|
-
return path ? `/${path}` : "/";
|
|
36
|
-
}
|
|
37
|
-
const DYNAMIC_ROUTE_RE = /(?:^|\/):/;
|
|
38
|
-
function isDynamicRoutePath(path) {
|
|
39
|
-
return DYNAMIC_ROUTE_RE.test(path);
|
|
40
|
-
}
|
|
41
|
-
//#endregion
|
|
42
|
-
//#region src/routerInternal/query.ts
|
|
43
|
-
const PLUS_RE = /\+/g;
|
|
44
|
-
function decodeQuerySegment(value) {
|
|
45
|
-
return decodeURIComponent(value.replace(PLUS_RE, " "));
|
|
46
|
-
}
|
|
47
|
-
function encodeQuerySegment(value) {
|
|
48
|
-
return encodeURIComponent(value);
|
|
49
|
-
}
|
|
50
|
-
function pushQueryValue(target, key, value) {
|
|
51
|
-
const previous = target[key];
|
|
52
|
-
if (previous === void 0) {
|
|
53
|
-
target[key] = value;
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
if (Array.isArray(previous)) {
|
|
57
|
-
previous.push(value);
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
target[key] = [previous, value];
|
|
61
|
-
}
|
|
62
|
-
function pushRouteParamValue(target, key, value) {
|
|
63
|
-
const previous = target[key];
|
|
64
|
-
if (previous === void 0) {
|
|
65
|
-
target[key] = value;
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
if (Array.isArray(previous)) {
|
|
69
|
-
previous.push(value);
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
target[key] = [previous, value];
|
|
73
|
-
}
|
|
74
|
-
function normalizeQueryValue(value) {
|
|
75
|
-
if (value === void 0) return;
|
|
76
|
-
if (value === null) return null;
|
|
77
|
-
return String(value);
|
|
78
|
-
}
|
|
79
|
-
function normalizeQuery(query) {
|
|
80
|
-
const normalized = {};
|
|
81
|
-
for (const key of Object.keys(query)) {
|
|
82
|
-
const rawValue = query[key];
|
|
83
|
-
if (Array.isArray(rawValue)) {
|
|
84
|
-
for (const item of rawValue) {
|
|
85
|
-
const next = normalizeQueryValue(item);
|
|
86
|
-
if (next !== void 0) pushQueryValue(normalized, key, next);
|
|
87
|
-
}
|
|
88
|
-
continue;
|
|
89
|
-
}
|
|
90
|
-
const next = normalizeQueryValue(rawValue);
|
|
91
|
-
if (next !== void 0) pushQueryValue(normalized, key, next);
|
|
92
|
-
}
|
|
93
|
-
return normalized;
|
|
94
|
-
}
|
|
95
|
-
function normalizeRouteParamValue(value) {
|
|
96
|
-
if (value === void 0 || value === null) return;
|
|
97
|
-
return String(value);
|
|
98
|
-
}
|
|
99
|
-
function normalizeRouteParams(params) {
|
|
100
|
-
const normalized = {};
|
|
101
|
-
for (const key of Object.keys(params)) {
|
|
102
|
-
const rawValue = params[key];
|
|
103
|
-
if (Array.isArray(rawValue)) {
|
|
104
|
-
for (const item of rawValue) {
|
|
105
|
-
const next = normalizeRouteParamValue(item);
|
|
106
|
-
if (next !== void 0) pushRouteParamValue(normalized, key, next);
|
|
107
|
-
}
|
|
108
|
-
continue;
|
|
109
|
-
}
|
|
110
|
-
const next = normalizeRouteParamValue(rawValue);
|
|
111
|
-
if (next !== void 0) pushRouteParamValue(normalized, key, next);
|
|
112
|
-
}
|
|
113
|
-
return normalized;
|
|
114
|
-
}
|
|
115
|
-
function normalizeHash(rawHash) {
|
|
116
|
-
if (!rawHash) return "";
|
|
117
|
-
return rawHash.startsWith("#") ? rawHash : `#${rawHash}`;
|
|
118
|
-
}
|
|
119
|
-
function parseQuery(search) {
|
|
120
|
-
const normalizedSearch = search.startsWith("?") ? search.slice(1) : search;
|
|
121
|
-
const query = {};
|
|
122
|
-
if (!normalizedSearch) return query;
|
|
123
|
-
for (const segment of normalizedSearch.split("&")) {
|
|
124
|
-
if (!segment) continue;
|
|
125
|
-
const equalIndex = segment.indexOf("=");
|
|
126
|
-
const rawKey = equalIndex >= 0 ? segment.slice(0, equalIndex) : segment;
|
|
127
|
-
if (!rawKey) continue;
|
|
128
|
-
pushQueryValue(query, decodeQuerySegment(rawKey), equalIndex >= 0 ? decodeQuerySegment(segment.slice(equalIndex + 1)) : null);
|
|
129
|
-
}
|
|
130
|
-
return query;
|
|
131
|
-
}
|
|
132
|
-
function stringifyQuery(query = {}) {
|
|
133
|
-
const normalizedQuery = normalizeQuery(query);
|
|
134
|
-
const segments = [];
|
|
135
|
-
for (const key of Object.keys(normalizedQuery)) {
|
|
136
|
-
const encodedKey = encodeQuerySegment(key);
|
|
137
|
-
const rawValue = normalizedQuery[key];
|
|
138
|
-
if (Array.isArray(rawValue)) {
|
|
139
|
-
for (const item of rawValue) if (item === null) segments.push(encodedKey);
|
|
140
|
-
else segments.push(`${encodedKey}=${encodeQuerySegment(item)}`);
|
|
141
|
-
continue;
|
|
142
|
-
}
|
|
143
|
-
if (rawValue === null) {
|
|
144
|
-
segments.push(encodedKey);
|
|
145
|
-
continue;
|
|
146
|
-
}
|
|
147
|
-
segments.push(`${encodedKey}=${encodeQuerySegment(rawValue)}`);
|
|
148
|
-
}
|
|
149
|
-
return segments.join("&");
|
|
150
|
-
}
|
|
151
|
-
//#endregion
|
|
152
|
-
//#region src/routerInternal/location.ts
|
|
153
|
-
const DEFAULT_ROUTE_RESOLVE_CODEC$1 = {
|
|
154
|
-
parseQuery,
|
|
155
|
-
stringifyQuery
|
|
156
|
-
};
|
|
157
|
-
function parsePathInput(input, codec = DEFAULT_ROUTE_RESOLVE_CODEC$1) {
|
|
158
|
-
const hashIndex = input.indexOf("#");
|
|
159
|
-
const withoutHash = hashIndex >= 0 ? input.slice(0, hashIndex) : input;
|
|
160
|
-
const hash = hashIndex >= 0 ? normalizeHash(input.slice(hashIndex + 1)) : "";
|
|
161
|
-
const queryIndex = withoutHash.indexOf("?");
|
|
162
|
-
if (queryIndex < 0) return {
|
|
163
|
-
path: withoutHash,
|
|
164
|
-
query: {},
|
|
165
|
-
hash
|
|
166
|
-
};
|
|
167
|
-
return {
|
|
168
|
-
path: withoutHash.slice(0, queryIndex),
|
|
169
|
-
query: normalizeQuery(codec.parseQuery(withoutHash.slice(queryIndex + 1))),
|
|
170
|
-
hash
|
|
171
|
-
};
|
|
172
|
-
}
|
|
173
|
-
function createRouteLocation(path, query, hash = "", name, params = {}, queryStringifier = stringifyQuery) {
|
|
174
|
-
const normalizedPath = resolvePath(path, "");
|
|
175
|
-
const queryString = queryStringifier(query);
|
|
176
|
-
const fullPathBase = createAbsoluteRoutePath(normalizedPath);
|
|
177
|
-
const normalizedHash = normalizeHash(hash);
|
|
178
|
-
const fullPath = queryString ? `${fullPathBase}?${queryString}` : fullPathBase;
|
|
179
|
-
const location = {
|
|
180
|
-
path: normalizedPath,
|
|
181
|
-
fullPath: normalizedHash ? `${fullPath}${normalizedHash}` : fullPath,
|
|
182
|
-
query,
|
|
183
|
-
hash: normalizedHash,
|
|
184
|
-
params
|
|
185
|
-
};
|
|
186
|
-
if (name !== void 0) location.name = name;
|
|
187
|
-
return location;
|
|
188
|
-
}
|
|
189
|
-
function getCurrentMiniProgramPage() {
|
|
190
|
-
const getCurrentPagesFn = globalThis.getCurrentPages;
|
|
191
|
-
if (typeof getCurrentPagesFn !== "function") return;
|
|
192
|
-
try {
|
|
193
|
-
const pages = getCurrentPagesFn();
|
|
194
|
-
if (!Array.isArray(pages) || pages.length === 0) return;
|
|
195
|
-
return pages.at(-1);
|
|
196
|
-
} catch (_unused) {
|
|
197
|
-
return;
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
function resolveCurrentRoute(queryOverride) {
|
|
201
|
-
var _currentPage$options;
|
|
202
|
-
const currentPage = getCurrentMiniProgramPage();
|
|
203
|
-
if (!currentPage) return createRouteLocation("", {});
|
|
204
|
-
return createRouteLocation(typeof currentPage.route === "string" ? currentPage.route : typeof currentPage.__route__ === "string" ? currentPage.__route__ : "", normalizeQuery(queryOverride !== null && queryOverride !== void 0 ? queryOverride : (_currentPage$options = currentPage.options) !== null && _currentPage$options !== void 0 ? _currentPage$options : {}), "", void 0, {});
|
|
205
|
-
}
|
|
206
|
-
//#endregion
|
|
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, nt as readonly, o as normalizeHash, p as resolvePath, r as createRouteLocation, s as normalizeQuery, t as useNativePageRouter$1, u as stringifyQuery, v as provideGlobal, z as onShow } from "./router-BR3hx21a.mjs";
|
|
207
3
|
//#region src/routerInternal/params.ts
|
|
208
4
|
const PATH_PARAM_TOKEN_RE = /^:(\w+)(?:\([^)]*\))?([+*?])?$/;
|
|
209
5
|
function parsePathParamToken(segment) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { C as removeMutationRecorder, E as effectScope, F as nextTick, I as queueJob, M as track, N as trigger, P as triggerEffects, S as addMutationRecorder, T as effect, _ as ReactiveFlags, b as isObject$1, d as reactive, g as touchReactive, h as prelinkReactiveTree, i as ref, j as stop, k as onScopeDispose, l as isReactive, m as clearPatchIndices, n as isRef, o as unref, p as shallowReactive, r as markAsRef, s as getReactiveVersion, t as customRef, x as toRaw } from "./ref-mshhFqmk.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { $ as getScopedSlotHostGlobalObject, A as onPageScroll, G as callHookList, J as getCurrentSetupContext, K as callHookReturn, Q as getMiniProgramGlobalObject, S as onDetached, U as onUnload, W as assertInSetup, X as setCurrentInstance, Y as pushHook, Z as setCurrentSetupContext, nt as readonly, q as getCurrentInstance, x as onAttached, y as setGlobalProvidedValue } from "./router-BR3hx21a.mjs";
|
|
3
3
|
import { WEVU_ATTRS_KEY, WEVU_EFFECT_SCOPE_KEY, WEVU_EXPOSED_KEY, WEVU_HOOKS_KEY, WEVU_INLINE_HANDLER, WEVU_INLINE_MAP_KEY, WEVU_IS_APP_INSTANCE_KEY, WEVU_LAYOUT_BRIDGE_PAGE_KEYS, WEVU_LAYOUT_HOST_BRIDGE_KEY, WEVU_MODEL_HANDLER, WEVU_NATIVE_INSTANCE_KEY, WEVU_ON_BEFORE_UPDATE_HOOK, WEVU_ON_LOAD_CALLED_KEY, WEVU_ON_UPDATED_HOOK, WEVU_OWNER_HANDLER, WEVU_PAGE_LAYOUT_NAME_KEY, WEVU_PAGE_LAYOUT_NONE, WEVU_PAGE_LAYOUT_PROPS_KEY, WEVU_PAGE_LAYOUT_SETTER_KEY, WEVU_PAGE_SCROLL_HOOK_DEPTH_KEY, WEVU_PENDING_PROP_VALUES_KEY, WEVU_PROPS_KEY, WEVU_PROP_KEYS_KEY, WEVU_PUBLIC_RUNTIME_KEY, WEVU_READY_CALLED_KEY, WEVU_RESERVED_METHOD_PREFIX, WEVU_ROUTE_DONE_CALLED_KEY, WEVU_ROUTE_DONE_IN_TICK_KEY, WEVU_RUNTIME_APP_KEY, WEVU_RUNTIME_KEY, WEVU_SCOPED_SLOT_CREATOR_KEY, WEVU_SETUP_CONTEXT_INSTANCE_KEY, WEVU_SLOT_OWNER_ID_KEY, WEVU_SLOT_OWNER_ID_PROP, WEVU_SLOT_OWNER_KEY, WEVU_SLOT_PROPS_DATA_KEY, WEVU_SLOT_PROPS_KEY, WEVU_SLOT_SCOPE_KEY, WEVU_TEMPLATE_REFS_CALLBACKS_KEY, WEVU_TEMPLATE_REFS_KEY, WEVU_TEMPLATE_REFS_PENDING_KEY, WEVU_TEMPLATE_REF_MAP_KEY, WEVU_WATCH_STOPS_KEY } from "@weapp-core/constants";
|
|
4
4
|
//#region src/reactivity/shallowRef.ts
|
|
5
5
|
/**
|
|
@@ -432,7 +432,7 @@ function watchSyncEffect(effectFn, options = {}) {
|
|
|
432
432
|
}
|
|
433
433
|
//#endregion
|
|
434
434
|
//#region src/version.ts
|
|
435
|
-
const version = "6.15.
|
|
435
|
+
const version = "6.15.5";
|
|
436
436
|
//#endregion
|
|
437
437
|
//#region src/utils.ts
|
|
438
438
|
function capitalize(str) {
|
|
@@ -2251,7 +2251,7 @@ function setPageLayout(layout, props) {
|
|
|
2251
2251
|
throw new Error("setPageLayout() 未找到当前页面实例。请在页面 setup()、事件回调或当前页面上下文中调用。");
|
|
2252
2252
|
}
|
|
2253
2253
|
function resolveRuntimePageLayoutName(layout) {
|
|
2254
|
-
return layout === false ?
|
|
2254
|
+
return layout === false ? WEVU_PAGE_LAYOUT_NONE : layout;
|
|
2255
2255
|
}
|
|
2256
2256
|
//#endregion
|
|
2257
2257
|
//#region src/runtime/scopedSlots.ts
|
package/dist/vue-demi.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as WeappIntrinsicElementBaseAttributes, r as WeappIntrinsicEventHandler } from "./weappIntrinsicElements-CwA7kB31.mjs";
|
|
2
2
|
import { $ as WatchSources, $t as customRef, A as ComputedDefinitions, At as EffectScope, B as watchSyncEffect, Bt as ComputedGetter, C as MiniProgramComponentBehaviorOptions, Cn as NativeTypedProperty, Ct as prelinkReactiveTree, D as MiniProgramPageLifetimes, Dt as MutationRecord, E as MiniProgramInstance, En as PropType, Et as MutationOp, F as ModelBindingOptions, Ft as getCurrentScope, G as WatchCallback, Gt as computed, H as MaybeUndefined, Ht as ComputedSetter, I as ModelBindingPayload, It as onScopeDispose, J as WatchMultiSources, Jt as CustomRefSource, K as WatchEffect, Kt as CustomRefFactory, L as watch, Lt as startBatch, M as ExtractMethods, Mt as effect, N as MethodDefinitions, Nt as effectScope, O as TriggerEventOptions, Ot as addMutationRecorder, P as ModelBinding, Pt as endBatch, Q as WatchSourceValue, Qt as ShallowRef, R as watchEffect, Rt as stop, S as MiniProgramBehaviorIdentifier, Sn as NativeTypeHint, St as PrelinkReactiveTreeOptions, T as MiniProgramComponentRawOptions, Tn as PropOptions, Tt as MutationKind, U as MultiWatchSources, Ut as WritableComputedOptions, V as MapSources, Vt as ComputedRef, W as OnCleanup, Wt as WritableComputedRef, X as WatchScheduler, Xt as MaybeRefOrGetter, Y as WatchOptions, Yt as MaybeRef, Z as WatchSource, Zt as Ref, _ as RuntimeApp, _n as InferNativeProps, _t as markRaw, a as NativeComponent, at as toRef, b as MiniProgramAdapter, bn as NativePropType, bt as isShallowReactive, c as ShallowUnwrapRef, cn as SetupContextRouter, ct as shallowRef, d as SetupContext, dn as WevuTypedRouterRouteMap, dt as isReadonly, en as isRef, et as WatchStopHandle, f as SetupContextNativeInstance, fn as ComponentPropsOptions, ft as readonly, g as InternalRuntimeStateFields, gn as InferNativePropType, gt as isReactive, h as InternalRuntimeState, hn as ExtractPublicPropTypes, ht as isRaw, i as DefineComponent, it as ToRefs, j as ExtractComputed, jt as batch, k as ComponentPublicInstance, kt as removeMutationRecorder, l as VNode, lt as triggerRef, m as AppConfig, mn as ExtractPropTypes, mt as getReactiveVersion, n as ComponentCustomProps, nn as toValue, nt as setDeepWatchStrategy, o as ObjectDirective, ot as toRefs, p as SetupFunction, pn as ExtractDefaultPropTypes, pt as shallowReadonly, q as WatchEffectOptions, qt as CustomRefOptions, r as ComponentOptionsMixin, rn as unref, rt as traverse, s as PublicProps, st as isShallowRef, t as AllowedComponentProps, tn as ref, tt as getDeepWatchStrategy, u as VNodeProps, ut as isProxy, v as RuntimeInstance, vn as InferPropType, vt as reactive, w as MiniProgramComponentOptions, wn as PropConstructor, wt as touchReactive, x as MiniProgramAppOptions, xn as NativePropsOptions, xt as shallowReactive, y as WevuPlugin, yn as InferProps, yt as toRaw, z as watchPostEffect, zt as nextTick } from "./vue-types-BUOuHH4O.mjs";
|
|
3
|
-
import { $ as PageLayoutState, $t as onTabItemTap, A as defineAppSetup, An as TemplateRefValue, At as onServerPrefetch, B as setRuntimeSetDataVisibility, Bn as SetDataSnapshotOptions, 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 DataOption, Ft as onDetached, G as inject, Gt as onReachBottom, H as registerComponent, Ht as onPageNotFound, I as normalizeClass, In as DefineAppOptions, It as onError, J as provideGlobal, Jt as onRouteDone, K as injectGlobal, Kt as onReady, L as normalizeStyle, Ln as DefineComponentOptions, Lt as onHide, M as UpdatePerformanceListener, Mn as WevuGlobalComponents, Mt as onUpdated, N as UpdatePerformanceListenerResult, Nn as WevuGlobalDirectives, Nt as onAddToFavorites, O as useNativeInstance, On as GlobalComponents, Ot as onErrorCaptured, P as UseUpdatePerformanceListenerStopHandle, Pn as CreateAppOptions, Pt as onAttached, Q as usePageScrollThrottle, Qt as onShow, R as runSetupFunction, Rn as PageFeatures, 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, 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 TemplateRefs, 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 SetDataDebugInfo, zt as onLoad } from "./index-
|
|
3
|
+
import { $ as PageLayoutState, $t as onTabItemTap, A as defineAppSetup, An as TemplateRefValue, At as onServerPrefetch, B as setRuntimeSetDataVisibility, Bn as SetDataSnapshotOptions, 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 DataOption, Ft as onDetached, G as inject, Gt as onReachBottom, H as registerComponent, Ht as onPageNotFound, I as normalizeClass, In as DefineAppOptions, It as onError, J as provideGlobal, Jt as onRouteDone, K as injectGlobal, Kt as onReady, L as normalizeStyle, Ln as DefineComponentOptions, Lt as onHide, M as UpdatePerformanceListener, Mn as WevuGlobalComponents, Mt as onUpdated, N as UpdatePerformanceListenerResult, Nn as WevuGlobalDirectives, Nt as onAddToFavorites, O as useNativeInstance, On as GlobalComponents, Ot as onErrorCaptured, P as UseUpdatePerformanceListenerStopHandle, Pn as CreateAppOptions, Pt as onAttached, Q as usePageScrollThrottle, Qt as onShow, R as runSetupFunction, Rn as PageFeatures, 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, 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 TemplateRefs, 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 SetDataDebugInfo, zt as onLoad } from "./index-DWouSxpz.mjs";
|
|
4
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-SDxsBVMY.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/vue-demi.d.ts
|
package/dist/vue-demi.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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
|
|
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, b as onAddToFavorites, et as isProxy, g as injectGlobal, h as inject, j as onPullDownRefresh, k as onPageNotFound, m as hasInjectionContext, n as useNativeRouter, nt as readonly, q as getCurrentInstance, rt as shallowReadonly, t as useNativePageRouter, tt as isReadonly, v as provideGlobal, w as onHide, x as onAttached, y as setGlobalProvidedValue, z as onShow } from "./router-BR3hx21a.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-_P44BAOw.mjs";
|
|
5
5
|
//#region src/vue-demi.ts
|
|
6
6
|
/**
|
|
7
7
|
* 标记当前兼容层运行在 Vue 3 风格分支。
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wevu",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "6.15.
|
|
4
|
+
"version": "6.15.5",
|
|
5
5
|
"description": "Vue 3 风格的小程序运行时,包含响应式、diff+setData 与轻量状态管理",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"vue": "^3.5.32",
|
|
105
105
|
"@weapp-core/constants": "^0.1.1",
|
|
106
106
|
"@wevu/api": "0.2.3",
|
|
107
|
-
"@wevu/compiler": "6.15.
|
|
107
|
+
"@wevu/compiler": "6.15.5"
|
|
108
108
|
},
|
|
109
109
|
"scripts": {
|
|
110
110
|
"dev": "tsdown -w",
|