wevu 6.18.7 → 6.19.0
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/_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/defineProperty.mjs +1 -0
- package/dist/_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/toPrimitive.mjs +1 -0
- package/dist/_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/toPropertyKey.mjs +1 -0
- package/dist/_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/typeof.mjs +1 -0
- package/dist/{rolldown-runtime-CenpyGzJ.mjs → _virtual/_rolldown/runtime.mjs} +1 -1
- package/dist/dev/_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/defineProperty.mjs +14 -0
- package/dist/dev/_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/toPrimitive.mjs +16 -0
- package/dist/dev/_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/toPropertyKey.mjs +11 -0
- package/dist/dev/_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/typeof.mjs +12 -0
- package/dist/dev/{rolldown-runtime-BUUfjzRC.mjs → _virtual/_rolldown/runtime.mjs} +1 -1
- package/dist/dev/index.mjs +49 -10
- package/dist/dev/internal-reactivity.mjs +15 -5
- package/dist/dev/internal-runtime.mjs +32 -4
- package/dist/dev/internal-template.mjs +1 -1
- package/dist/dev/package.mjs +6 -0
- package/dist/dev/package.mjs.map +1 -0
- package/dist/dev/reactivity/computed.mjs +49 -0
- package/dist/dev/reactivity/computed.mjs.map +1 -0
- package/dist/dev/reactivity/core.mjs +184 -0
- package/dist/dev/reactivity/core.mjs.map +1 -0
- package/dist/dev/reactivity/reactive/mutation.mjs +12 -0
- package/dist/dev/reactivity/reactive/mutation.mjs.map +1 -0
- package/dist/dev/{computed-BxRsUJgi.mjs → reactivity/reactive/patch.mjs} +6 -48
- package/dist/dev/reactivity/reactive/patch.mjs.map +1 -0
- package/dist/dev/reactivity/reactive/patchState.mjs +138 -0
- package/dist/dev/reactivity/reactive/patchState.mjs.map +1 -0
- package/dist/dev/reactivity/reactive/shallow.mjs +77 -0
- package/dist/dev/reactivity/reactive/shallow.mjs.map +1 -0
- package/dist/dev/reactivity/reactive/shared.mjs +40 -0
- package/dist/dev/reactivity/reactive/shared.mjs.map +1 -0
- package/dist/dev/reactivity/reactive/state.mjs +8 -0
- package/dist/dev/reactivity/reactive/state.mjs.map +1 -0
- package/dist/dev/reactivity/reactive.mjs +212 -0
- package/dist/dev/reactivity/reactive.mjs.map +1 -0
- package/dist/dev/reactivity/readonly.mjs +69 -0
- package/dist/dev/reactivity/readonly.mjs.map +1 -0
- package/dist/dev/reactivity/ref.mjs +97 -0
- package/dist/dev/reactivity/ref.mjs.map +1 -0
- package/dist/dev/reactivity/shallowRef.mjs +71 -0
- package/dist/dev/reactivity/shallowRef.mjs.map +1 -0
- package/dist/dev/{toRefs-D06VmFK2.mjs → reactivity/toRefs.mjs} +4 -3
- package/dist/dev/reactivity/toRefs.mjs.map +1 -0
- package/dist/dev/reactivity/traverse.mjs +40 -0
- package/dist/dev/reactivity/traverse.mjs.map +1 -0
- package/dist/dev/reactivity/watch/helpers.mjs +78 -0
- package/dist/dev/reactivity/watch/helpers.mjs.map +1 -0
- package/dist/dev/reactivity/watch/types.mjs +20 -0
- package/dist/dev/reactivity/watch/types.mjs.map +1 -0
- package/dist/dev/reactivity/watch.mjs +167 -0
- package/dist/dev/reactivity/watch.mjs.map +1 -0
- package/dist/dev/router/backNavigation.mjs +32 -0
- package/dist/dev/router/backNavigation.mjs.map +1 -0
- package/dist/dev/router/createRouter.mjs +176 -0
- package/dist/dev/router/createRouter.mjs.map +1 -0
- package/dist/dev/router/instance.mjs +17 -0
- package/dist/dev/router/instance.mjs.map +1 -0
- package/dist/dev/router/navigationApi.mjs +94 -0
- package/dist/dev/router/navigationApi.mjs.map +1 -0
- package/dist/dev/router/navigationCore.mjs +139 -0
- package/dist/dev/router/navigationCore.mjs.map +1 -0
- package/dist/dev/router/navigationResult.mjs +54 -0
- package/dist/dev/router/navigationResult.mjs.map +1 -0
- package/dist/dev/router/navigationTarget.mjs +121 -0
- package/dist/dev/router/navigationTarget.mjs.map +1 -0
- package/dist/dev/router/navigationTargetHelpers.mjs +38 -0
- package/dist/dev/router/navigationTargetHelpers.mjs.map +1 -0
- package/dist/dev/router/resolve.mjs +22 -0
- package/dist/dev/router/resolve.mjs.map +1 -0
- package/dist/dev/router/routeRegistry.mjs +78 -0
- package/dist/dev/router/routeRegistry.mjs.map +1 -0
- package/dist/dev/router/routeSync.mjs +72 -0
- package/dist/dev/router/routeSync.mjs.map +1 -0
- package/dist/dev/router/types.mjs +11 -0
- package/dist/dev/router/types.mjs.map +1 -0
- package/dist/dev/router/useRoute.mjs +106 -0
- package/dist/dev/router/useRoute.mjs.map +1 -0
- package/dist/dev/router/useRouter.mjs +15 -0
- package/dist/dev/router/useRouter.mjs.map +1 -0
- package/dist/dev/router.mjs +9 -1378
- package/dist/dev/routerInternal/location.mjs +66 -0
- package/dist/dev/routerInternal/location.mjs.map +1 -0
- package/dist/dev/routerInternal/matching.mjs +149 -0
- package/dist/dev/routerInternal/matching.mjs.map +1 -0
- package/dist/dev/routerInternal/params.mjs +95 -0
- package/dist/dev/routerInternal/params.mjs.map +1 -0
- package/dist/dev/routerInternal/path.mjs +42 -0
- package/dist/dev/routerInternal/path.mjs.map +1 -0
- package/dist/dev/routerInternal/query.mjs +113 -0
- package/dist/dev/routerInternal/query.mjs.map +1 -0
- package/dist/dev/routerInternal/records.mjs +172 -0
- package/dist/dev/routerInternal/records.mjs.map +1 -0
- package/dist/dev/routerInternal/recordsWarnings.mjs +49 -0
- package/dist/dev/routerInternal/recordsWarnings.mjs.map +1 -0
- package/dist/dev/routerInternal/snapshots.mjs +126 -0
- package/dist/dev/routerInternal/snapshots.mjs.map +1 -0
- package/dist/dev/runtime/app/computed.mjs +68 -0
- package/dist/dev/runtime/app/computed.mjs.map +1 -0
- package/dist/dev/runtime/app/context.mjs +275 -0
- package/dist/dev/runtime/app/context.mjs.map +1 -0
- package/dist/dev/runtime/app/diagnostics.mjs +34 -0
- package/dist/dev/runtime/app/diagnostics.mjs.map +1 -0
- package/dist/dev/runtime/app/mount.mjs +269 -0
- package/dist/dev/runtime/app/mount.mjs.map +1 -0
- package/dist/dev/runtime/app/pending.mjs +14 -0
- package/dist/dev/runtime/app/pending.mjs.map +1 -0
- package/dist/dev/runtime/app/setData/patchScheduler.mjs +158 -0
- package/dist/dev/runtime/app/setData/patchScheduler.mjs.map +1 -0
- package/dist/dev/runtime/app/setData/payload.mjs +161 -0
- package/dist/dev/runtime/app/setData/payload.mjs.map +1 -0
- package/dist/dev/runtime/app/setData/scheduler.mjs +313 -0
- package/dist/dev/runtime/app/setData/scheduler.mjs.map +1 -0
- package/dist/dev/runtime/app/setData/snapshot.mjs +129 -0
- package/dist/dev/runtime/app/setData/snapshot.mjs.map +1 -0
- package/dist/dev/runtime/app/setDataOptions.mjs +73 -0
- package/dist/dev/runtime/app/setDataOptions.mjs.map +1 -0
- package/dist/dev/runtime/app.mjs +93 -0
- package/dist/dev/runtime/app.mjs.map +1 -0
- package/dist/dev/runtime/bindModel.mjs +92 -0
- package/dist/dev/runtime/bindModel.mjs.map +1 -0
- package/dist/dev/runtime/defaults.mjs +61 -0
- package/dist/dev/runtime/defaults.mjs.map +1 -0
- package/dist/dev/runtime/define/initialComputed.mjs +125 -0
- package/dist/dev/runtime/define/initialComputed.mjs.map +1 -0
- package/dist/dev/runtime/define/options.mjs +169 -0
- package/dist/dev/runtime/define/options.mjs.map +1 -0
- package/dist/dev/runtime/define/optionsApi.mjs +48 -0
- package/dist/dev/runtime/define/optionsApi.mjs.map +1 -0
- package/dist/dev/runtime/define/props.mjs +194 -0
- package/dist/dev/runtime/define/props.mjs.map +1 -0
- package/dist/dev/runtime/define/scopedSlotOptions.mjs +313 -0
- package/dist/dev/runtime/define/scopedSlotOptions.mjs.map +1 -0
- package/dist/dev/runtime/define/setupResult.mjs +78 -0
- package/dist/dev/runtime/define/setupResult.mjs.map +1 -0
- package/dist/dev/runtime/define.mjs +140 -0
- package/dist/dev/runtime/define.mjs.map +1 -0
- package/dist/dev/runtime/diff.mjs +193 -0
- package/dist/dev/runtime/diff.mjs.map +1 -0
- package/dist/dev/runtime/disposables.mjs +81 -0
- package/dist/dev/runtime/disposables.mjs.map +1 -0
- package/dist/dev/runtime/elementIntersectionObserver.mjs +80 -0
- package/dist/dev/runtime/elementIntersectionObserver.mjs.map +1 -0
- package/dist/dev/runtime/emit.mjs +36 -0
- package/dist/dev/runtime/emit.mjs.map +1 -0
- package/dist/dev/{base-CYkvI7w8.mjs → runtime/hooks/base.mjs} +3 -140
- package/dist/dev/runtime/hooks/base.mjs.map +1 -0
- package/dist/dev/runtime/hooks/register.mjs +92 -0
- package/dist/dev/runtime/hooks/register.mjs.map +1 -0
- package/dist/dev/runtime/hooks/vue.mjs +81 -0
- package/dist/dev/runtime/hooks/vue.mjs.map +1 -0
- package/dist/dev/runtime/internal.mjs +18 -0
- package/dist/dev/runtime/internal.mjs.map +1 -0
- package/dist/dev/runtime/intersectionObserver.mjs +46 -0
- package/dist/dev/runtime/intersectionObserver.mjs.map +1 -0
- package/dist/dev/runtime/layoutBridge.mjs +303 -0
- package/dist/dev/runtime/layoutBridge.mjs.map +1 -0
- package/dist/dev/runtime/layoutComponentMatcher.mjs +11 -0
- package/dist/dev/runtime/layoutComponentMatcher.mjs.map +1 -0
- package/dist/dev/runtime/nativeBridge.mjs +21 -0
- package/dist/dev/runtime/nativeBridge.mjs.map +1 -0
- package/dist/dev/runtime/noSetData.mjs +18 -0
- package/dist/dev/runtime/noSetData.mjs.map +1 -0
- package/dist/dev/runtime/pageEnvironment.mjs +100 -0
- package/dist/dev/runtime/pageEnvironment.mjs.map +1 -0
- package/dist/dev/runtime/pageLayout.mjs +71 -0
- package/dist/dev/runtime/pageLayout.mjs.map +1 -0
- package/dist/dev/runtime/pageScroll.mjs +110 -0
- package/dist/dev/runtime/pageScroll.mjs.map +1 -0
- package/dist/dev/runtime/platform.mjs +77 -0
- package/dist/dev/runtime/platform.mjs.map +1 -0
- package/dist/dev/runtime/provide.mjs +71 -0
- package/dist/dev/runtime/provide.mjs.map +1 -0
- package/dist/dev/runtime/provideContext.mjs +101 -0
- package/dist/dev/runtime/provideContext.mjs.map +1 -0
- package/dist/dev/runtime/provideStore.mjs +18 -0
- package/dist/dev/runtime/provideStore.mjs.map +1 -0
- package/dist/dev/runtime/pullDownRefresh.mjs +24 -0
- package/dist/dev/runtime/pullDownRefresh.mjs.map +1 -0
- package/dist/dev/runtime/register/app.mjs +159 -0
- package/dist/dev/runtime/register/app.mjs.map +1 -0
- package/dist/dev/runtime/register/component/features.mjs +43 -0
- package/dist/dev/runtime/register/component/features.mjs.map +1 -0
- package/dist/dev/runtime/register/component/lifecycle/optionalHooks.mjs +64 -0
- package/dist/dev/runtime/register/component/lifecycle/optionalHooks.mjs.map +1 -0
- package/dist/dev/runtime/register/component/lifecycle/platform.mjs +95 -0
- package/dist/dev/runtime/register/component/lifecycle/platform.mjs.map +1 -0
- package/dist/dev/runtime/register/component/lifecycle.mjs +122 -0
- package/dist/dev/runtime/register/component/lifecycle.mjs.map +1 -0
- package/dist/dev/runtime/register/component/methods.mjs +80 -0
- package/dist/dev/runtime/register/component/methods.mjs.map +1 -0
- package/dist/dev/runtime/register/component/options.mjs +204 -0
- package/dist/dev/runtime/register/component/options.mjs.map +1 -0
- package/dist/dev/runtime/register/component/props.mjs +218 -0
- package/dist/dev/runtime/register/component/props.mjs.map +1 -0
- package/dist/dev/runtime/register/component/registerDefinition.mjs +290 -0
- package/dist/dev/runtime/register/component/registerDefinition.mjs.map +1 -0
- package/dist/dev/runtime/register/component.mjs +128 -0
- package/dist/dev/runtime/register/component.mjs.map +1 -0
- package/dist/dev/runtime/register/inline.mjs +145 -0
- package/dist/dev/runtime/register/inline.mjs.map +1 -0
- package/dist/dev/runtime/register/runtimeInstance/methodBridge.mjs +53 -0
- package/dist/dev/runtime/register/runtimeInstance/methodBridge.mjs.map +1 -0
- package/dist/dev/runtime/register/runtimeInstance/provideContext.mjs +34 -0
- package/dist/dev/runtime/register/runtimeInstance/provideContext.mjs.map +1 -0
- package/dist/dev/runtime/register/runtimeInstance/setupContext.mjs +230 -0
- package/dist/dev/runtime/register/runtimeInstance/setupContext.mjs.map +1 -0
- package/dist/dev/runtime/register/runtimeInstance/setupPhase.mjs +164 -0
- package/dist/dev/runtime/register/runtimeInstance/setupPhase.mjs.map +1 -0
- package/dist/dev/runtime/register/runtimeInstance/utils.mjs +122 -0
- package/dist/dev/runtime/register/runtimeInstance/utils.mjs.map +1 -0
- package/dist/dev/runtime/register/runtimeInstance.mjs +438 -0
- package/dist/dev/runtime/register/runtimeInstance.mjs.map +1 -0
- package/dist/dev/runtime/register/setDataFrequencyWarning.mjs +95 -0
- package/dist/dev/runtime/register/setDataFrequencyWarning.mjs.map +1 -0
- package/dist/dev/runtime/register/setup.mjs +22 -0
- package/dist/dev/runtime/register/setup.mjs.map +1 -0
- package/dist/dev/runtime/register/snapshot.mjs +17 -0
- package/dist/dev/runtime/register/snapshot.mjs.map +1 -0
- package/dist/dev/runtime/register/watch.mjs +57 -0
- package/dist/dev/runtime/register/watch.mjs.map +1 -0
- package/dist/dev/runtime/scopedSlots.mjs +115 -0
- package/dist/dev/runtime/scopedSlots.mjs.map +1 -0
- package/dist/dev/runtime/selectorQuery.mjs +49 -0
- package/dist/dev/runtime/selectorQuery.mjs.map +1 -0
- package/dist/dev/runtime/setupTracking.mjs +59 -0
- package/dist/dev/runtime/setupTracking.mjs.map +1 -0
- package/dist/dev/{template-n_iVr0ey.mjs → runtime/template.mjs} +7 -4
- package/dist/dev/runtime/template.mjs.map +1 -0
- package/dist/dev/runtime/templateRefs/helpers.mjs +254 -0
- package/dist/dev/runtime/templateRefs/helpers.mjs.map +1 -0
- package/dist/dev/runtime/templateRefs.mjs +162 -0
- package/dist/dev/runtime/templateRefs.mjs.map +1 -0
- package/dist/dev/runtime/uniAppHost.mjs +119 -0
- package/dist/dev/runtime/uniAppHost.mjs.map +1 -0
- package/dist/dev/runtime/updatePerformance.mjs +41 -0
- package/dist/dev/runtime/updatePerformance.mjs.map +1 -0
- package/dist/dev/runtime/use.mjs +25 -0
- package/dist/dev/runtime/use.mjs.map +1 -0
- package/dist/dev/runtime/vueCompat/context.mjs +25 -0
- package/dist/dev/runtime/vueCompat/context.mjs.map +1 -0
- package/dist/dev/runtime/vueCompat/model.mjs +118 -0
- package/dist/dev/runtime/vueCompat/model.mjs.map +1 -0
- package/dist/dev/runtime/vueCompat/router.mjs +124 -0
- package/dist/dev/runtime/vueCompat/router.mjs.map +1 -0
- package/dist/dev/runtime/vueCompat/templateRef.mjs +37 -0
- package/dist/dev/runtime/vueCompat/templateRef.mjs.map +1 -0
- package/dist/dev/scheduler.mjs +75 -0
- package/dist/dev/scheduler.mjs.map +1 -0
- package/dist/dev/store/actions.mjs +40 -0
- package/dist/dev/store/actions.mjs.map +1 -0
- package/dist/dev/store/base.mjs +56 -0
- package/dist/dev/store/base.mjs.map +1 -0
- package/dist/dev/store/define/optionsStyle.mjs +125 -0
- package/dist/dev/store/define/optionsStyle.mjs.map +1 -0
- package/dist/dev/store/define/setupStyle.mjs +145 -0
- package/dist/dev/store/define/setupStyle.mjs.map +1 -0
- package/dist/dev/store/define/shared.mjs +38 -0
- package/dist/dev/store/define/shared.mjs.map +1 -0
- package/dist/dev/store/define.mjs +23 -0
- package/dist/dev/store/define.mjs.map +1 -0
- package/dist/dev/store/manager.mjs +21 -0
- package/dist/dev/store/manager.mjs.map +1 -0
- package/dist/dev/store/storeToRefs.mjs +29 -0
- package/dist/dev/store/storeToRefs.mjs.map +1 -0
- package/dist/dev/store/utils.mjs +49 -0
- package/dist/dev/store/utils.mjs.map +1 -0
- package/dist/dev/store.mjs +3 -1
- package/dist/dev/utils.mjs +16 -0
- package/dist/dev/utils.mjs.map +1 -0
- package/dist/dev/version.mjs +8 -0
- package/dist/dev/version.mjs.map +1 -0
- package/dist/dev/vue-demi.mjs +49 -11
- package/dist/dev/vue-demi.mjs.map +1 -1
- package/dist/index.d.mts +71 -7
- package/dist/index.mjs +1 -1
- package/dist/internal-reactivity.d.mts +16 -2
- package/dist/internal-reactivity.mjs +1 -1
- package/dist/internal-runtime.d.mts +35 -2
- package/dist/internal-runtime.mjs +1 -1
- package/dist/internal-template.d.mts +1 -1
- package/dist/internal-template.mjs +1 -1
- package/dist/jsx-runtime.d.mts +1 -1
- package/dist/macros/shared.d.mts +81 -0
- package/dist/macros.d.mts +70 -0
- package/dist/package.mjs +1 -0
- package/dist/reactivity/computed.d.mts +21 -0
- package/dist/reactivity/computed.mjs +1 -0
- package/dist/reactivity/core.d.mts +34 -0
- package/dist/reactivity/core.mjs +1 -0
- package/dist/reactivity/index.d.mts +15 -0
- package/dist/reactivity/reactive/mutation.d.mts +21 -0
- package/dist/reactivity/reactive/mutation.mjs +1 -0
- package/dist/reactivity/reactive/patch.d.mts +18 -0
- package/dist/reactivity/reactive/patch.mjs +1 -0
- package/dist/reactivity/reactive/patchState.mjs +1 -0
- package/dist/reactivity/reactive/shallow.d.mts +22 -0
- package/dist/reactivity/reactive/shallow.mjs +1 -0
- package/dist/reactivity/reactive/shared.d.mts +4 -0
- package/dist/reactivity/reactive/shared.mjs +1 -0
- package/dist/reactivity/reactive/state.mjs +1 -0
- package/dist/reactivity/reactive.d.mts +41 -0
- package/dist/reactivity/reactive.mjs +1 -0
- package/dist/reactivity/readonly.d.mts +27 -0
- package/dist/reactivity/readonly.mjs +1 -0
- package/dist/reactivity/ref.d.mts +27 -0
- package/dist/reactivity/ref.mjs +1 -0
- package/dist/reactivity/shallowRef.d.mts +19 -0
- package/dist/reactivity/shallowRef.mjs +1 -0
- package/dist/reactivity/toRefs.d.mts +43 -0
- package/dist/reactivity/toRefs.mjs +1 -0
- package/dist/reactivity/traverse.d.mts +8 -0
- package/dist/reactivity/traverse.mjs +1 -0
- package/dist/reactivity/watch/helpers.mjs +1 -0
- package/dist/reactivity/watch/types.d.mts +43 -0
- package/dist/reactivity/watch/types.mjs +1 -0
- package/dist/reactivity/watch.d.mts +21 -0
- package/dist/reactivity/watch.mjs +1 -0
- package/dist/router/backNavigation.mjs +1 -0
- package/dist/router/createRouter.d.mts +8 -0
- package/dist/router/createRouter.mjs +1 -0
- package/dist/router/instance.mjs +1 -0
- package/dist/router/navigationApi.mjs +1 -0
- package/dist/router/navigationCore.d.mts +6 -0
- package/dist/router/navigationCore.mjs +1 -0
- package/dist/router/navigationResult.mjs +1 -0
- package/dist/router/navigationTarget.mjs +1 -0
- package/dist/router/navigationTargetHelpers.mjs +1 -0
- package/dist/router/resolve.d.mts +6 -0
- package/dist/router/resolve.mjs +1 -0
- package/dist/router/routeRegistry.mjs +1 -0
- package/dist/router/routeSync.d.mts +1 -0
- package/dist/router/routeSync.mjs +1 -0
- package/dist/router/types.d.mts +163 -0
- package/dist/router/types.mjs +1 -0
- package/dist/router/useRoute.d.mts +19 -0
- package/dist/router/useRoute.mjs +1 -0
- package/dist/router/useRouter.d.mts +8 -0
- package/dist/router/useRouter.mjs +1 -0
- package/dist/router.d.mts +9 -204
- package/dist/router.mjs +1 -1
- package/dist/routerInternal/location.mjs +1 -0
- package/dist/routerInternal/matching.mjs +1 -0
- package/dist/routerInternal/params.mjs +1 -0
- package/dist/routerInternal/path.mjs +1 -0
- package/dist/routerInternal/query.d.mts +7 -0
- package/dist/routerInternal/query.mjs +1 -0
- package/dist/routerInternal/records.mjs +1 -0
- package/dist/routerInternal/recordsWarnings.mjs +1 -0
- package/dist/routerInternal/snapshots.mjs +1 -0
- package/dist/routerInternal/types.d.mts +9 -0
- package/dist/runtime/app/computed.mjs +1 -0
- package/dist/runtime/app/context.mjs +1 -0
- package/dist/runtime/app/diagnostics.mjs +1 -0
- package/dist/runtime/app/mount.mjs +1 -0
- package/dist/runtime/app/pending.d.mts +10 -0
- package/dist/runtime/app/pending.mjs +1 -0
- package/dist/runtime/app/setData/patchScheduler.mjs +1 -0
- package/dist/runtime/app/setData/payload.mjs +1 -0
- package/dist/runtime/app/setData/scheduler.mjs +1 -0
- package/dist/runtime/app/setData/snapshot.mjs +1 -0
- package/dist/runtime/app/setDataOptions.mjs +1 -0
- package/dist/runtime/app.d.mts +8 -0
- package/dist/runtime/app.mjs +1 -0
- package/dist/runtime/bindModel.mjs +1 -0
- package/dist/runtime/defaults.d.mts +11 -0
- package/dist/runtime/defaults.mjs +1 -0
- package/dist/runtime/define/initialComputed.mjs +1 -0
- package/dist/runtime/define/options.mjs +1 -0
- package/dist/runtime/define/optionsApi.mjs +1 -0
- package/dist/runtime/define/props.mjs +1 -0
- package/dist/runtime/define/scopedSlotOptions.mjs +1 -0
- package/dist/runtime/define/setupResult.mjs +1 -0
- package/dist/runtime/define.d.mts +105 -0
- package/dist/runtime/define.mjs +1 -0
- package/dist/runtime/diff.mjs +1 -0
- package/dist/runtime/disposables.d.mts +31 -0
- package/dist/runtime/disposables.mjs +1 -0
- package/dist/runtime/elementIntersectionObserver.d.mts +26 -0
- package/dist/runtime/elementIntersectionObserver.mjs +1 -0
- package/dist/runtime/emit.mjs +1 -0
- package/dist/runtime/hooks/base.d.mts +27 -0
- package/dist/runtime/hooks/base.mjs +1 -0
- package/dist/runtime/hooks/register.d.mts +30 -0
- package/dist/runtime/hooks/register.mjs +1 -0
- package/dist/runtime/hooks/vue.d.mts +53 -0
- package/dist/runtime/hooks/vue.mjs +1 -0
- package/dist/runtime/hooks.d.mts +4 -0
- package/dist/runtime/index.d.mts +47 -0
- package/dist/runtime/internal.mjs +1 -0
- package/dist/runtime/intersectionObserver.d.mts +14 -0
- package/dist/runtime/intersectionObserver.mjs +1 -0
- package/dist/runtime/layoutBridge.d.mts +59 -0
- package/dist/runtime/layoutBridge.mjs +1 -0
- package/dist/runtime/layoutComponentMatcher.mjs +1 -0
- package/dist/runtime/nativeBridge.mjs +1 -0
- package/dist/runtime/noSetData.d.mts +5 -0
- package/dist/runtime/noSetData.mjs +1 -0
- package/dist/runtime/pageEnvironment.d.mts +50 -0
- package/dist/runtime/pageEnvironment.mjs +1 -0
- package/dist/runtime/pageLayout.d.mts +26 -0
- package/dist/runtime/pageLayout.mjs +1 -0
- package/dist/runtime/pageScroll.d.mts +29 -0
- package/dist/runtime/pageScroll.mjs +1 -0
- package/dist/runtime/platform.mjs +1 -0
- package/dist/runtime/provide.d.mts +59 -0
- package/dist/runtime/provide.mjs +1 -0
- package/dist/runtime/provideContext.mjs +1 -0
- package/dist/runtime/provideStore.d.mts +7 -0
- package/dist/runtime/provideStore.mjs +1 -0
- package/dist/runtime/pullDownRefresh.d.mts +12 -0
- package/dist/runtime/pullDownRefresh.mjs +1 -0
- package/dist/runtime/register/app.d.mts +14 -0
- package/dist/runtime/register/app.mjs +1 -0
- package/dist/runtime/register/component/features.mjs +1 -0
- package/dist/runtime/register/component/lifecycle/optionalHooks.mjs +1 -0
- package/dist/runtime/register/component/lifecycle/platform.mjs +1 -0
- package/dist/runtime/register/component/lifecycle.mjs +1 -0
- package/dist/runtime/register/component/methods.mjs +1 -0
- package/dist/runtime/register/component/options.mjs +1 -0
- package/dist/runtime/register/component/props.mjs +1 -0
- package/dist/runtime/register/component/registerDefinition.mjs +1 -0
- package/dist/runtime/register/component.d.mts +15 -0
- package/dist/runtime/register/component.mjs +1 -0
- package/dist/runtime/register/inline.d.mts +15 -0
- package/dist/runtime/register/inline.mjs +1 -0
- package/dist/runtime/register/runtimeInstance/methodBridge.mjs +1 -0
- package/dist/runtime/register/runtimeInstance/provideContext.mjs +1 -0
- package/dist/runtime/register/runtimeInstance/setupContext.mjs +1 -0
- package/dist/runtime/register/runtimeInstance/setupPhase.mjs +1 -0
- package/dist/runtime/register/runtimeInstance/utils.mjs +1 -0
- package/dist/runtime/register/runtimeInstance.d.mts +26 -0
- package/dist/runtime/register/runtimeInstance.mjs +1 -0
- package/dist/runtime/register/setDataFrequencyWarning.mjs +1 -0
- package/dist/runtime/register/setup.d.mts +11 -0
- package/dist/runtime/register/setup.mjs +1 -0
- package/dist/runtime/register/snapshot.mjs +1 -0
- package/dist/runtime/register/watch.d.mts +12 -0
- package/dist/runtime/register/watch.mjs +1 -0
- package/dist/runtime/register.d.mts +5 -0
- package/dist/runtime/scopedSlots.mjs +1 -0
- package/dist/runtime/selectorQuery.d.mts +54 -0
- package/dist/runtime/selectorQuery.mjs +1 -0
- package/dist/runtime/setupTracking.mjs +1 -0
- package/dist/{template-DE8e5dj_.d.mts → runtime/template.d.mts} +1 -1
- package/dist/runtime/template.mjs +1 -0
- package/dist/runtime/templateRefTypes.d.mts +7 -0
- package/dist/runtime/templateRefs/helpers.mjs +1 -0
- package/dist/runtime/templateRefs.d.mts +11 -0
- package/dist/runtime/templateRefs.mjs +1 -0
- package/dist/runtime/types/core.d.mts +35 -0
- package/dist/runtime/types/miniprogram.d.mts +80 -0
- package/dist/runtime/types/miniprogramHost.d.mts +44 -0
- package/dist/runtime/types/miniprogramHostSources.d.mts +112 -0
- package/dist/runtime/types/options.d.mts +136 -0
- package/dist/runtime/types/props/propTypes.d.mts +79 -0
- package/dist/runtime/types/props/router.d.mts +51 -0
- package/dist/runtime/types/props/setup.d.mts +96 -0
- package/dist/runtime/types/props.d.mts +4 -0
- package/dist/runtime/types/runtime.d.mts +59 -0
- package/dist/runtime/types/setData.d.mts +220 -0
- package/dist/runtime/types.d.mts +28 -0
- package/dist/runtime/uniAppHost.d.mts +8 -0
- package/dist/runtime/uniAppHost.mjs +1 -0
- package/dist/runtime/updatePerformance.d.mts +13 -0
- package/dist/runtime/updatePerformance.mjs +1 -0
- package/dist/runtime/use.d.mts +13 -0
- package/dist/runtime/use.mjs +1 -0
- package/dist/runtime/vueCompat/context.d.mts +8 -0
- package/dist/runtime/vueCompat/context.mjs +1 -0
- package/dist/runtime/vueCompat/model.d.mts +30 -0
- package/dist/runtime/vueCompat/model.mjs +1 -0
- package/dist/runtime/vueCompat/router.d.mts +28 -0
- package/dist/runtime/vueCompat/router.mjs +1 -0
- package/dist/runtime/vueCompat/templateRef.d.mts +9 -0
- package/dist/runtime/vueCompat/templateRef.mjs +1 -0
- package/dist/runtime/vueCompat.d.mts +5 -0
- package/dist/scheduler.d.mts +4 -0
- package/dist/scheduler.mjs +1 -0
- package/dist/store/actions.mjs +1 -0
- package/dist/store/base.mjs +1 -0
- package/dist/store/define/optionsStyle.mjs +1 -0
- package/dist/store/define/setupStyle.mjs +1 -0
- package/dist/store/define/shared.mjs +1 -0
- package/dist/store/define.d.mts +26 -0
- package/dist/store/define.mjs +1 -0
- package/dist/store/manager.d.mts +8 -0
- package/dist/store/manager.mjs +1 -0
- package/dist/store/storeToRefs.d.mts +13 -0
- package/dist/store/storeToRefs.mjs +1 -0
- package/dist/store/types.d.mts +70 -0
- package/dist/store/utils.mjs +1 -0
- package/dist/store.d.mts +4 -1
- package/dist/store.mjs +1 -1
- package/dist/utils.mjs +1 -0
- package/dist/version.d.mts +4 -0
- package/dist/version.mjs +1 -0
- package/dist/vue-augment.d.mts +6 -0
- package/dist/vue-demi.d.mts +67 -7
- package/dist/vue-demi.mjs +1 -1
- package/dist/vue-types.d.mts +18 -0
- package/dist/weappIntrinsicElements/base.d.mts +22 -0
- package/dist/weappIntrinsicElements/elements/ad-custom.d.mts +13 -0
- package/dist/weappIntrinsicElements/elements/ad.d.mts +16 -0
- package/dist/weappIntrinsicElements/elements/audio.d.mts +20 -0
- package/dist/weappIntrinsicElements/elements/block.d.mts +8 -0
- package/dist/weappIntrinsicElements/elements/button.d.mts +40 -0
- package/dist/weappIntrinsicElements/elements/camera.d.mts +18 -0
- package/dist/weappIntrinsicElements/elements/canvas.d.mts +18 -0
- package/dist/weappIntrinsicElements/elements/checkbox-group.d.mts +13 -0
- package/dist/weappIntrinsicElements/elements/checkbox.d.mts +13 -0
- package/dist/weappIntrinsicElements/elements/cover-image.d.mts +10 -0
- package/dist/weappIntrinsicElements/elements/cover-view.d.mts +10 -0
- package/dist/weappIntrinsicElements/elements/editor.d.mts +22 -0
- package/dist/weappIntrinsicElements/elements/form.d.mts +16 -0
- package/dist/weappIntrinsicElements/elements/functional-page-navigator.d.mts +15 -0
- package/dist/weappIntrinsicElements/elements/icon.d.mts +12 -0
- package/dist/weappIntrinsicElements/elements/image.d.mts +18 -0
- package/dist/weappIntrinsicElements/elements/import.d.mts +10 -0
- package/dist/weappIntrinsicElements/elements/include.d.mts +10 -0
- package/dist/weappIntrinsicElements/elements/input.d.mts +47 -0
- package/dist/weappIntrinsicElements/elements/keyboard-accessory.d.mts +8 -0
- package/dist/weappIntrinsicElements/elements/label.d.mts +10 -0
- package/dist/weappIntrinsicElements/elements/live-player.d.mts +35 -0
- package/dist/weappIntrinsicElements/elements/live-pusher.d.mts +57 -0
- package/dist/weappIntrinsicElements/elements/map.d.mts +105 -0
- package/dist/weappIntrinsicElements/elements/match-media.d.mts +16 -0
- package/dist/weappIntrinsicElements/elements/movable-area.d.mts +26 -0
- package/dist/weappIntrinsicElements/elements/movable-view.d.mts +26 -0
- package/dist/weappIntrinsicElements/elements/navigation-bar.d.mts +15 -0
- package/dist/weappIntrinsicElements/elements/navigator.d.mts +25 -0
- package/dist/weappIntrinsicElements/elements/official-account.d.mts +13 -0
- package/dist/weappIntrinsicElements/elements/open-data.d.mts +15 -0
- package/dist/weappIntrinsicElements/elements/page-container.d.mts +25 -0
- package/dist/weappIntrinsicElements/elements/page-meta.d.mts +23 -0
- package/dist/weappIntrinsicElements/elements/picker-view-column.d.mts +18 -0
- package/dist/weappIntrinsicElements/elements/picker-view.d.mts +18 -0
- package/dist/weappIntrinsicElements/elements/picker.d.mts +23 -0
- package/dist/weappIntrinsicElements/elements/progress.d.mts +21 -0
- package/dist/weappIntrinsicElements/elements/radio-group.d.mts +13 -0
- package/dist/weappIntrinsicElements/elements/radio.d.mts +13 -0
- package/dist/weappIntrinsicElements/elements/rich-text.d.mts +17 -0
- package/dist/weappIntrinsicElements/elements/scroll-view.d.mts +68 -0
- package/dist/weappIntrinsicElements/elements/share-element.d.mts +18 -0
- package/dist/weappIntrinsicElements/elements/slider.d.mts +23 -0
- package/dist/weappIntrinsicElements/elements/slot.d.mts +10 -0
- package/dist/weappIntrinsicElements/elements/swiper-item.d.mts +42 -0
- package/dist/weappIntrinsicElements/elements/swiper.d.mts +42 -0
- package/dist/weappIntrinsicElements/elements/switch.d.mts +14 -0
- package/dist/weappIntrinsicElements/elements/template.d.mts +12 -0
- package/dist/weappIntrinsicElements/elements/text.d.mts +15 -0
- package/dist/weappIntrinsicElements/elements/textarea.d.mts +40 -0
- package/dist/weappIntrinsicElements/elements/video.d.mts +71 -0
- package/dist/weappIntrinsicElements/elements/view.d.mts +13 -0
- package/dist/weappIntrinsicElements/elements/voip-room.d.mts +14 -0
- package/dist/weappIntrinsicElements/elements/web-view.d.mts +13 -0
- package/dist/weappIntrinsicElements.d.mts +153 -0
- package/package.json +6 -6
- package/dist/base-BxKbbKVO.mjs +0 -1
- package/dist/computed-Xoi9XEUx.mjs +0 -1
- package/dist/dev/base-CYkvI7w8.mjs.map +0 -1
- package/dist/dev/computed-BxRsUJgi.mjs.map +0 -1
- package/dist/dev/ref-DRZC3Kc5.mjs +0 -695
- package/dist/dev/ref-DRZC3Kc5.mjs.map +0 -1
- package/dist/dev/router-D0JQfgyN.mjs +0 -754
- package/dist/dev/router-D0JQfgyN.mjs.map +0 -1
- package/dist/dev/router.mjs.map +0 -1
- package/dist/dev/store-HNsiQJ4d.mjs +0 -479
- package/dist/dev/store-HNsiQJ4d.mjs.map +0 -1
- package/dist/dev/template-n_iVr0ey.mjs.map +0 -1
- package/dist/dev/templateRef-BLnYcEH0.mjs +0 -6439
- package/dist/dev/templateRef-BLnYcEH0.mjs.map +0 -1
- package/dist/dev/toRefs-D06VmFK2.mjs.map +0 -1
- package/dist/dev/watch-jrgL5ald.mjs +0 -445
- package/dist/dev/watch-jrgL5ald.mjs.map +0 -1
- package/dist/index-BiHILcmb.d.mts +0 -1215
- package/dist/index-CCET_bCY.d.mts +0 -111
- package/dist/ref-D37CknuD.mjs +0 -1
- package/dist/router-D4W4lEXM.mjs +0 -1
- package/dist/store-eHrHBQiv.mjs +0 -1
- package/dist/template-CNzlwH-E.mjs +0 -1
- package/dist/templateRef-DOTHWzZ5.mjs +0 -1
- package/dist/toRefs-CoytPyo0.mjs +0 -1
- package/dist/traverse-B4Ez44Gd.d.mts +0 -108
- package/dist/vue-types-B3N60cGV.d.mts +0 -757
- package/dist/watch-Bbd-gmEg.mjs +0 -1
- package/dist/weappIntrinsicElements-BgDtC53_.d.mts +0 -1257
|
@@ -1,1215 +0,0 @@
|
|
|
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-BgDtC53_.mjs";
|
|
2
|
-
import { $ as triggerRef, $n as AlipayMiniProgramHostNamespace, $t as NativeTypeHint, A as watchPostEffect, An as HostMiniProgramIntersectionObserverOptions, At as unref, B as WatchOptions, Bn as HostMiniProgramPageTrivialInstance, C as ExtractMethods, Cn as HostMiniProgramComponentMethodOption, Ct as MaybeRefOrGetter, D as ModelBindingPayload, Dn as HostMiniProgramComponentTrivialInstance, Dt as isRef, E as ModelBindingOptions, En as HostMiniProgramComponentShortProperty, Et as customRef, F as OnCleanup, Fn as HostMiniProgramNodesRefFields, G as WatchStopHandle, Gn as HostMiniProgramScrollOffsetResult, Gt as ExtractPropTypes$1, H as WatchSource, Hn as HostMiniProgramRedirectToOption, Ht as WevuTypedRouterRouteMap, I as WatchCallback, In as HostMiniProgramPageLifetime, J as ToRefs, Jn as HostMiniProgramSwitchTabOption, Jt as InferNativeProps, K as getDeepWatchStrategy, Kn as HostMiniProgramSelectorQuery, Kt as ExtractPublicPropTypes, L as WatchEffect, Ln as HostMiniProgramPageNotFoundOptions, M as MapSources, Mn as HostMiniProgramMemoryWarningResult, Mt as MiniProgramRouterReLaunchOption, N as MaybeUndefined, Nn as HostMiniProgramNavigateToOption, Nt as MiniProgramRouterRedirectToOption, O as watch, On as HostMiniProgramComponentTrivialOption, Ot as ref, P as MultiWatchSources, Pn as HostMiniProgramNodesRef, Pt as MiniProgramRouterSwitchTabOption, Q as shallowRef, Qn as HostMiniProgramUnhandledRejectionResult, Qt as NativePropsOptions, R as WatchEffectOptions, Rn as HostMiniProgramPageResizeOption, S as ExtractComputed, Sn as HostMiniProgramComponentInstance, St as MaybeRef, T as ModelBinding, Tn as HostMiniProgramComponentPropertyValue, Tt as ShallowRef, U as WatchSourceValue, Un as HostMiniProgramRouter, Ut as ComponentPropsOptions, V as WatchScheduler, Vn as HostMiniProgramReLaunchOption, W as WatchSources, Wn as HostMiniProgramSaveExitState, Wt as ExtractDefaultPropTypes, X as toRefs, Xn as HostMiniProgramThemeChangeResult, Xt as InferProps, Y as toRef, Yn as HostMiniProgramTabItemTapOption, Yt as InferPropType, Z as isShallowRef, Zn as HostMiniProgramTriggerEventOptions, Zt as NativePropType, _ as RuntimeApp, _n as HostMiniProgramBoundingClientRectResult, _r as WechatMiniProgramHostNamespace, _t as WritableComputedRef, a as NativeComponent, an as MiniProgramAppOptions, ar as MiniProgramHostNamespace, at as batch, b as ComponentPublicInstance, bn as HostMiniProgramComponentBehaviorOptions, bt as CustomRefOptions, c as ShallowUnwrapRef, cn as MiniProgramComponentOptions, cr as MiniProgramHostSourceRegistry, ct as endBatch, d as SetupContext, dn as MiniProgramInstance, dr as MiniProgramPlatformHostSourceRegistry, dt as startBatch, en as NativeTypedProperty, er as AlipayMiniProgramHostSourceContract, et as isProxy, f as SetupContextNativeInstance, fn as MiniProgramPageLifetimes, fr as MiniProgramRuntimeHostNamespaceBySource, ft as stop, g as InternalRuntimeStateFields, gn as HostMiniProgramBehaviorIdentifier, gr as TtMiniProgramHostSourceContract, gt as WritableComputedOptions, h as InternalRuntimeState, hn as HostMiniProgramAppTrivialInstance, hr as TtMiniProgramHostNamespace, ht as ComputedSetter, i as DefineComponent, in as MiniProgramAdapter, ir as DouyinMiniProgramHostSourceContract, it as EffectScope, j as watchSyncEffect, jn as HostMiniProgramLaunchOptions, jt as MiniProgramRouterNavigateToOption, k as watchEffect, kn as HostMiniProgramIntersectionObserver, kt as toValue, l as VNode, ln as MiniProgramComponentPropertyValue, lr as MiniProgramPlatformHostNamespaceBySource, lt as getCurrentScope, m as AppConfig, mn as HostMiniProgramAppOptions, mr as MiniProgramRuntimeHostSourceRegistry, mt as ComputedRef, n as ComponentCustomProps, nn as PropOptions, nr as DefaultMiniProgramHostSourceContract, nt as readonly, o as ObjectDirective, on as MiniProgramBehaviorIdentifier, or as MiniProgramHostNamespaceBySource, ot as effect, p as SetupFunction, pn as HostMiniProgramAddToFavoritesOption, pr as MiniProgramRuntimeHostSourceName, pt as ComputedGetter, q as setDeepWatchStrategy, qn as HostMiniProgramShareAppMessageOption, qt as InferNativePropType, r as ComponentOptionsMixin, rn as PropType, rr as DouyinMiniProgramHostNamespace, rt as shallowReadonly, s as PublicProps, sn as MiniProgramComponentInstance, sr as MiniProgramHostSourceName, st as effectScope, t as AllowedComponentProps, tn as PropConstructor, tr as DefaultMiniProgramHostNamespace, tt as isReadonly, u as VNodeProps, un as MiniProgramComponentRawOptions, ur as MiniProgramPlatformHostSourceName, ut as onScopeDispose, v as RuntimeInstance, vn as HostMiniProgramComponentAllFullProperty, vr as WechatMiniProgramHostSourceContract, vt as computed, w as MethodDefinitions, wn as HostMiniProgramComponentPropertyOption, wt as Ref, x as ComputedDefinitions, xn as HostMiniProgramComponentEmptyArray, xt as CustomRefSource, y as WevuPlugin, yn as HostMiniProgramComponentAllProperty, yt as CustomRefFactory, z as WatchMultiSources, zn as HostMiniProgramPageScrollOption, zt as SetupContextRouter } from "./vue-types-B3N60cGV.mjs";
|
|
3
|
-
import { _ as removeMutationRecorder, a as markRaw, c as isShallowReactive, d as prelinkReactiveTree, f as touchReactive, g as addMutationRecorder, h as MutationRecord, i as isReactive, l as shallowReactive, m as MutationOp, n as getReactiveVersion, o as reactive, p as MutationKind, r as isRaw, s as toRaw, t as traverse, u as PrelinkReactiveTreeOptions, v as nextTick } from "./traverse-B4Ez44Gd.mjs";
|
|
4
|
-
import { n as normalizeStyle, r as resolvePropValue, t as normalizeClass } from "./template-DE8e5dj_.mjs";
|
|
5
|
-
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-CCET_bCY.mjs";
|
|
6
|
-
//#region src/runtime/types/setData.d.ts
|
|
7
|
-
interface SetDataSnapshotOptions {
|
|
8
|
-
/**
|
|
9
|
-
* 开发态高频 setData 告警。
|
|
10
|
-
*
|
|
11
|
-
* - `undefined`:默认关闭(可通过 `weapp.wevu.preset: 'performance'` 自动开启)
|
|
12
|
-
* - `false`:关闭告警
|
|
13
|
-
* - `true`:启用默认阈值(默认仅开发态生效)
|
|
14
|
-
* - `object`:自定义阈值与开关
|
|
15
|
-
*/
|
|
16
|
-
highFrequencyWarning?: boolean | {
|
|
17
|
-
/**
|
|
18
|
-
* 是否启用告警。
|
|
19
|
-
* @default true
|
|
20
|
-
*/
|
|
21
|
-
enabled?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* 是否仅在开发态生效。
|
|
24
|
-
* @default true
|
|
25
|
-
*/
|
|
26
|
-
devOnly?: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* 统计窗口(毫秒)。
|
|
29
|
-
* @default 1000
|
|
30
|
-
*/
|
|
31
|
-
sampleWindowMs?: number;
|
|
32
|
-
/**
|
|
33
|
-
* 窗口内超过该次数触发告警。
|
|
34
|
-
* @default 30
|
|
35
|
-
*/
|
|
36
|
-
maxCalls?: number;
|
|
37
|
-
/**
|
|
38
|
-
* 告警冷却时间(毫秒),避免刷屏。
|
|
39
|
-
* @default 5000
|
|
40
|
-
*/
|
|
41
|
-
coolDownMs?: number;
|
|
42
|
-
/**
|
|
43
|
-
* 是否在检测到 `onPageScroll` 回调内调用 setData 时输出专项告警。
|
|
44
|
-
* @default true
|
|
45
|
-
*/
|
|
46
|
-
warnOnPageScroll?: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* `onPageScroll` 专项告警冷却时间(毫秒)。
|
|
49
|
-
* @default 2000
|
|
50
|
-
*/
|
|
51
|
-
pageScrollCoolDownMs?: number;
|
|
52
|
-
};
|
|
53
|
-
/**
|
|
54
|
-
* setData 策略:
|
|
55
|
-
* - diff:全量快照 + diff(默认,兼容性最好)
|
|
56
|
-
* - patch:按变更路径增量产出 payload(性能更好;在共享引用等场景会自动回退 diff)
|
|
57
|
-
*/
|
|
58
|
-
strategy?: 'diff' | 'patch';
|
|
59
|
-
/**
|
|
60
|
-
* 仅下发指定的顶层字段(包含 data/setup 返回值与 computed)。
|
|
61
|
-
* 若为空则默认下发所有字段。
|
|
62
|
-
*/
|
|
63
|
-
pick?: string[];
|
|
64
|
-
/**
|
|
65
|
-
* 排除指定的顶层字段(包含 data/setup 返回值与 computed)。
|
|
66
|
-
*/
|
|
67
|
-
omit?: string[];
|
|
68
|
-
/**
|
|
69
|
-
* 是否将 computed 的结果参与 setData(默认 true)。
|
|
70
|
-
*/
|
|
71
|
-
includeComputed?: boolean;
|
|
72
|
-
/**
|
|
73
|
-
* 页面/组件处于后台态(onHide 之后)时,是否挂起 setData 下发。
|
|
74
|
-
*
|
|
75
|
-
* - true:后台态仅合并最新 payload,待 onShow 后一次性 flush
|
|
76
|
-
* - false:保持默认行为,后台态也继续 setData
|
|
77
|
-
*
|
|
78
|
-
* @default false
|
|
79
|
-
*/
|
|
80
|
-
suspendWhenHidden?: boolean;
|
|
81
|
-
/**
|
|
82
|
-
* patch 模式阈值:当本轮变更路径数量超过该值时,自动回退到 diff。
|
|
83
|
-
* 说明:大量路径变更时,全量快照 diff 往往更快/更小。
|
|
84
|
-
*/
|
|
85
|
-
maxPatchKeys?: number;
|
|
86
|
-
/**
|
|
87
|
-
* patch 模式阈值:当本轮 payload 估算字节数超过该值时,自动回退到 diff。
|
|
88
|
-
* 说明:该估算基于 `JSON.stringify(payload).length`,仅用于启发式降级。
|
|
89
|
-
*/
|
|
90
|
-
maxPayloadBytes?: number;
|
|
91
|
-
/**
|
|
92
|
-
* patch 模式优化:当同一父路径下存在多个子路径变更时,合并为父路径整体下发。
|
|
93
|
-
*
|
|
94
|
-
* 例如:`a.b` 与 `a.c` 同时变更,且 `mergeSiblingThreshold = 2` 时,会下发 `a`。
|
|
95
|
-
*
|
|
96
|
-
* 注意:当子路径包含删除(null)时,为避免删除语义不一致,将不会触发合并。
|
|
97
|
-
*/
|
|
98
|
-
mergeSiblingThreshold?: number;
|
|
99
|
-
/**
|
|
100
|
-
* 同级合并的“负优化”防护:若合并后的父路径估算体积大于子路径体积之和 * ratio,则不合并。
|
|
101
|
-
*/
|
|
102
|
-
mergeSiblingMaxInflationRatio?: number;
|
|
103
|
-
/**
|
|
104
|
-
* 同级合并的“负优化”防护:若父路径估算体积超过该值,则不合并。
|
|
105
|
-
*/
|
|
106
|
-
mergeSiblingMaxParentBytes?: number;
|
|
107
|
-
/**
|
|
108
|
-
* 是否在父值为数组时跳过同级合并(默认 true)。
|
|
109
|
-
*/
|
|
110
|
-
mergeSiblingSkipArray?: boolean;
|
|
111
|
-
/**
|
|
112
|
-
* patch 模式优化:computed 变更对比策略。
|
|
113
|
-
*
|
|
114
|
-
* - reference:仅 `Object.is` 比较(最快,可能会多下发)
|
|
115
|
-
* - shallow:仅比较数组/对象第一层(折中)
|
|
116
|
-
* - deep:深比较(可能较慢,适合小对象);会受 `computedCompareMaxDepth/maxKeys` 限制
|
|
117
|
-
*/
|
|
118
|
-
computedCompare?: 'reference' | 'shallow' | 'deep';
|
|
119
|
-
/**
|
|
120
|
-
* computed 深比较最大深度(仅在 `computedCompare = "deep"` 时生效)。
|
|
121
|
-
*/
|
|
122
|
-
computedCompareMaxDepth?: number;
|
|
123
|
-
/**
|
|
124
|
-
* computed 深比较最多比较 key 数(仅在 `computedCompare = "deep"` 时生效)。
|
|
125
|
-
*/
|
|
126
|
-
computedCompareMaxKeys?: number;
|
|
127
|
-
/**
|
|
128
|
-
* 限制 patch 模式的预链接(prelinkReactiveTree)开销:最多向下遍历的深度(root 为 0)。
|
|
129
|
-
*/
|
|
130
|
-
prelinkMaxDepth?: number;
|
|
131
|
-
/**
|
|
132
|
-
* 限制 patch 模式的预链接(prelinkReactiveTree)开销:最多索引的节点数。
|
|
133
|
-
*/
|
|
134
|
-
prelinkMaxKeys?: number;
|
|
135
|
-
/**
|
|
136
|
-
* setData 调试信息回调(用于观测 patch 命中率/回退原因/payload 大小)。
|
|
137
|
-
*/
|
|
138
|
-
debug?: (info: SetDataDebugInfo) => void;
|
|
139
|
-
/**
|
|
140
|
-
* 内建诊断日志开关(默认 off)。
|
|
141
|
-
*
|
|
142
|
-
* - off:关闭内建日志
|
|
143
|
-
* - fallback:仅在回退 diff / 超阈值时输出
|
|
144
|
-
* - always:每次 flush 都输出
|
|
145
|
-
*/
|
|
146
|
-
diagnostics?: 'off' | 'fallback' | 'always';
|
|
147
|
-
/**
|
|
148
|
-
* 疑似运行时更新循环诊断。
|
|
149
|
-
*
|
|
150
|
-
* 在短时间内连续触发 setData flush 时输出告警,帮助定位页面/组件、
|
|
151
|
-
* 调度模式、patch 信号和 computed dirty 状态。
|
|
152
|
-
*/
|
|
153
|
-
loopWarning?: boolean | {
|
|
154
|
-
/**
|
|
155
|
-
* 是否启用告警。
|
|
156
|
-
* @default true
|
|
157
|
-
*/
|
|
158
|
-
enabled?: boolean;
|
|
159
|
-
/**
|
|
160
|
-
* 统计窗口(毫秒)。
|
|
161
|
-
* @default 1000
|
|
162
|
-
*/
|
|
163
|
-
sampleWindowMs?: number;
|
|
164
|
-
/**
|
|
165
|
-
* 窗口内超过该次数触发告警。
|
|
166
|
-
* @default 50
|
|
167
|
-
*/
|
|
168
|
-
maxFlushes?: number;
|
|
169
|
-
/**
|
|
170
|
-
* 告警冷却时间(毫秒),避免刷屏。
|
|
171
|
-
* @default 5000
|
|
172
|
-
*/
|
|
173
|
-
coolDownMs?: number;
|
|
174
|
-
};
|
|
175
|
-
/**
|
|
176
|
-
* debug 触发时机:
|
|
177
|
-
* - fallback:仅在回退 diff / 超阈值时触发(默认)
|
|
178
|
-
* - always:每次 flush 都触发
|
|
179
|
-
*/
|
|
180
|
-
debugWhen?: 'fallback' | 'always';
|
|
181
|
-
/**
|
|
182
|
-
* debug 采样率(0-1),用于降低 debug 频率与开销(默认 1)。
|
|
183
|
-
*/
|
|
184
|
-
debugSampleRate?: number;
|
|
185
|
-
/**
|
|
186
|
-
* patch 模式优化:当某个顶层字段下的变更路径数量过多时,直接提升为顶层字段整体替换。
|
|
187
|
-
*/
|
|
188
|
-
elevateTopKeyThreshold?: number;
|
|
189
|
-
/**
|
|
190
|
-
* setData 序列化上限:最大递归深度(root 为 0)。超过时将停止深拷贝,保留更浅层结构。
|
|
191
|
-
*/
|
|
192
|
-
toPlainMaxDepth?: number;
|
|
193
|
-
/**
|
|
194
|
-
* setData 序列化上限:最多处理的对象 key 数(累计)。超过时将停止深拷贝,保留更浅层结构。
|
|
195
|
-
*/
|
|
196
|
-
toPlainMaxKeys?: number;
|
|
197
|
-
/**
|
|
198
|
-
* 是否允许函数进入 setData 快照。
|
|
199
|
-
*
|
|
200
|
-
* @internal
|
|
201
|
-
*/
|
|
202
|
-
includeFunctions?: boolean;
|
|
203
|
-
/**
|
|
204
|
-
* 允许函数进入 setData 快照的状态路径。
|
|
205
|
-
*
|
|
206
|
-
* @internal
|
|
207
|
-
*/
|
|
208
|
-
functionPaths?: string[];
|
|
209
|
-
}
|
|
210
|
-
interface SetDataDebugInfo {
|
|
211
|
-
mode: 'patch' | 'diff';
|
|
212
|
-
reason: 'patch' | 'diff' | 'needsFullSnapshot' | 'maxPatchKeys' | 'maxPayloadBytes' | 'loopWarning';
|
|
213
|
-
pendingPatchKeys: number;
|
|
214
|
-
payloadKeys: number;
|
|
215
|
-
estimatedBytes?: number;
|
|
216
|
-
bytes?: number;
|
|
217
|
-
mergedSiblingParents?: number;
|
|
218
|
-
computedDirtyKeys?: number;
|
|
219
|
-
flushCount?: number;
|
|
220
|
-
windowMs?: number;
|
|
221
|
-
message?: string;
|
|
222
|
-
}
|
|
223
|
-
//#endregion
|
|
224
|
-
//#region src/runtime/types/options.d.ts
|
|
225
|
-
type DataOption<D extends object> = D | (() => D);
|
|
226
|
-
interface DefineComponentOptions<P extends ComponentPropsOptions = ComponentPropsOptions, D extends object = Record<string, any>, C extends ComputedDefinitions = ComputedDefinitions, M extends MethodDefinitions = MethodDefinitions, S extends Record<string, any> | void = Record<string, any> | void> extends MiniProgramComponentOptions, MiniProgramPageLifetimes {
|
|
227
|
-
/**
|
|
228
|
-
* 页面特性开关(用于按需注入 Page 事件处理函数)。
|
|
229
|
-
*
|
|
230
|
-
* 说明:小程序的部分页面事件/菜单项具有“按需派发/按需展示”特性,
|
|
231
|
-
* 只有定义了对应的 `onXXX` 方法才会触发/展示(如 `onPageScroll`、`onShareTimeline`)。
|
|
232
|
-
* 因此 wevu 需要在注册阶段(Component())就决定是否注入这些 onXXX。
|
|
233
|
-
*
|
|
234
|
-
* - 若你在 options 中显式定义了原生 `onXXX`,wevu 会自动桥接对应 hook(无需 features)。
|
|
235
|
-
* - 若你只想在 `setup()` 里使用 wevu hook(不额外写原生 `onXXX`),则通过 `features` 显式开启注入。
|
|
236
|
-
*/
|
|
237
|
-
features?: PageFeatures;
|
|
238
|
-
/**
|
|
239
|
-
* 类 Vue 的 props 定义(会被规范化为小程序 `properties`)
|
|
240
|
-
*/
|
|
241
|
-
props?: P;
|
|
242
|
-
/**
|
|
243
|
-
* 允许将运行时传入的 `undefined` props 兼容为 `null` 输入,避免小程序对已声明类型 props 报告 `null` 类型告警。
|
|
244
|
-
*
|
|
245
|
-
* 适合迁移 Vue 组件或需要兼容 `undefined -> null` 传参链路的场景;默认关闭,避免影响原生 `properties` 的严格类型语义。
|
|
246
|
-
*/
|
|
247
|
-
allowNullPropInput?: boolean;
|
|
248
|
-
/**
|
|
249
|
-
* 允许函数值作为组件 prop 通过小程序 data/properties 链路传递。
|
|
250
|
-
*
|
|
251
|
-
* - `auto` / undefined:默认由 SFC 编译器精确标记模板中的函数 prop 绑定。
|
|
252
|
-
* - `true`:手写组件或动态传参场景下全量允许函数进入快照。
|
|
253
|
-
* - `false`:关闭函数 prop 快照放行。
|
|
254
|
-
*/
|
|
255
|
-
allowFunctionProps?: boolean | 'auto';
|
|
256
|
-
watch?: Record<string, any>;
|
|
257
|
-
setup?: SetupFunction<P, D, C, M, S>;
|
|
258
|
-
/**
|
|
259
|
-
* setup 执行时机:
|
|
260
|
-
* - created:与旧行为一致(默认 defer setData 到 attached)
|
|
261
|
-
* - attached:更接近 Vue 3(props 在 attached 时已就绪)
|
|
262
|
-
*
|
|
263
|
-
* @default 'attached'
|
|
264
|
-
*/
|
|
265
|
-
setupLifecycle?: 'created' | 'attached';
|
|
266
|
-
/**
|
|
267
|
-
* 组件 data(建议使用函数返回初始值)。
|
|
268
|
-
*/
|
|
269
|
-
data?: DataOption<D>;
|
|
270
|
-
/**
|
|
271
|
-
* 组件 computed(会参与快照 diff)。
|
|
272
|
-
*/
|
|
273
|
-
computed?: C;
|
|
274
|
-
/**
|
|
275
|
-
* setData 快照控制选项(用于优化性能与 payload)。
|
|
276
|
-
*/
|
|
277
|
-
setData?: SetDataSnapshotOptions;
|
|
278
|
-
/**
|
|
279
|
-
* 组件 methods(会绑定到 public instance 上)。
|
|
280
|
-
*/
|
|
281
|
-
methods?: M;
|
|
282
|
-
/**
|
|
283
|
-
* 透传/扩展字段:允许携带其他小程序原生 Component 选项或自定义字段。
|
|
284
|
-
* 说明:为保持兼容性保留索引签名,但仍会对已知字段提供智能提示。
|
|
285
|
-
*/
|
|
286
|
-
[key: string]: any;
|
|
287
|
-
}
|
|
288
|
-
type AppSetupProps = {};
|
|
289
|
-
interface DefineAppOptions<D extends object = Record<string, any>, C extends ComputedDefinitions = ComputedDefinitions, M extends MethodDefinitions = MethodDefinitions> extends MiniProgramAppOptions {
|
|
290
|
-
watch?: Record<string, any>;
|
|
291
|
-
setup?: (props: AppSetupProps, ctx: SetupContext<D, C, M, AppSetupProps>) => Record<string, any> | void;
|
|
292
|
-
[key: string]: any;
|
|
293
|
-
}
|
|
294
|
-
interface CreateAppOptions<D extends object = Record<string, any>, C extends ComputedDefinitions = ComputedDefinitions, M extends MethodDefinitions = MethodDefinitions> extends MiniProgramAppOptions {
|
|
295
|
-
data?: DataOption<D>;
|
|
296
|
-
computed?: C;
|
|
297
|
-
methods?: M;
|
|
298
|
-
setData?: SetDataSnapshotOptions;
|
|
299
|
-
watch?: Record<string, any>;
|
|
300
|
-
setup?: (props: AppSetupProps, ctx: SetupContext<D, C, M, AppSetupProps>) => Record<string, any> | void;
|
|
301
|
-
[key: string]: any;
|
|
302
|
-
}
|
|
303
|
-
interface PageFeatures {
|
|
304
|
-
/**
|
|
305
|
-
* 启用页面滚动事件(注入 `onPageScroll`)。
|
|
306
|
-
*/
|
|
307
|
-
enableOnPageScroll?: boolean;
|
|
308
|
-
/**
|
|
309
|
-
* 启用下拉刷新事件(注入 `onPullDownRefresh`;仍需在页面配置开启 enablePullDownRefresh)。
|
|
310
|
-
*/
|
|
311
|
-
enableOnPullDownRefresh?: boolean;
|
|
312
|
-
/**
|
|
313
|
-
* 启用触底事件(注入 `onReachBottom`)。
|
|
314
|
-
*/
|
|
315
|
-
enableOnReachBottom?: boolean;
|
|
316
|
-
/**
|
|
317
|
-
* 启用路由动画完成事件(注入 `onRouteDone`)。
|
|
318
|
-
*/
|
|
319
|
-
enableOnRouteDone?: boolean;
|
|
320
|
-
/**
|
|
321
|
-
* 启用 onReady 阶段的 routeDone 兜底补发。
|
|
322
|
-
*
|
|
323
|
-
* 默认关闭:保持与微信小程序平台事件更一致的行为。
|
|
324
|
-
* 仅当个别 IDE/基础库未派发 routeDone 且业务确实依赖该时机时再开启。
|
|
325
|
-
*/
|
|
326
|
-
enableOnRouteDoneFallback?: boolean;
|
|
327
|
-
/**
|
|
328
|
-
* 启用 Tab 点击事件(注入 `onTabItemTap`)。
|
|
329
|
-
*/
|
|
330
|
-
enableOnTabItemTap?: boolean;
|
|
331
|
-
/**
|
|
332
|
-
* 启用窗口尺寸变化事件(注入 `onResize`)。
|
|
333
|
-
*/
|
|
334
|
-
enableOnResize?: boolean;
|
|
335
|
-
/**
|
|
336
|
-
* 启用“转发/分享给朋友”(注入 `onShareAppMessage`,使右上角菜单显示“转发”)。
|
|
337
|
-
*/
|
|
338
|
-
enableOnShareAppMessage?: boolean;
|
|
339
|
-
/**
|
|
340
|
-
* 启用“分享到朋友圈”(注入 `onShareTimeline`,使右上角菜单显示“分享到朋友圈”)。
|
|
341
|
-
*/
|
|
342
|
-
enableOnShareTimeline?: boolean;
|
|
343
|
-
/**
|
|
344
|
-
* 启用“收藏”(注入 `onAddToFavorites`)。
|
|
345
|
-
*/
|
|
346
|
-
enableOnAddToFavorites?: boolean;
|
|
347
|
-
/**
|
|
348
|
-
* 启用“退出状态保存”(注入 `onSaveExitState`)。
|
|
349
|
-
*/
|
|
350
|
-
enableOnSaveExitState?: boolean;
|
|
351
|
-
}
|
|
352
|
-
//#endregion
|
|
353
|
-
//#region src/runtime/types.d.ts
|
|
354
|
-
interface WevuGlobalComponents {}
|
|
355
|
-
interface WevuGlobalDirectives {}
|
|
356
|
-
interface GlobalComponents extends WevuGlobalComponents {}
|
|
357
|
-
interface GlobalDirectives extends WevuGlobalDirectives {}
|
|
358
|
-
interface TemplateRefs {}
|
|
359
|
-
interface TemplateRefValue {
|
|
360
|
-
selector: string;
|
|
361
|
-
boundingClientRect: (cb?: (value: HostMiniProgramBoundingClientRectResult | null) => void) => Promise<HostMiniProgramBoundingClientRectResult | null>;
|
|
362
|
-
scrollOffset: (cb?: (value: HostMiniProgramScrollOffsetResult | null) => void) => Promise<HostMiniProgramScrollOffsetResult | null>;
|
|
363
|
-
fields: (fields: HostMiniProgramNodesRefFields, cb?: (value: any) => void) => Promise<any | null>;
|
|
364
|
-
node: (cb?: (value: any) => void) => Promise<any | null>;
|
|
365
|
-
}
|
|
366
|
-
type MiniProgramTemplateRefValue = TemplateRefValue;
|
|
367
|
-
//#endregion
|
|
368
|
-
//#region src/runtime/templateRefTypes.d.ts
|
|
369
|
-
type MiniProgramTemplateRefElements = { [K in keyof MiniProgramIntrinsicElements]: TemplateRefValue; };
|
|
370
|
-
declare global {
|
|
371
|
-
interface HTMLElementTagNameMap extends MiniProgramTemplateRefElements {}
|
|
372
|
-
}
|
|
373
|
-
//#endregion
|
|
374
|
-
//#region src/vue-augment.d.ts
|
|
375
|
-
declare module '@vue/runtime-core' {
|
|
376
|
-
interface GlobalComponents extends WevuGlobalComponents {}
|
|
377
|
-
interface GlobalDirectives extends WevuGlobalDirectives {}
|
|
378
|
-
}
|
|
379
|
-
//#endregion
|
|
380
|
-
//#region src/runtime/app.d.ts
|
|
381
|
-
declare function createApp<D extends object, C extends ComputedDefinitions, M extends MethodDefinitions>(options: CreateAppOptions<D, C, M>): RuntimeApp<D, C, M>;
|
|
382
|
-
//#endregion
|
|
383
|
-
//#region src/runtime/defaults.d.ts
|
|
384
|
-
interface WevuDefaults {
|
|
385
|
-
app?: Partial<CreateAppOptions<any, any, any>>;
|
|
386
|
-
component?: Partial<DefineComponentOptions<any, any, any, any>>;
|
|
387
|
-
}
|
|
388
|
-
declare function setWevuDefaults(next: WevuDefaults): void;
|
|
389
|
-
declare function resetWevuDefaults(): void;
|
|
390
|
-
//#endregion
|
|
391
|
-
//#region src/runtime/register/inline.d.ts
|
|
392
|
-
interface InlineExpressionEntry {
|
|
393
|
-
keys: string[];
|
|
394
|
-
indexKeys?: string[];
|
|
395
|
-
scopeResolvers?: Array<InlineExpressionScopeResolver | ((ctx: any, scope: Record<string, any>, event: any) => any) | undefined>;
|
|
396
|
-
fn: (ctx: any, scope: Record<string, any>, event: any) => any;
|
|
397
|
-
}
|
|
398
|
-
interface InlineExpressionScopeResolver {
|
|
399
|
-
type: 'for-item';
|
|
400
|
-
path: string;
|
|
401
|
-
indexKey: string;
|
|
402
|
-
}
|
|
403
|
-
type InlineExpressionMap = Record<string, InlineExpressionEntry>;
|
|
404
|
-
//#endregion
|
|
405
|
-
//#region src/runtime/define.d.ts
|
|
406
|
-
/**
|
|
407
|
-
* defineComponent 返回的组件定义描述,用于手动注册或高级用法。
|
|
408
|
-
*/
|
|
409
|
-
interface ComponentDefinition<D extends object, C extends ComputedDefinitions, M extends MethodDefinitions> {
|
|
410
|
-
/**
|
|
411
|
-
* 内部 runtime app(高级能力使用),不对外暴露正式 API。
|
|
412
|
-
* @internal
|
|
413
|
-
*/
|
|
414
|
-
__wevu_runtime: RuntimeApp<D, C, M>;
|
|
415
|
-
/**
|
|
416
|
-
* 内部选项快照(高级能力使用),包含 data/computed/methods 等。
|
|
417
|
-
* @internal
|
|
418
|
-
*/
|
|
419
|
-
__wevu_options: {
|
|
420
|
-
data: () => D;
|
|
421
|
-
computed: C;
|
|
422
|
-
methods: M;
|
|
423
|
-
setData: SetDataSnapshotOptions | undefined;
|
|
424
|
-
watch: Record<string, any> | undefined;
|
|
425
|
-
setup: ((props: any, ctx: any) => any) | undefined;
|
|
426
|
-
mpOptions: MiniProgramComponentRawOptions;
|
|
427
|
-
};
|
|
428
|
-
}
|
|
429
|
-
type SetupBindings<S> = Exclude<S, void> extends never ? Record<string, never> : Exclude<S, void>;
|
|
430
|
-
type ResolveProps<P> = P extends ComponentPropsOptions ? InferProps<P> : P;
|
|
431
|
-
interface WevuComponentConstructor<Props, RawBindings, D extends object, C extends ComputedDefinitions, M extends MethodDefinitions> {
|
|
432
|
-
new (): ComponentPublicInstance<D, C, M, Props> & ShallowUnwrapRef<RawBindings>;
|
|
433
|
-
}
|
|
434
|
-
type WevuDefinedComponent<PropsOrPropOptions, RawBindings, D extends object, C extends ComputedDefinitions, M extends MethodDefinitions> = DefineComponent<PropsOrPropOptions, RawBindings, D, C, M> & ComponentDefinition<D, C, M>;
|
|
435
|
-
interface SetupContextWithTypeProps<TypeProps> {
|
|
436
|
-
props: TypeProps;
|
|
437
|
-
[key: string]: any;
|
|
438
|
-
}
|
|
439
|
-
type SetupFunctionWithTypeProps<TypeProps> = (props: TypeProps, ctx: SetupContextWithTypeProps<TypeProps>) => Record<string, any> | void;
|
|
440
|
-
interface DefineComponentTypePropsOptions<TypeProps> {
|
|
441
|
-
__typeProps: TypeProps;
|
|
442
|
-
setup?: SetupFunctionWithTypeProps<TypeProps>;
|
|
443
|
-
[key: string]: any;
|
|
444
|
-
}
|
|
445
|
-
interface DefineComponentWithTypeProps<TypeProps> {
|
|
446
|
-
new (): {
|
|
447
|
-
$props: TypeProps;
|
|
448
|
-
} & Record<string, any>;
|
|
449
|
-
}
|
|
450
|
-
/**
|
|
451
|
-
* 按 Vue 3 风格定义一个小程序组件/页面。
|
|
452
|
-
*
|
|
453
|
-
* - 统一注册为 `Component()`
|
|
454
|
-
*
|
|
455
|
-
* @param options 组件定义项
|
|
456
|
-
* @returns 可手动注册的组件定义
|
|
457
|
-
*
|
|
458
|
-
* @example
|
|
459
|
-
* ```ts
|
|
460
|
-
* defineComponent({
|
|
461
|
-
* data: () => ({ count: 0 }),
|
|
462
|
-
* setup() {
|
|
463
|
-
* onMounted(() => console.log('已挂载'))
|
|
464
|
-
* }
|
|
465
|
-
* })
|
|
466
|
-
* ```
|
|
467
|
-
*
|
|
468
|
-
* @example
|
|
469
|
-
* ```ts
|
|
470
|
-
* defineComponent({
|
|
471
|
-
* setup() {
|
|
472
|
-
* onPageScroll(() => {})
|
|
473
|
-
* }
|
|
474
|
-
* })
|
|
475
|
-
* ```
|
|
476
|
-
*/
|
|
477
|
-
declare function defineComponent<TypeProps = any>(options: DefineComponentTypePropsOptions<TypeProps>): DefineComponentWithTypeProps<TypeProps>;
|
|
478
|
-
declare function defineComponent<P extends ComponentPropsOptions = ComponentPropsOptions, D extends object = Record<string, any>, C extends ComputedDefinitions = ComputedDefinitions, M extends MethodDefinitions = MethodDefinitions, S extends Record<string, any> | void = Record<string, any> | void>(options: DefineComponentOptions<P, D, C, M, S>): WevuComponentConstructor<ResolveProps<P>, SetupBindings<S>, D, C, M> & ComponentDefinition<D, C, M>;
|
|
479
|
-
/**
|
|
480
|
-
* 从 Vue SFC 选项创建 wevu 组件,供 weapp-vite 编译产物直接调用的兼容入口。
|
|
481
|
-
*
|
|
482
|
-
* @param options 组件选项,可能包含小程序特有的 properties
|
|
483
|
-
* @internal
|
|
484
|
-
*/
|
|
485
|
-
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> & {
|
|
486
|
-
properties?: HostMiniProgramComponentPropertyOption;
|
|
487
|
-
}): void;
|
|
488
|
-
/**
|
|
489
|
-
* scoped slot 兼容组件入口(编译产物内部使用)。
|
|
490
|
-
* @internal
|
|
491
|
-
*/
|
|
492
|
-
declare function createWevuScopedSlotComponent(overrides?: {
|
|
493
|
-
computed?: ComputedDefinitions;
|
|
494
|
-
inlineMap?: InlineExpressionMap;
|
|
495
|
-
}): void;
|
|
496
|
-
//#endregion
|
|
497
|
-
//#region src/runtime/disposables.d.ts
|
|
498
|
-
type DisposableMethodName = 'dispose' | 'abort' | 'cancel' | 'stop' | 'disconnect' | 'destroy' | 'close';
|
|
499
|
-
type DisposableObject = Partial<Record<DisposableMethodName, () => void>>;
|
|
500
|
-
type DisposableLike = (() => void) | DisposableObject;
|
|
501
|
-
interface DisposableBag {
|
|
502
|
-
/**
|
|
503
|
-
* 注册一个清理项,返回“取消注册”函数(不会立即执行清理)。
|
|
504
|
-
*/
|
|
505
|
-
add: (target: DisposableLike | null | undefined) => () => void;
|
|
506
|
-
/**
|
|
507
|
-
* 立即执行并清空当前 bag 中的全部清理项(幂等)。
|
|
508
|
-
*/
|
|
509
|
-
dispose: () => void;
|
|
510
|
-
/**
|
|
511
|
-
* 注册 timeout,并在 bag dispose 时自动 clearTimeout。
|
|
512
|
-
*/
|
|
513
|
-
setTimeout: (handler: (...args: any[]) => void, timeout?: number, ...args: any[]) => ReturnType<typeof setTimeout>;
|
|
514
|
-
/**
|
|
515
|
-
* 注册 interval,并在 bag dispose 时自动 clearInterval。
|
|
516
|
-
*/
|
|
517
|
-
setInterval: (handler: (...args: any[]) => void, timeout?: number, ...args: any[]) => ReturnType<typeof setInterval>;
|
|
518
|
-
}
|
|
519
|
-
/**
|
|
520
|
-
* 在 setup() 中创建一个“清理袋”,统一管理副作用释放。
|
|
521
|
-
*
|
|
522
|
-
* 典型用法:注册定时器、请求任务、事件监听退订函数,
|
|
523
|
-
* 在页面/组件卸载时自动批量清理,减少内存泄漏风险。
|
|
524
|
-
*/
|
|
525
|
-
declare function useDisposables(): DisposableBag;
|
|
526
|
-
//#endregion
|
|
527
|
-
//#region src/runtime/elementIntersectionObserver.d.ts
|
|
528
|
-
type ElementIntersectionObserverCallback<T = unknown> = (result: T) => void;
|
|
529
|
-
interface UseElementIntersectionObserverOptions<T = unknown> {
|
|
530
|
-
context?: InternalRuntimeState | null;
|
|
531
|
-
enabled?: MaybeRefOrGetter<boolean>;
|
|
532
|
-
observerOptions?: MaybeRefOrGetter<HostMiniProgramIntersectionObserverOptions>;
|
|
533
|
-
onObserve?: ElementIntersectionObserverCallback<T>;
|
|
534
|
-
relativeToViewport?: boolean | Record<string, number>;
|
|
535
|
-
selector: MaybeRefOrGetter<string | null | undefined>;
|
|
536
|
-
}
|
|
537
|
-
interface UseElementIntersectionObserverReturn {
|
|
538
|
-
disconnect: () => void;
|
|
539
|
-
observe: () => HostMiniProgramIntersectionObserver | null;
|
|
540
|
-
readonly observer: HostMiniProgramIntersectionObserver | null;
|
|
541
|
-
}
|
|
542
|
-
/**
|
|
543
|
-
* 观察当前组件或页面内的节点可见性,并在卸载时自动断开。
|
|
544
|
-
*/
|
|
545
|
-
declare function useElementIntersectionObserver<T = unknown>(options: UseElementIntersectionObserverOptions<T>): UseElementIntersectionObserverReturn;
|
|
546
|
-
//#endregion
|
|
547
|
-
//#region src/runtime/hooks/base.d.ts
|
|
548
|
-
declare function getCurrentInstance<T extends InternalRuntimeState = InternalRuntimeState>(): T | undefined;
|
|
549
|
-
/**
|
|
550
|
-
* 设置当前运行时实例(框架内部使用)。
|
|
551
|
-
* @internal
|
|
552
|
-
*/
|
|
553
|
-
declare function setCurrentInstance(inst: InternalRuntimeState | undefined): void;
|
|
554
|
-
declare function getCurrentSetupContext<T = any>(): T | undefined;
|
|
555
|
-
/**
|
|
556
|
-
* 设置当前 setup 上下文(框架内部使用)。
|
|
557
|
-
* @internal
|
|
558
|
-
*/
|
|
559
|
-
declare function setCurrentSetupContext(ctx: any | undefined): void;
|
|
560
|
-
/**
|
|
561
|
-
* 调用批量 hook(框架内部调度入口)。
|
|
562
|
-
* @internal
|
|
563
|
-
*/
|
|
564
|
-
declare function callHookList(target: InternalRuntimeState, name: string, args?: any[]): void;
|
|
565
|
-
/**
|
|
566
|
-
* 调用返回值型 hook(框架内部调度入口)。
|
|
567
|
-
* @internal
|
|
568
|
-
*/
|
|
569
|
-
declare function callHookReturn(target: InternalRuntimeState, name: string, args?: any[]): any;
|
|
570
|
-
//#endregion
|
|
571
|
-
//#region src/runtime/hooks/register.d.ts
|
|
572
|
-
declare function onLaunch(handler: (options: HostMiniProgramLaunchOptions) => void): void;
|
|
573
|
-
declare function onPageNotFound(handler: (options: HostMiniProgramPageNotFoundOptions) => void): void;
|
|
574
|
-
declare function onUnhandledRejection(handler: (options: HostMiniProgramUnhandledRejectionResult) => void): void;
|
|
575
|
-
declare function onThemeChange(handler: (options: HostMiniProgramThemeChangeResult) => void): void;
|
|
576
|
-
declare function onMemoryWarning(handler: (options: HostMiniProgramMemoryWarningResult) => void): void;
|
|
577
|
-
declare function onShow(handler: () => void): void;
|
|
578
|
-
declare function onShow(handler: (options: HostMiniProgramLaunchOptions) => void): void;
|
|
579
|
-
declare function onLoad(handler: HostMiniProgramPageLifetime['onLoad']): void;
|
|
580
|
-
declare function onHide(handler: () => void): void;
|
|
581
|
-
declare function onUnload(handler: () => void): void;
|
|
582
|
-
declare function onReady(handler: () => void): void;
|
|
583
|
-
declare function onPullDownRefresh(handler: HostMiniProgramPageLifetime['onPullDownRefresh']): void;
|
|
584
|
-
declare function onReachBottom(handler: HostMiniProgramPageLifetime['onReachBottom']): void;
|
|
585
|
-
declare function onPageScroll(handler: (opt: HostMiniProgramPageScrollOption) => void): void;
|
|
586
|
-
declare function onRouteDone(handler: HostMiniProgramPageLifetime['onRouteDone'] | ((opt?: unknown) => void)): void;
|
|
587
|
-
declare function onTabItemTap(handler: (opt: HostMiniProgramTabItemTapOption) => void): void;
|
|
588
|
-
declare function onResize(handler: (opt: HostMiniProgramPageResizeOption) => void): void;
|
|
589
|
-
declare function onMoved(handler: () => void): void;
|
|
590
|
-
declare function onAttached(handler: () => void): void;
|
|
591
|
-
declare function onDetached(handler: () => void): void;
|
|
592
|
-
declare function onError(handler: (err: any) => void): void;
|
|
593
|
-
declare function onSaveExitState(handler: () => HostMiniProgramSaveExitState): void;
|
|
594
|
-
declare function onShareAppMessage(handler: (options: HostMiniProgramShareAppMessageOption) => Record<string, any> | void): void;
|
|
595
|
-
declare function onShareTimeline(handler: HostMiniProgramPageLifetime['onShareTimeline']): void;
|
|
596
|
-
declare function onAddToFavorites(handler: (options: HostMiniProgramAddToFavoritesOption) => Record<string, any> | void): void;
|
|
597
|
-
//#endregion
|
|
598
|
-
//#region src/runtime/hooks/vue.d.ts
|
|
599
|
-
/**
|
|
600
|
-
* Vue 3 对齐:组件/页面已挂载,映射小程序 onReady
|
|
601
|
-
*/
|
|
602
|
-
declare function onMounted(handler: () => void): void;
|
|
603
|
-
/**
|
|
604
|
-
* Vue 3 对齐:组件/页面更新后触发。
|
|
605
|
-
* 小程序没有专用 update 生命周期,这里在每次 setData 完成后调用。
|
|
606
|
-
*/
|
|
607
|
-
declare function onUpdated(handler: () => void): void;
|
|
608
|
-
/**
|
|
609
|
-
* Vue 3 对齐:卸载前触发。
|
|
610
|
-
* 小程序无 before-unload 生命周期,setup 时同步执行以保持语义。
|
|
611
|
-
*/
|
|
612
|
-
declare function onBeforeUnmount(handler: () => void): void;
|
|
613
|
-
/**
|
|
614
|
-
* Vue 3 对齐:组件/页面卸载;映射到页面 onUnload 或组件 detached
|
|
615
|
-
*/
|
|
616
|
-
declare function onUnmounted(handler: () => void): void;
|
|
617
|
-
/**
|
|
618
|
-
* Vue 3 对齐:挂载前;setup 时同步触发以模拟 beforeMount 语义
|
|
619
|
-
*/
|
|
620
|
-
declare function onBeforeMount(handler: () => void): void;
|
|
621
|
-
/**
|
|
622
|
-
* Vue 3 对齐:更新前;在每次 setData 前触发
|
|
623
|
-
*/
|
|
624
|
-
declare function onBeforeUpdate(handler: () => void): void;
|
|
625
|
-
/**
|
|
626
|
-
* Vue 3 对齐:错误捕获;映射到小程序 onError
|
|
627
|
-
*/
|
|
628
|
-
declare function onErrorCaptured(handler: (err: any, instance: any, info: string) => void): void;
|
|
629
|
-
/**
|
|
630
|
-
* Vue 3 对齐:组件激活;映射到小程序 onShow
|
|
631
|
-
*/
|
|
632
|
-
declare function onActivated(handler: () => void): void;
|
|
633
|
-
/**
|
|
634
|
-
* Vue 3 对齐:组件失活;映射到小程序 onHide
|
|
635
|
-
*/
|
|
636
|
-
declare function onDeactivated(handler: () => void): void;
|
|
637
|
-
/**
|
|
638
|
-
* Vue 3 对齐:服务端渲染前置钩子。
|
|
639
|
-
* 小程序无此场景,保留空实现以保持 API 兼容。
|
|
640
|
-
*/
|
|
641
|
-
declare function onServerPrefetch(_handler: () => void): void;
|
|
642
|
-
/**
|
|
643
|
-
* 派发更新阶段钩子(框架内部调度入口)。
|
|
644
|
-
* @internal
|
|
645
|
-
*/
|
|
646
|
-
declare function callUpdateHooks(target: InternalRuntimeState, phase: 'before' | 'after'): void;
|
|
647
|
-
//#endregion
|
|
648
|
-
//#region src/runtime/intersectionObserver.d.ts
|
|
649
|
-
type UseIntersectionObserverOptions = HostMiniProgramIntersectionObserverOptions;
|
|
650
|
-
type UseIntersectionObserverResult = HostMiniProgramIntersectionObserver;
|
|
651
|
-
/**
|
|
652
|
-
* 在 setup 中创建 IntersectionObserver,并在卸载时自动断开。
|
|
653
|
-
*
|
|
654
|
-
* - 优先使用 `ctx.instance.createIntersectionObserver(options)`。
|
|
655
|
-
* - 不可用时回退到宿主全局对象的 `createIntersectionObserver(...)`。
|
|
656
|
-
*/
|
|
657
|
-
declare function useIntersectionObserver(options?: UseIntersectionObserverOptions): UseIntersectionObserverResult;
|
|
658
|
-
//#endregion
|
|
659
|
-
//#region src/runtime/layoutBridge.d.ts
|
|
660
|
-
type LayoutBridgeContext = Record<string, any>;
|
|
661
|
-
type LayoutBridgeComponentResolver = (selector: string) => any;
|
|
662
|
-
type LayoutHostMap = Record<string, unknown>;
|
|
663
|
-
type LayoutBridgeInstance<T = LayoutBridgeContext> = T & {
|
|
664
|
-
selectComponent?: LayoutBridgeComponentResolver;
|
|
665
|
-
};
|
|
666
|
-
interface LayoutHostBinding {
|
|
667
|
-
key: string;
|
|
668
|
-
refName?: string;
|
|
669
|
-
selector: string;
|
|
670
|
-
kind?: 'component';
|
|
671
|
-
}
|
|
672
|
-
interface LayoutHostResolveOptions<T = any> {
|
|
673
|
-
context?: T;
|
|
674
|
-
fallbackContext?: T;
|
|
675
|
-
interval?: number;
|
|
676
|
-
retries?: number;
|
|
677
|
-
}
|
|
678
|
-
/**
|
|
679
|
-
* 为当前页面注册 layout bridge,使页面或子组件可消费 layout 内部能力。
|
|
680
|
-
*/
|
|
681
|
-
declare function registerPageLayoutBridge(selectors: string | string[], context?: LayoutBridgeContext): boolean;
|
|
682
|
-
/**
|
|
683
|
-
* 移除当前页面的 layout bridge 注册。
|
|
684
|
-
*/
|
|
685
|
-
declare function unregisterPageLayoutBridge(selectors: string | string[], context?: LayoutBridgeContext): boolean;
|
|
686
|
-
/**
|
|
687
|
-
* 解析当前页面已注册的 layout bridge,找不到时回退到传入上下文。
|
|
688
|
-
*/
|
|
689
|
-
declare function resolveLayoutBridge<T = any>(selector: string, fallbackContext?: T): LayoutBridgeInstance<T> | undefined;
|
|
690
|
-
/**
|
|
691
|
-
* 解析当前页面 layout 内通过指定 key 暴露的宿主实例。
|
|
692
|
-
*/
|
|
693
|
-
declare function resolveLayoutHost<T = any, C = any>(key: string, options?: LayoutHostResolveOptions<C>): NonNullable<T> | null;
|
|
694
|
-
/**
|
|
695
|
-
* 等待当前页面 layout 宿主实例可用,适合页面初次进入时的异步宿主解析。
|
|
696
|
-
*/
|
|
697
|
-
declare function waitForLayoutHost<T = any, C = any>(key: string, options?: LayoutHostResolveOptions<C>): Promise<T | null>;
|
|
698
|
-
/**
|
|
699
|
-
* 在 layout 生命周期内暴露 bridge,使页面或子组件可访问 layout 内部实例。
|
|
700
|
-
*/
|
|
701
|
-
declare function useLayoutBridge(selectors: string | string[], options?: {
|
|
702
|
-
resolveComponent?: LayoutBridgeComponentResolver;
|
|
703
|
-
}): void;
|
|
704
|
-
/**
|
|
705
|
-
* 使用编译期注入的宿主绑定信息,直接从当前 layout 运行时实例解析子组件宿主并注册 bridge。
|
|
706
|
-
*/
|
|
707
|
-
declare function registerRuntimeLayoutHosts(bindings: LayoutHostBinding[], context?: LayoutBridgeContext): any;
|
|
708
|
-
/**
|
|
709
|
-
* 移除运行时自动注册的 layout 宿主 bridge。
|
|
710
|
-
*/
|
|
711
|
-
declare function unregisterRuntimeLayoutHosts(bindings: LayoutHostBinding[], context?: LayoutBridgeContext): boolean;
|
|
712
|
-
/**
|
|
713
|
-
* 使用 key -> 宿主实例的映射批量暴露 layout 内部宿主,适合 toast/dialog 等共享反馈节点。
|
|
714
|
-
*/
|
|
715
|
-
declare function useLayoutHosts(hosts: LayoutHostMap): void;
|
|
716
|
-
//#endregion
|
|
717
|
-
//#region src/runtime/noSetData.d.ts
|
|
718
|
-
declare function markNoSetData<T extends object>(value: T): T;
|
|
719
|
-
declare function isNoSetData(value: unknown): boolean;
|
|
720
|
-
//#endregion
|
|
721
|
-
//#region src/runtime/pageEnvironment.d.ts
|
|
722
|
-
interface PageStackSnapshot {
|
|
723
|
-
canGoBack: boolean;
|
|
724
|
-
currentRoute: string;
|
|
725
|
-
stackLength: number;
|
|
726
|
-
}
|
|
727
|
-
interface UsePageStackOptions {
|
|
728
|
-
autoRefresh?: boolean;
|
|
729
|
-
}
|
|
730
|
-
interface NavigationBarMetrics {
|
|
731
|
-
navigationBarHeight: number;
|
|
732
|
-
navigationHeight: number;
|
|
733
|
-
statusBarHeight: number;
|
|
734
|
-
}
|
|
735
|
-
interface UseNavigationBarMetricsOptions {
|
|
736
|
-
autoRefresh?: boolean;
|
|
737
|
-
defaultNavigationBarHeight?: number;
|
|
738
|
-
defaultStatusBarHeight?: number;
|
|
739
|
-
}
|
|
740
|
-
/**
|
|
741
|
-
* 获取当前小程序页面栈的稳定快照。
|
|
742
|
-
*/
|
|
743
|
-
declare function getCurrentPageStackSnapshot(): PageStackSnapshot;
|
|
744
|
-
/**
|
|
745
|
-
* 在 setup 中跟踪当前小程序页面栈状态。
|
|
746
|
-
*/
|
|
747
|
-
declare function usePageStack(options?: UsePageStackOptions): {
|
|
748
|
-
canGoBack: ComputedRef<boolean>;
|
|
749
|
-
currentRoute: Ref<string, string>;
|
|
750
|
-
refresh: () => void;
|
|
751
|
-
stackLength: Ref<number, number>;
|
|
752
|
-
};
|
|
753
|
-
/**
|
|
754
|
-
* 计算自定义导航栏所需的状态栏和胶囊占位高度。
|
|
755
|
-
*/
|
|
756
|
-
declare function getNavigationBarMetrics(options?: Omit<UseNavigationBarMetricsOptions, 'autoRefresh'>): NavigationBarMetrics;
|
|
757
|
-
/**
|
|
758
|
-
* 在 setup 中跟踪自定义导航栏尺寸。
|
|
759
|
-
*/
|
|
760
|
-
declare function useNavigationBarMetrics(options?: UseNavigationBarMetricsOptions): {
|
|
761
|
-
navigationBarHeight: Ref<number, number>;
|
|
762
|
-
navigationHeight: ComputedRef<number>;
|
|
763
|
-
refresh: () => void;
|
|
764
|
-
statusBarHeight: Ref<number, number>;
|
|
765
|
-
};
|
|
766
|
-
//#endregion
|
|
767
|
-
//#region src/runtime/pageLayout.d.ts
|
|
768
|
-
interface WevuPageLayoutMap {}
|
|
769
|
-
type ResolveTypedPageLayoutName = keyof WevuPageLayoutMap extends never ? string : Extract<keyof WevuPageLayoutMap, string>;
|
|
770
|
-
type ResolveTypedPageLayoutProps<Name extends string> = Name extends keyof WevuPageLayoutMap ? WevuPageLayoutMap[Name] : Record<string, any>;
|
|
771
|
-
type PageLayoutNamedState = { [Name in ResolveTypedPageLayoutName]: {
|
|
772
|
-
name: Name;
|
|
773
|
-
props: ResolveTypedPageLayoutProps<Name>;
|
|
774
|
-
}; }[ResolveTypedPageLayoutName];
|
|
775
|
-
type PageLayoutState = PageLayoutNamedState | {
|
|
776
|
-
name: false;
|
|
777
|
-
props: Record<string, any>;
|
|
778
|
-
} | {
|
|
779
|
-
name: undefined;
|
|
780
|
-
props: Record<string, any>;
|
|
781
|
-
};
|
|
782
|
-
/**
|
|
783
|
-
* 获取当前页面 layout 状态。
|
|
784
|
-
*/
|
|
785
|
-
declare function usePageLayout(): Readonly<PageLayoutState>;
|
|
786
|
-
declare function syncRuntimePageLayoutState(target: Record<string, any>, layout: string | false, props: Record<string, any>): void;
|
|
787
|
-
declare function syncRuntimePageLayoutStateFromRuntime(target: Record<string, any>): void;
|
|
788
|
-
declare function setPageLayout(layout: false): void;
|
|
789
|
-
declare function setPageLayout<Name extends ResolveTypedPageLayoutName>(layout: Name, props?: ResolveTypedPageLayoutProps<Name>): void;
|
|
790
|
-
declare function resolveRuntimePageLayoutName(layout: string | false): string;
|
|
791
|
-
//#endregion
|
|
792
|
-
//#region src/runtime/pageScroll.d.ts
|
|
793
|
-
interface UsePageScrollThrottleOptions {
|
|
794
|
-
/**
|
|
795
|
-
* 节流间隔(毫秒),默认 80ms。
|
|
796
|
-
*/
|
|
797
|
-
interval?: number;
|
|
798
|
-
/**
|
|
799
|
-
* 是否在窗口起始边缘立即触发,默认 true。
|
|
800
|
-
*/
|
|
801
|
-
leading?: boolean;
|
|
802
|
-
/**
|
|
803
|
-
* 是否在窗口结束边缘补一次回调,默认 true。
|
|
804
|
-
*/
|
|
805
|
-
trailing?: boolean;
|
|
806
|
-
/**
|
|
807
|
-
* 持续滚动时的最大等待时间(毫秒)。
|
|
808
|
-
* 当 trailing 为 false 时,可用于兜底触发一次回调。
|
|
809
|
-
*/
|
|
810
|
-
maxWait?: number;
|
|
811
|
-
}
|
|
812
|
-
type UsePageScrollThrottleStopHandle = () => void;
|
|
813
|
-
/**
|
|
814
|
-
* 在 setup 中注册节流后的 onPageScroll 监听,并在卸载时自动清理。
|
|
815
|
-
*/
|
|
816
|
-
declare function usePageScrollThrottle(handler: (opt: HostMiniProgramPageScrollOption) => void, options?: UsePageScrollThrottleOptions): UsePageScrollThrottleStopHandle;
|
|
817
|
-
//#endregion
|
|
818
|
-
//#region src/runtime/provideStore.d.ts
|
|
819
|
-
/**
|
|
820
|
-
* 写入全局 provide 存储,供运行时内部与兼容层复用。
|
|
821
|
-
*/
|
|
822
|
-
declare function setGlobalProvidedValue<T>(key: any, value: T): void;
|
|
823
|
-
//#endregion
|
|
824
|
-
//#region src/runtime/provide.d.ts
|
|
825
|
-
/**
|
|
826
|
-
* 判断当前是否存在可用的注入上下文。
|
|
827
|
-
*
|
|
828
|
-
* wevu 的依赖注入上下文来自同步 `setup()` 阶段的当前实例。
|
|
829
|
-
*/
|
|
830
|
-
declare function hasInjectionContext(): boolean;
|
|
831
|
-
/**
|
|
832
|
-
* 在组件上下文中向后代注入值(与 Vue 3 行为兼容),若没有当前实例则回落到全局存储。
|
|
833
|
-
*
|
|
834
|
-
* @param key 注入键,可为字符串、Symbol 或对象
|
|
835
|
-
* @param value 提供的值
|
|
836
|
-
*
|
|
837
|
-
* @example
|
|
838
|
-
* ```ts
|
|
839
|
-
* defineComponent({
|
|
840
|
-
* setup() {
|
|
841
|
-
* provide(TOKEN_KEY, { data: 'value' })
|
|
842
|
-
* }
|
|
843
|
-
* })
|
|
844
|
-
* ```
|
|
845
|
-
*/
|
|
846
|
-
declare function provide<T>(key: any, value: T): void;
|
|
847
|
-
/**
|
|
848
|
-
* 从祖先组件(或全局存储)读取提供的值。
|
|
849
|
-
*
|
|
850
|
-
* @param key 注入键,需与 provide 使用的键保持一致
|
|
851
|
-
* @param defaultValue 未找到提供者时的默认值
|
|
852
|
-
* @returns 匹配到的值或默认值
|
|
853
|
-
*
|
|
854
|
-
* @example
|
|
855
|
-
* ```ts
|
|
856
|
-
* defineComponent({
|
|
857
|
-
* setup() {
|
|
858
|
-
* const data = inject(TOKEN_KEY)
|
|
859
|
-
* const value = inject('key', 'default')
|
|
860
|
-
* }
|
|
861
|
-
* })
|
|
862
|
-
* ```
|
|
863
|
-
*/
|
|
864
|
-
declare function inject<T>(key: any, defaultValue: T): T;
|
|
865
|
-
declare function inject<T>(key: any): T | undefined;
|
|
866
|
-
/**
|
|
867
|
-
* 全局注入值,适用于历史兼容场景。
|
|
868
|
-
*
|
|
869
|
-
* @deprecated 已弃用,仅用于兼容/过渡。推荐优先使用 `provide()`,
|
|
870
|
-
* 在无实例上下文时 `provide()` 会自动回落到全局存储。
|
|
871
|
-
*/
|
|
872
|
-
declare function provideGlobal<T>(key: any, value: T): void;
|
|
873
|
-
/**
|
|
874
|
-
* 从全局存储读取值,适用于历史兼容场景。
|
|
875
|
-
*
|
|
876
|
-
* @deprecated 已弃用,仅用于兼容/过渡。推荐优先使用 `inject()`,
|
|
877
|
-
* 在无实例上下文时 `inject()` 会自动从全局存储读取。
|
|
878
|
-
*/
|
|
879
|
-
declare function injectGlobal<T>(key: any, defaultValue?: T): T;
|
|
880
|
-
//#endregion
|
|
881
|
-
//#region src/runtime/pullDownRefresh.d.ts
|
|
882
|
-
type PullDownRefreshHandler = () => void | Promise<void>;
|
|
883
|
-
interface UseAsyncPullDownRefreshOptions {
|
|
884
|
-
onError?: (error: unknown) => void | Promise<void>;
|
|
885
|
-
stopPullDownRefresh?: () => unknown | Promise<unknown>;
|
|
886
|
-
}
|
|
887
|
-
/**
|
|
888
|
-
* 注册下拉刷新回调,并在回调结束后自动停止宿主下拉刷新状态。
|
|
889
|
-
*/
|
|
890
|
-
declare function useAsyncPullDownRefresh(refresh: PullDownRefreshHandler, options?: UseAsyncPullDownRefreshOptions): void;
|
|
891
|
-
//#endregion
|
|
892
|
-
//#region src/runtime/register/watch.d.ts
|
|
893
|
-
type WatchHandler = (this: any, value: any, oldValue: any) => void;
|
|
894
|
-
type WatchDescriptor = WatchHandler | string | {
|
|
895
|
-
handler: WatchHandler | string;
|
|
896
|
-
immediate?: boolean;
|
|
897
|
-
deep?: boolean;
|
|
898
|
-
};
|
|
899
|
-
type WatchMap = Record<string, WatchDescriptor>;
|
|
900
|
-
//#endregion
|
|
901
|
-
//#region src/runtime/register/app.d.ts
|
|
902
|
-
/**
|
|
903
|
-
* 注册 App 入口(框架内部使用)。
|
|
904
|
-
* @internal
|
|
905
|
-
*/
|
|
906
|
-
declare function registerApp<D extends object, C extends ComputedDefinitions, M extends MethodDefinitions>(runtimeApp: RuntimeApp<D, C, M>, methods: MethodDefinitions, watch: WatchMap | undefined, setup: DefineAppOptions<D, C, M>['setup'], mpOptions: MiniProgramAppOptions): void;
|
|
907
|
-
//#endregion
|
|
908
|
-
//#region src/runtime/register/component.d.ts
|
|
909
|
-
/**
|
|
910
|
-
* 注册组件入口(框架内部使用)。
|
|
911
|
-
* @internal
|
|
912
|
-
*/
|
|
913
|
-
declare function registerComponent<D extends object, C extends ComputedDefinitions, M extends MethodDefinitions>(runtimeApp: RuntimeApp<D, C, M>, methods: MethodDefinitions, watch: WatchMap | undefined, setup: DefineComponentOptions<ComponentPropsOptions, D, C, M>['setup'], mpOptions: MiniProgramComponentRawOptions): void;
|
|
914
|
-
//#endregion
|
|
915
|
-
//#region src/runtime/register/runtimeInstance.d.ts
|
|
916
|
-
type RuntimeSetupFunction<D extends object, C extends ComputedDefinitions, M extends MethodDefinitions> = DefineComponentOptions<ComponentPropsOptions, D, C, M>['setup'] | DefineAppOptions<D, C, M>['setup'];
|
|
917
|
-
/**
|
|
918
|
-
* 挂载运行时实例(框架内部注册流程使用)。
|
|
919
|
-
* @internal
|
|
920
|
-
*/
|
|
921
|
-
declare function mountRuntimeInstance<D extends object, C extends ComputedDefinitions, M extends MethodDefinitions>(target: InternalRuntimeState, runtimeApp: RuntimeApp<D, C, M>, watchMap: WatchMap | undefined, setup?: RuntimeSetupFunction<D, C, M>, options?: {
|
|
922
|
-
deferSetData?: boolean;
|
|
923
|
-
snapshotOmitKeys?: string[];
|
|
924
|
-
}): RuntimeInstance<D, C, M>;
|
|
925
|
-
declare function setRuntimeSetDataVisibility(target: InternalRuntimeState, visible: boolean): void;
|
|
926
|
-
/**
|
|
927
|
-
* 卸载运行时实例(框架内部注册流程使用)。
|
|
928
|
-
* @internal
|
|
929
|
-
*/
|
|
930
|
-
declare function teardownRuntimeInstance(target: InternalRuntimeState, options?: {
|
|
931
|
-
skipHooks?: boolean;
|
|
932
|
-
}): void;
|
|
933
|
-
//#endregion
|
|
934
|
-
//#region src/runtime/register/setup.d.ts
|
|
935
|
-
type SetupRunner = {
|
|
936
|
-
bivarianceHack: (props: Record<string, any>, ctx: any) => any;
|
|
937
|
-
}['bivarianceHack'];
|
|
938
|
-
/**
|
|
939
|
-
* 执行 setup 函数并注入运行时上下文(框架内部使用)。
|
|
940
|
-
* @internal
|
|
941
|
-
*/
|
|
942
|
-
declare function runSetupFunction(setup: SetupRunner | undefined, props: Record<string, any>, context: any): unknown;
|
|
943
|
-
//#endregion
|
|
944
|
-
//#region src/runtime/selectorQuery.d.ts
|
|
945
|
-
interface UseSelectorQueryOptions {
|
|
946
|
-
context?: InternalRuntimeState | null;
|
|
947
|
-
}
|
|
948
|
-
interface UseBoundingClientRectOptions extends UseSelectorQueryOptions {
|
|
949
|
-
all?: boolean;
|
|
950
|
-
}
|
|
951
|
-
interface UseSelectorFieldsOptions extends UseSelectorQueryOptions {
|
|
952
|
-
all?: boolean;
|
|
953
|
-
fields: HostMiniProgramNodesRefFields;
|
|
954
|
-
}
|
|
955
|
-
interface UseScrollOffsetOptions extends UseSelectorQueryOptions {
|
|
956
|
-
all?: boolean;
|
|
957
|
-
}
|
|
958
|
-
interface UseAllBoundingClientRectOptions extends UseSelectorQueryOptions {
|
|
959
|
-
all: true;
|
|
960
|
-
}
|
|
961
|
-
interface UseAllSelectorFieldsOptions extends UseSelectorQueryOptions {
|
|
962
|
-
all: true;
|
|
963
|
-
fields: HostMiniProgramNodesRefFields;
|
|
964
|
-
}
|
|
965
|
-
interface UseAllScrollOffsetOptions extends UseSelectorQueryOptions {
|
|
966
|
-
all: true;
|
|
967
|
-
}
|
|
968
|
-
/**
|
|
969
|
-
* 创建绑定当前小程序实例的选择器查询工厂。
|
|
970
|
-
*/
|
|
971
|
-
declare function useSelectorQuery(options?: UseSelectorQueryOptions): () => HostMiniProgramSelectorQuery | null;
|
|
972
|
-
/**
|
|
973
|
-
* 创建绑定当前小程序实例的节点布局查询函数。
|
|
974
|
-
*/
|
|
975
|
-
declare function useBoundingClientRect(options?: UseBoundingClientRectOptions & {
|
|
976
|
-
all?: false;
|
|
977
|
-
}): (selector: string) => Promise<HostMiniProgramBoundingClientRectResult | null>;
|
|
978
|
-
declare function useBoundingClientRect(options: UseAllBoundingClientRectOptions): (selector: string) => Promise<HostMiniProgramBoundingClientRectResult[] | null>;
|
|
979
|
-
/**
|
|
980
|
-
* 创建绑定当前小程序实例的节点字段查询函数。
|
|
981
|
-
*/
|
|
982
|
-
declare function useSelectorFields(options: UseSelectorFieldsOptions & {
|
|
983
|
-
all?: false;
|
|
984
|
-
}): (selector: string) => Promise<Record<string, any> | null>;
|
|
985
|
-
declare function useSelectorFields(options: UseAllSelectorFieldsOptions): (selector: string) => Promise<Array<Record<string, any>> | null>;
|
|
986
|
-
/**
|
|
987
|
-
* 创建绑定当前小程序实例的滚动位置查询函数。
|
|
988
|
-
*/
|
|
989
|
-
declare function useScrollOffset(options?: UseScrollOffsetOptions & {
|
|
990
|
-
all?: false;
|
|
991
|
-
}): (selector: string) => Promise<HostMiniProgramScrollOffsetResult | null>;
|
|
992
|
-
declare function useScrollOffset(options: UseAllScrollOffsetOptions): (selector: string) => Promise<HostMiniProgramScrollOffsetResult[] | null>;
|
|
993
|
-
//#endregion
|
|
994
|
-
//#region src/runtime/updatePerformance.d.ts
|
|
995
|
-
type UpdatePerformanceListenerResult = Record<string, any>;
|
|
996
|
-
type UpdatePerformanceListener = (result: UpdatePerformanceListenerResult) => void;
|
|
997
|
-
type UseUpdatePerformanceListenerStopHandle = () => void;
|
|
998
|
-
/**
|
|
999
|
-
* 在 setup 中注册更新性能监听,并在卸载时自动清理。
|
|
1000
|
-
*
|
|
1001
|
-
* - 底层能力:`instance.setUpdatePerformanceListener(listener)`。
|
|
1002
|
-
* - 清理策略:卸载时回传 `undefined` 作为监听器,平台不支持时静默降级。
|
|
1003
|
-
*/
|
|
1004
|
-
declare function useUpdatePerformanceListener(listener: UpdatePerformanceListener): UseUpdatePerformanceListenerStopHandle;
|
|
1005
|
-
//#endregion
|
|
1006
|
-
//#region src/runtime/use.d.ts
|
|
1007
|
-
/**
|
|
1008
|
-
* 在 `app` 级 `setup()` 中显式获取运行时 app,提供与 `app.use()` / `app.provide()` 对齐的 SFC 写法。
|
|
1009
|
-
*/
|
|
1010
|
-
declare function defineAppSetup<T>(setup: (app: RuntimeApp<any, any, any>) => T): T;
|
|
1011
|
-
/**
|
|
1012
|
-
* 在 `app` 级 `setup()` 中安装插件,提供与 `app.use()` 对齐的 SFC 调用方式。
|
|
1013
|
-
*/
|
|
1014
|
-
declare function use(plugin: WevuPlugin, ...options: any[]): RuntimeApp<any, any, any>;
|
|
1015
|
-
//#endregion
|
|
1016
|
-
//#region src/runtime/vueCompat/context.d.ts
|
|
1017
|
-
declare function useAttrs(): Record<string, any>;
|
|
1018
|
-
declare function useSlots(): Record<string, any>;
|
|
1019
|
-
declare function useNativeInstance(): SetupContextNativeInstance;
|
|
1020
|
-
//#endregion
|
|
1021
|
-
//#region src/runtime/vueCompat/model.d.ts
|
|
1022
|
-
type ModelModifiers<M extends PropertyKey = string> = Record<M, true | undefined>;
|
|
1023
|
-
type ModelRef$1<T, M extends PropertyKey = string, G = T, S = T> = Ref<G, S> & [ModelRef$1<T, M, G, S>, ModelModifiers<M>];
|
|
1024
|
-
interface UseModelOptions<T, M extends PropertyKey = string, G = T, S = T> {
|
|
1025
|
-
get?: (value: T, modifiers: ModelModifiers<M>) => G;
|
|
1026
|
-
set?: (value: S, modifiers: ModelModifiers<M>) => T;
|
|
1027
|
-
}
|
|
1028
|
-
declare function useModel<T = any, M extends PropertyKey = string>(props: Record<string, any>, name: string): ModelRef$1<T, M, T, T>;
|
|
1029
|
-
declare function useModel<T = any, M extends PropertyKey = string, G = T, S = T>(props: Record<string, any>, name: string, options: UseModelOptions<T, M, G, S>): ModelRef$1<T, M, G, S>;
|
|
1030
|
-
/**
|
|
1031
|
-
* useBindModel 返回绑定到当前运行时实例的 bindModel。
|
|
1032
|
-
* 该方法必须在 setup() 的同步阶段调用。
|
|
1033
|
-
*/
|
|
1034
|
-
type BindModelWithHelper<DefaultEvent extends string = 'input', DefaultValueProp extends string = 'value'> = (<T = any>(path: string, options?: ModelBindingOptions<T>) => ModelBinding<T>) & {
|
|
1035
|
-
model: <T = any, Event extends string = DefaultEvent, ValueProp extends string = DefaultValueProp, Formatted = T>(path: string, options?: ModelBindingOptions<T, Event, ValueProp, Formatted>) => ModelBindingPayload<T, Event, ValueProp, Formatted>;
|
|
1036
|
-
value: <T = any, Event extends string = DefaultEvent, ValueProp extends string = DefaultValueProp, Formatted = T>(path: string, options?: ModelBindingOptions<T, Event, ValueProp, Formatted>) => Formatted;
|
|
1037
|
-
on: <T = any, Event extends string = DefaultEvent, ValueProp extends string = DefaultValueProp, Formatted = T>(path: string, options?: ModelBindingOptions<T, Event, ValueProp, Formatted>) => (event: any) => void;
|
|
1038
|
-
};
|
|
1039
|
-
declare function useBindModel<DefaultEvent extends string = 'input', DefaultValueProp extends string = 'value'>(defaultOptions?: ModelBindingOptions<any, DefaultEvent, DefaultValueProp, any>): BindModelWithHelper<DefaultEvent, DefaultValueProp>;
|
|
1040
|
-
/**
|
|
1041
|
-
* useChangeModel 返回以 change 事件为默认更新事件的 model 绑定助手。
|
|
1042
|
-
*/
|
|
1043
|
-
declare function useChangeModel(): <T = any, ValueProp extends string = "value", Formatted = T>(path: string, options?: ModelBindingOptions<T, "change", ValueProp, Formatted>) => ModelBindingPayload<T, "change", ValueProp, Formatted>;
|
|
1044
|
-
declare function mergeModels<T>(a: T, b: T): T;
|
|
1045
|
-
//#endregion
|
|
1046
|
-
//#region src/runtime/vueCompat/router.d.ts
|
|
1047
|
-
type RuntimeRouter = SetupContextRouter;
|
|
1048
|
-
/**
|
|
1049
|
-
* 在 setup 中获取与当前组件路径语义一致的原生 Router 对象。
|
|
1050
|
-
*
|
|
1051
|
-
* - 优先使用实例上的 `this.router`(组件路径语义)。
|
|
1052
|
-
* - 不可用时回退到 `this.pageRouter`。
|
|
1053
|
-
* - 低版本基础库再回退到宿主全局路由方法。
|
|
1054
|
-
*
|
|
1055
|
-
* 如需更贴近 Vue Router 的高阶能力(导航守卫、失败类型、统一解析),
|
|
1056
|
-
* 推荐改用 `wevu/router` 子入口的 `useRouter()`。
|
|
1057
|
-
*/
|
|
1058
|
-
declare function useNativeRouter(): RuntimeRouter;
|
|
1059
|
-
/**
|
|
1060
|
-
* 在 setup 中获取与当前页面路径语义一致的原生 Router 对象。
|
|
1061
|
-
*
|
|
1062
|
-
* - 优先使用实例上的 `this.pageRouter`(页面路径语义)。
|
|
1063
|
-
* - 不可用时回退到 `this.router`。
|
|
1064
|
-
* - 低版本基础库再回退到宿主全局路由方法。
|
|
1065
|
-
*
|
|
1066
|
-
* 如需更贴近 Vue Router 的高阶能力(导航守卫、失败类型、统一解析),
|
|
1067
|
-
* 推荐改用 `wevu/router` 子入口的 `useRouter()`。
|
|
1068
|
-
*/
|
|
1069
|
-
declare function useNativePageRouter(): RuntimeRouter;
|
|
1070
|
-
//#endregion
|
|
1071
|
-
//#region src/runtime/vueCompat/templateRef.d.ts
|
|
1072
|
-
type TemplateRef<T = unknown> = Readonly<ShallowRef<T | null>>;
|
|
1073
|
-
declare function useTemplateRef<K extends keyof TemplateRefs>(name: K): TemplateRef<TemplateRefs[K]>;
|
|
1074
|
-
declare function useTemplateRef<T = unknown>(name: string): TemplateRef<T>;
|
|
1075
|
-
//#endregion
|
|
1076
|
-
//#region src/macros/shared.d.ts
|
|
1077
|
-
type Prettify<T> = { [K in keyof T]: T[K]; } & {};
|
|
1078
|
-
type IfAny<T, Y, N> = 0 extends 1 & T ? Y : N;
|
|
1079
|
-
type ComponentObjectPropsOptions = ComponentPropsOptions;
|
|
1080
|
-
type ExtractPropTypes<P extends ComponentObjectPropsOptions> = InferProps<P>;
|
|
1081
|
-
type DefineProps<T, BKeys extends keyof T> = Readonly<T> & { readonly [K in BKeys]-?: boolean; };
|
|
1082
|
-
type BooleanKey<T, K extends keyof T = keyof T> = K extends any ? T[K] extends boolean | undefined ? T[K] extends never | undefined ? never : K : never : never;
|
|
1083
|
-
type DefinePropsFromArray<PropNames extends string = string> = Prettify<Readonly<{ [key in PropNames]?: any; }>>;
|
|
1084
|
-
type DefinePropsFromOptions<PP extends ComponentObjectPropsOptions = ComponentObjectPropsOptions> = Prettify<Readonly<ExtractPropTypes<PP>>>;
|
|
1085
|
-
type NotUndefined<T> = T extends undefined ? never : T;
|
|
1086
|
-
type MappedOmit<T, K extends keyof any> = { [P in keyof T as P extends K ? never : P]: T[P]; };
|
|
1087
|
-
type InferDefaults<T> = { [K in keyof T]?: InferDefault<T, T[K]>; };
|
|
1088
|
-
type NativeType = null | undefined | number | string | boolean | symbol | ((...args: any[]) => any);
|
|
1089
|
-
type InferDefault<P, T> = ((props: P) => T & {}) | (T extends NativeType ? T : never);
|
|
1090
|
-
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;
|
|
1091
|
-
type UnionToIntersection<U> = (U extends any ? (arg: U) => any : never) extends ((arg: infer I) => any) ? I : never;
|
|
1092
|
-
type ScriptSetupTriggerEventOptions = HostMiniProgramTriggerEventOptions;
|
|
1093
|
-
type EmitArgsWithTriggerEventOptions<Args extends any[]> = Args extends [] ? [] | [detail: undefined, options: ScriptSetupTriggerEventOptions] : Args | [...args: Args, options: ScriptSetupTriggerEventOptions];
|
|
1094
|
-
type ObjectEmitsOptions = Record<string, ((...args: any[]) => any) | null>;
|
|
1095
|
-
type EmitsOptions = ObjectEmitsOptions | string[];
|
|
1096
|
-
type EmitFn<Options = ObjectEmitsOptions, Event extends keyof Options = keyof Options> = Options extends Array<infer V> ? (event: V, ...args: any[]) => void : {} extends Options ? (event: string, ...args: any[]) => void : UnionToIntersection<{ [K in Event]: Options[K] extends ((...args: infer Args) => any) ? (event: K, ...args: EmitArgsWithTriggerEventOptions<Args>) => void : Options[K] extends any[] ? (event: K, ...args: EmitArgsWithTriggerEventOptions<Options[K]>) => void : (event: K, ...args: any[]) => void; }[Event]>;
|
|
1097
|
-
type ComponentTypeEmits = ((...args: any[]) => any) | Record<string, any>;
|
|
1098
|
-
type RecordToUnion<T extends Record<string, any>> = T[keyof T];
|
|
1099
|
-
type ShortEmits<T extends Record<string, any>> = UnionToIntersection<RecordToUnion<{ [K in keyof T]: (evt: K, ...args: EmitArgsWithTriggerEventOptions<T[K]>) => void; }>>;
|
|
1100
|
-
type ScriptSetupNativePropertyOption = HostMiniProgramComponentPropertyOption;
|
|
1101
|
-
type ScriptSetupNativeMethodOption = HostMiniProgramComponentMethodOption;
|
|
1102
|
-
type ScriptSetupNativeBehaviorOption = HostMiniProgramComponentEmptyArray;
|
|
1103
|
-
type ScriptSetupNativeInstance<D extends object, P extends ScriptSetupNativePropertyOption, M extends ScriptSetupNativeMethodOption> = MiniProgramComponentInstance<D, P, M, ScriptSetupNativeBehaviorOption>;
|
|
1104
|
-
type ScriptSetupObservedProperty<TProperty extends HostMiniProgramComponentAllFullProperty, TInstance> = Omit<TProperty, 'observer'> & {
|
|
1105
|
-
observer?: string | ((this: TInstance, newVal: MiniProgramComponentPropertyValue<TProperty>, oldVal: MiniProgramComponentPropertyValue<TProperty>, changedPath: Array<string | number>) => void);
|
|
1106
|
-
};
|
|
1107
|
-
type ScriptSetupPropertyObserver<TProperty extends HostMiniProgramComponentAllProperty, TInstance> = TProperty extends (infer TCurrent extends HostMiniProgramComponentAllFullProperty) ? ScriptSetupObservedProperty<TCurrent, TInstance> : TProperty;
|
|
1108
|
-
type ScriptSetupNativeProperties<D extends object, P extends ScriptSetupNativePropertyOption, M extends ScriptSetupNativeMethodOption> = { [K in keyof P]: ScriptSetupPropertyObserver<P[K], ScriptSetupNativeInstance<D, P, M>>; };
|
|
1109
|
-
type ScriptSetupNativeMethods<D extends object, P extends ScriptSetupNativePropertyOption, M extends ScriptSetupNativeMethodOption> = M & ThisType<ScriptSetupNativeInstance<D, P, M>>;
|
|
1110
|
-
type RemoveIndexSignature<T> = { [K in keyof T as string extends K ? never : number extends K ? never : symbol extends K ? never : K]: T[K]; };
|
|
1111
|
-
type ScriptSetupDefineOptions<D extends object = Record<string, any>, C extends ComputedDefinitions = ComputedDefinitions, M extends MethodDefinitions = MethodDefinitions, P extends ScriptSetupNativePropertyOption = ScriptSetupNativePropertyOption> = Omit<RemoveIndexSignature<DefineComponentOptions<ComponentPropsOptions, D, C, M>>, 'props' | 'options' | 'data' | 'methods'> & {
|
|
1112
|
-
/**
|
|
1113
|
-
* props 必须通过 defineProps() 声明。
|
|
1114
|
-
*/
|
|
1115
|
-
props?: never;
|
|
1116
|
-
/**
|
|
1117
|
-
* emits 必须通过 defineEmits() 声明。
|
|
1118
|
-
*/
|
|
1119
|
-
emits?: never;
|
|
1120
|
-
/**
|
|
1121
|
-
* expose 必须通过 defineExpose() 声明。
|
|
1122
|
-
*/
|
|
1123
|
-
expose?: never;
|
|
1124
|
-
/**
|
|
1125
|
-
* slots 必须通过 defineSlots() 声明。
|
|
1126
|
-
*/
|
|
1127
|
-
slots?: never;
|
|
1128
|
-
/**
|
|
1129
|
-
* 小程序 Component 选项(multipleSlots/styleIsolation 等)。
|
|
1130
|
-
*/
|
|
1131
|
-
options?: HostMiniProgramComponentBehaviorOptions;
|
|
1132
|
-
/**
|
|
1133
|
-
* 小程序原生 properties。
|
|
1134
|
-
*/
|
|
1135
|
-
properties?: ScriptSetupNativeProperties<D, P, M>;
|
|
1136
|
-
/**
|
|
1137
|
-
* 小程序原生 data。
|
|
1138
|
-
*/
|
|
1139
|
-
data?: D | (() => D);
|
|
1140
|
-
/**
|
|
1141
|
-
* 小程序原生 methods。
|
|
1142
|
-
*/
|
|
1143
|
-
methods?: ScriptSetupNativeMethods<D, P, M>;
|
|
1144
|
-
/**
|
|
1145
|
-
* setup 执行时机(默认 attached)。
|
|
1146
|
-
*/
|
|
1147
|
-
setupLifecycle?: 'created' | 'attached';
|
|
1148
|
-
};
|
|
1149
|
-
//#endregion
|
|
1150
|
-
//#region src/macros.d.ts
|
|
1151
|
-
/**
|
|
1152
|
-
* defineProps 声明(类型层宏)。
|
|
1153
|
-
*/
|
|
1154
|
-
declare function defineProps<PropNames extends string = string>(props: PropNames[]): DefinePropsFromArray<PropNames>;
|
|
1155
|
-
declare function defineProps<PP extends ComponentPropsOptions = ComponentPropsOptions>(props: PP): DefinePropsFromOptions<PP>;
|
|
1156
|
-
declare function defineProps<TypeProps>(): DefineProps<TypeProps, BooleanKey<TypeProps>>;
|
|
1157
|
-
/**
|
|
1158
|
-
* withDefaults 为 defineProps 声明默认值(类型层)。
|
|
1159
|
-
*/
|
|
1160
|
-
declare function withDefaults<T, BKeys extends keyof T, Defaults extends InferDefaults<T>>(props: DefineProps<T, BKeys>, defaults: Defaults): PropsWithDefaults<T, Defaults, BKeys>;
|
|
1161
|
-
/**
|
|
1162
|
-
* defineEmits 声明(类型层宏)。
|
|
1163
|
-
*/
|
|
1164
|
-
declare function defineEmits<EE extends string = string>(emits?: EE[]): EmitFn<EE[]>;
|
|
1165
|
-
declare function defineEmits<E extends EmitsOptions = EmitsOptions>(emits?: E): EmitFn<E>;
|
|
1166
|
-
declare function defineEmits<T extends ComponentTypeEmits>(): T extends ((...args: any[]) => any) ? T : ShortEmits<T>;
|
|
1167
|
-
/**
|
|
1168
|
-
* defineExpose 向父级 ref 暴露成员(仅类型层)。
|
|
1169
|
-
*/
|
|
1170
|
-
declare function defineExpose<T extends Record<string, any> = Record<string, any>>(exposed?: T): void;
|
|
1171
|
-
/**
|
|
1172
|
-
* defineOptions 设置 `<script setup>` 组件选项(仅类型层)。
|
|
1173
|
-
*/
|
|
1174
|
-
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;
|
|
1175
|
-
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;
|
|
1176
|
-
/**
|
|
1177
|
-
* defineSlots 声明 slots 类型(仅类型层)。
|
|
1178
|
-
*/
|
|
1179
|
-
declare function defineSlots<T extends Record<string, any> = Record<string, any>>(): T;
|
|
1180
|
-
type PageLayoutMeta = string | false | {
|
|
1181
|
-
name: string;
|
|
1182
|
-
props?: Record<string, unknown>;
|
|
1183
|
-
};
|
|
1184
|
-
interface PageMeta {
|
|
1185
|
-
layout?: PageLayoutMeta;
|
|
1186
|
-
[key: string]: unknown;
|
|
1187
|
-
}
|
|
1188
|
-
/**
|
|
1189
|
-
* definePageMeta 声明页面级元信息(仅类型层)。
|
|
1190
|
-
*/
|
|
1191
|
-
declare function definePageMeta(meta: PageMeta): void;
|
|
1192
|
-
/**
|
|
1193
|
-
* defineModel 声明 v-model 绑定(类型层宏)。
|
|
1194
|
-
*/
|
|
1195
|
-
type DefineModelModifiers<M extends PropertyKey = string> = Record<M, true | undefined>;
|
|
1196
|
-
type ModelRef<T, M extends PropertyKey = string, G = T, S = T> = Ref<G, S> & [ModelRef<T, M, G, S>, DefineModelModifiers<M>];
|
|
1197
|
-
interface DefineModelTransformOptions<T, M extends PropertyKey = string, G = T, S = T> {
|
|
1198
|
-
get?: (value: T, modifiers: DefineModelModifiers<M>) => G;
|
|
1199
|
-
set?: (value: S, modifiers: DefineModelModifiers<M>) => T;
|
|
1200
|
-
}
|
|
1201
|
-
type DefineModelBaseOptions<T, M extends PropertyKey = string, G = T, S = T> = Record<string, any> & DefineModelTransformOptions<T, M, G, S>;
|
|
1202
|
-
type DefineModelRequiredOptions<T> = {
|
|
1203
|
-
default: T | (() => T);
|
|
1204
|
-
} | {
|
|
1205
|
-
required: true;
|
|
1206
|
-
};
|
|
1207
|
-
declare function defineModel<T = any, M extends PropertyKey = string, G = T, S = T>(options: DefineModelBaseOptions<T, M, G, S> & DefineModelRequiredOptions<T>): ModelRef<T, M, G, S>;
|
|
1208
|
-
declare function defineModel<T = any, M extends PropertyKey = string, G = T, S = T>(name: string, options: DefineModelBaseOptions<T, M, G, S> & DefineModelRequiredOptions<T>): ModelRef<T, M, G, S>;
|
|
1209
|
-
declare function defineModel<T = any, M extends PropertyKey = string, G = T, S = T>(options?: DefineModelBaseOptions<T | undefined, M, G | undefined, S | undefined>): ModelRef<T | undefined, M, G | undefined, S | undefined>;
|
|
1210
|
-
declare function defineModel<T = any, M extends PropertyKey = string, G = T, S = T>(name?: string, options?: DefineModelBaseOptions<T | undefined, M, G | undefined, S | undefined>): ModelRef<T | undefined, M, G | undefined, S | undefined>;
|
|
1211
|
-
//#endregion
|
|
1212
|
-
//#region src/version.d.ts
|
|
1213
|
-
declare const version: string;
|
|
1214
|
-
//#endregion
|
|
1215
|
-
export { registerApp as $, GlobalComponents as $n, onUpdated as $t, useSlots as A, ElementIntersectionObserverCallback as An, LayoutHostBinding as At, UseBoundingClientRectOptions as B, DefineComponentTypePropsOptions as Bn, UseIntersectionObserverOptions as Bt, UseModelOptions as C, onUnload as Cn, getCurrentPageStackSnapshot as Ct, useModel as D, getCurrentSetupContext as Dn, isNoSetData as Dt, useChangeModel as E, getCurrentInstance as En, usePageStack as Et, UseUpdatePerformanceListenerStopHandle as F, DisposableLike as Fn, unregisterPageLayoutBridge as Ft, useScrollOffset as G, WevuDefinedComponent as Gn, onBeforeMount as Gt, UseSelectorFieldsOptions as H, SetupContextWithTypeProps as Hn, useIntersectionObserver as Ht, useUpdatePerformanceListener as I, DisposableMethodName as In, unregisterRuntimeLayoutHosts as It, runSetupFunction as J, defineComponent as Jn, onDeactivated as Jt, useSelectorFields as K, createWevuComponent as Kn, onBeforeUnmount as Kt, UseAllBoundingClientRectOptions as L, DisposableObject as Ln, useLayoutBridge as Lt, use as M, UseElementIntersectionObserverReturn as Mn, registerRuntimeLayoutHosts as Mt, UpdatePerformanceListener as N, useElementIntersectionObserver as Nn, resolveLayoutBridge as Nt, useAttrs as O, setCurrentInstance as On, markNoSetData as Ot, UpdatePerformanceListenerResult as P, DisposableBag as Pn, resolveLayoutHost as Pt, registerComponent as Q, createApp as Qn, onUnmounted as Qt, UseAllScrollOffsetOptions as R, useDisposables as Rn, useLayoutHosts as Rt, ModelModifiers as S, onUnhandledRejection as Sn, UsePageStackOptions as St, useBindModel as T, callHookReturn as Tn, useNavigationBarMetrics as Tt, UseSelectorQueryOptions as U, SetupFunctionWithTypeProps as Un, callUpdateHooks as Ut, UseScrollOffsetOptions as V, DefineComponentWithTypeProps as Vn, UseIntersectionObserverResult as Vt, useBoundingClientRect as W, WevuComponentConstructor as Wn, onActivated as Wt, setRuntimeSetDataVisibility as X, resetWevuDefaults as Xn, onMounted as Xt, mountRuntimeInstance as Y, WevuDefaults as Yn, onErrorCaptured as Yt, teardownRuntimeInstance as Z, setWevuDefaults as Zn, onServerPrefetch as Zt, EmitsOptions as _, onShareAppMessage as _n, syncRuntimePageLayoutStateFromRuntime as _t, PageLayoutMeta as a, onLaunch as an, WevuGlobalDirectives as ar, injectGlobal as at, useNativePageRouter as b, onTabItemTap as bn, PageStackSnapshot as bt, defineExpose as c, onMoved as cn, DefineAppOptions as cr, setGlobalProvidedValue as ct, definePageMeta as d, onPullDownRefresh as dn, SetDataDebugInfo as dr, usePageScrollThrottle as dt, onAddToFavorites as en, GlobalDirectives as er, PullDownRefreshHandler as et, defineProps as f, onReachBottom as fn, SetDataSnapshotOptions as fr, PageLayoutState as ft, EmitFn as g, onSaveExitState as gn, syncRuntimePageLayoutState as gt, ComponentTypeEmits as h, onRouteDone as hn, setPageLayout as ht, ModelRef as i, onHide as in, WevuGlobalComponents as ir, inject as it, defineAppSetup as j, UseElementIntersectionObserverOptions as jn, registerPageLayoutBridge as jt, useNativeInstance as k, setCurrentSetupContext as kn, LayoutBridgeInstance as kt, defineModel as l, onPageNotFound as ln, DefineComponentOptions as lr, UsePageScrollThrottleOptions as lt, withDefaults as m, onResize as mn, resolveRuntimePageLayoutName as mt, DefineModelModifiers as n, onDetached as nn, TemplateRefValue as nr, useAsyncPullDownRefresh as nt, PageMeta as o, onLoad as on, CreateAppOptions as or, provide as ot, defineSlots as p, onReady as pn, WevuPageLayoutMap as pt, useSelectorQuery as q, createWevuScopedSlotComponent as qn, onBeforeUpdate as qt, DefineModelTransformOptions as r, onError as rn, TemplateRefs as rr, hasInjectionContext as rt, defineEmits as s, onMemoryWarning as sn, DataOption as sr, provideGlobal as st, version as t, onAttached as tn, MiniProgramTemplateRefValue as tr, UseAsyncPullDownRefreshOptions as tt, defineOptions as u, onPageScroll as un, PageFeatures as ur, UsePageScrollThrottleStopHandle as ut, TemplateRef as v, onShareTimeline as vn, usePageLayout as vt, mergeModels as w, callHookList as wn, getNavigationBarMetrics as wt, useNativeRouter as x, onThemeChange as xn, UseNavigationBarMetricsOptions as xt, useTemplateRef as y, onShow as yn, NavigationBarMetrics as yt, UseAllSelectorFieldsOptions as z, ComponentDefinition as zn, waitForLayoutHost as zt };
|