wevu 7.0.0 → 7.0.1
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/dev/package.mjs +1 -1
- package/dist/dev/router/backNavigation.mjs +1 -1
- package/dist/dev/router/createRouter.mjs +55 -14
- package/dist/dev/router/createRouter.mjs.map +1 -1
- package/dist/dev/router/initialNavigation.mjs +131 -5
- package/dist/dev/router/initialNavigation.mjs.map +1 -1
- package/dist/dev/router/navigationApi.mjs +1 -1
- package/dist/dev/router/navigationResult.mjs +1 -1
- package/dist/dev/router/navigationTarget.mjs +2 -2
- package/dist/dev/router/navigationTargetHelpers.mjs +1 -1
- package/dist/dev/router/types.mjs.map +1 -1
- package/dist/dev/router/useRoute.mjs +13 -0
- package/dist/dev/router/useRoute.mjs.map +1 -1
- package/dist/dev/router.mjs +1 -1
- package/dist/dev/routerInternal/snapshots.mjs +3 -1
- package/dist/dev/routerInternal/snapshots.mjs.map +1 -1
- package/dist/dev/runtime/register/component/lifecycle.mjs +13 -55
- package/dist/dev/runtime/register/component/lifecycle.mjs.map +1 -1
- package/dist/dev/runtime/register/component/registerDefinition.mjs +19 -21
- package/dist/dev/runtime/register/component/registerDefinition.mjs.map +1 -1
- package/dist/package.mjs +1 -1
- package/dist/router/backNavigation.mjs +1 -1
- package/dist/router/createRouter.mjs +1 -1
- package/dist/router/initialNavigation.mjs +1 -1
- package/dist/router/navigationApi.mjs +1 -1
- package/dist/router/navigationResult.mjs +1 -1
- package/dist/router/navigationTarget.mjs +1 -1
- package/dist/router/navigationTargetHelpers.mjs +1 -1
- package/dist/router/types.d.mts +10 -1
- package/dist/router/useRoute.mjs +1 -1
- package/dist/router.d.mts +2 -2
- package/dist/router.mjs +1 -1
- package/dist/routerInternal/snapshots.mjs +1 -1
- package/dist/runtime/register/component/lifecycle.mjs +1 -1
- package/dist/runtime/register/component/registerDefinition.mjs +1 -1
- package/package.json +6 -6
package/dist/router.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { RouterNavigateToOption, RouterReLaunchOption, RouterRedirectToOption, RouterSwitchTabOption, SetupContextRouter, TypedRouterTabBarUrl, TypedRouterUrl, WevuTypedRouterRouteMap } from "./runtime/types/props/router.mjs";
|
|
2
2
|
import "./runtime/types/props.mjs";
|
|
3
3
|
import { parseQuery, stringifyQuery } from "./routerInternal/query.mjs";
|
|
4
|
-
import { AddRoute, LocationQuery, LocationQueryRaw, LocationQueryValue, LocationQueryValueRaw, NamedRouteRecord, NamedRoutes, NavigationAfterEach, NavigationAfterEachContext, NavigationErrorContext, NavigationErrorHandler, NavigationFailure, NavigationFailureType, NavigationFailureTypeValue, NavigationGuard, NavigationGuardContext, NavigationGuardResult, NavigationMode, NavigationRedirect, RouteLocationNormalizedLoaded, RouteLocationRaw, RouteLocationRedirectedFrom, RouteMeta, RouteParamValue, RouteParamValueRaw, RouteParams, RouteParamsMode, RouteParamsRaw, RouteQueryParser, RouteQueryStringifier, RouteRecordInput, RouteRecordMatched, RouteRecordRaw, RouteRecordRedirect, RouterNavigation, UseRouterOptions } from "./router/types.mjs";
|
|
4
|
+
import { AddRoute, InitialNavigationMode, LocationQuery, LocationQueryRaw, LocationQueryValue, LocationQueryValueRaw, NamedRouteRecord, NamedRoutes, NavigationAfterEach, NavigationAfterEachContext, NavigationErrorContext, NavigationErrorHandler, NavigationFailure, NavigationFailureType, NavigationFailureTypeValue, NavigationGuard, NavigationGuardContext, NavigationGuardResult, NavigationMode, NavigationRedirect, RouteLocationNormalizedLoaded, RouteLocationRaw, RouteLocationRedirectedFrom, RouteMeta, RouteParamValue, RouteParamValueRaw, RouteParams, RouteParamsMode, RouteParamsRaw, RouteQueryParser, RouteQueryStringifier, RouteRecordInput, RouteRecordMatched, RouteRecordRaw, RouteRecordRedirect, RouterNavigation, UseRouterOptions } from "./router/types.mjs";
|
|
5
5
|
import { createRouter } from "./router/createRouter.mjs";
|
|
6
6
|
import { createNavigationFailure, isNavigationFailure } from "./router/navigationCore.mjs";
|
|
7
7
|
import { resolveRouteLocation } from "./router/resolve.mjs";
|
|
8
8
|
import { useNativePageRouter, useNativeRouter, useRoute } from "./router/useRoute.mjs";
|
|
9
9
|
import { useRouter } from "./router/useRouter.mjs";
|
|
10
|
-
export { type AddRoute, type LocationQuery, type LocationQueryRaw, type LocationQueryValue, type LocationQueryValueRaw, type NamedRouteRecord, type NamedRoutes, type NavigationAfterEach, type NavigationAfterEachContext, type NavigationErrorContext, type NavigationErrorHandler, type NavigationFailure, NavigationFailureType, type NavigationFailureTypeValue, type NavigationGuard, type NavigationGuardContext, type NavigationGuardResult, type NavigationMode, type NavigationRedirect, type RouteLocationNormalizedLoaded, type RouteLocationRaw, type RouteLocationRedirectedFrom, type RouteMeta, type RouteParamValue, type RouteParamValueRaw, type RouteParams, type RouteParamsMode, type RouteParamsRaw, type RouteQueryParser, type RouteQueryStringifier, type RouteRecordInput, type RouteRecordMatched, type RouteRecordRaw, type RouteRecordRedirect, type RouterNavigateToOption, type RouterNavigation, type RouterReLaunchOption, type RouterRedirectToOption, type RouterSwitchTabOption, type SetupContextRouter, type TypedRouterTabBarUrl, type TypedRouterUrl, type UseRouterOptions, type WevuTypedRouterRouteMap, createNavigationFailure, createRouter, isNavigationFailure, parseQuery, resolveRouteLocation, stringifyQuery, useNativePageRouter, useNativeRouter, useRoute, useRouter };
|
|
10
|
+
export { type AddRoute, type InitialNavigationMode, type LocationQuery, type LocationQueryRaw, type LocationQueryValue, type LocationQueryValueRaw, type NamedRouteRecord, type NamedRoutes, type NavigationAfterEach, type NavigationAfterEachContext, type NavigationErrorContext, type NavigationErrorHandler, type NavigationFailure, NavigationFailureType, type NavigationFailureTypeValue, type NavigationGuard, type NavigationGuardContext, type NavigationGuardResult, type NavigationMode, type NavigationRedirect, type RouteLocationNormalizedLoaded, type RouteLocationRaw, type RouteLocationRedirectedFrom, type RouteMeta, type RouteParamValue, type RouteParamValueRaw, type RouteParams, type RouteParamsMode, type RouteParamsRaw, type RouteQueryParser, type RouteQueryStringifier, type RouteRecordInput, type RouteRecordMatched, type RouteRecordRaw, type RouteRecordRedirect, type RouterNavigateToOption, type RouterNavigation, type RouterReLaunchOption, type RouterRedirectToOption, type RouterSwitchTabOption, type SetupContextRouter, type TypedRouterTabBarUrl, type TypedRouterUrl, type UseRouterOptions, type WevuTypedRouterRouteMap, createNavigationFailure, createRouter, isNavigationFailure, parseQuery, resolveRouteLocation, stringifyQuery, useNativePageRouter, useNativeRouter, useRoute, useRouter };
|
package/dist/router.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{parseQuery as e,stringifyQuery as t}from"./routerInternal/query.mjs";import{NavigationFailureType as n}from"./router/types.mjs";import{createNavigationFailure as r,isNavigationFailure as i}from"./router/navigationCore.mjs";import{resolveRouteLocation as a}from"./router/resolve.mjs";import{useNativePageRouter as o,useNativeRouter as s,useRoute as c}from"./router/useRoute.mjs";import{createRouter as l}from"./router/createRouter.mjs";import{useRouter as u}from"./router/useRouter.mjs";export{n as NavigationFailureType,r as createNavigationFailure,l as createRouter,i as isNavigationFailure,e as parseQuery,a as resolveRouteLocation,t as stringifyQuery,o as useNativePageRouter,s as useNativeRouter,c as useRoute,u as useRouter};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createAbsoluteRoutePath as e,resolvePath as t}from"./path.mjs";import{stringifyQuery as n}from"./query.mjs";function r(e){if(e)return{...e}}function i(e){let t={name:e.name,path:e.path};return e.meta!==void 0&&(t.meta=r(e.meta)),Array.isArray(e.alias)?t.alias=Object.freeze(e.alias.slice()):e.alias!==void 0&&(t.alias=e.alias),Array.isArray(e.beforeEnter)?t.beforeEnter=Object.freeze(e.beforeEnter.slice()):e.beforeEnter!==void 0&&(t.beforeEnter=e.beforeEnter),e.redirect!==void 0&&(t.redirect=e.redirect),Object.freeze(t)}function a(t,n,r,a,o,s){let
|
|
1
|
+
import{createAbsoluteRoutePath as e,resolvePath as t}from"./path.mjs";import{stringifyQuery as n}from"./query.mjs";function r(e){if(e)return{...e}}function i(e){let t={name:e.name,path:e.path};return e.meta!==void 0&&(t.meta=r(e.meta)),Array.isArray(e.alias)?t.alias=Object.freeze(e.alias.slice()):e.alias!==void 0&&(t.alias=e.alias),Array.isArray(e.beforeEnter)?t.beforeEnter=Object.freeze(e.beforeEnter.slice()):e.beforeEnter!==void 0&&(t.beforeEnter=e.beforeEnter),e.redirect!==void 0&&(t.redirect=e.redirect),Object.freeze(t)}function a(t,n,r,a,o,s,c,l){let u=Object.freeze(t.map(t=>e(t))),d=Object.freeze(n.map(i));return Object.freeze({tabBarEntries:u,routes:d,namedRoutes:d,paramsMode:r,maxRedirects:a,initialNavigationMode:o,initialNavigationTimeout:s,parseQuery:c.parseQuery,stringifyQuery:c.stringifyQuery,rejectOnError:l})}function o(n,i){let a={name:n.name,path:e(n.path)},o=typeof i==`string`&&i?e(t(i,``)):void 0;return o&&o!==a.path&&(a.aliasPath=o),n.meta!==void 0&&(a.meta=r(n.meta)),a}function s(e){if(e)return e.map(e=>({name:e.name,path:e.path,aliasPath:e.aliasPath,meta:r(e.meta)}))}function c(e){let t={};for(let n of Object.keys(e)){let r=e[n];t[n]=Array.isArray(r)?r.slice():r}return t}function l(e){let t={};for(let n of Object.keys(e)){let r=e[n];t[n]=Array.isArray(r)?r.slice():r}return t}function u(e){if(!e)return;let t={path:e.path,fullPath:e.fullPath,query:c(e.query),hash:e.hash,params:l(e.params)};return e.name!==void 0&&(t.name=e.name),e.meta!==void 0&&(t.meta=r(e.meta)),e.href!==void 0&&(t.href=e.href),e.matched!==void 0&&(t.matched=s(e.matched)),t}function d(e){let t={path:e.path,fullPath:e.fullPath,query:c(e.query),hash:e.hash,params:l(e.params)};return e.name!==void 0&&(t.name=e.name),e.meta!==void 0&&(t.meta=r(e.meta)),e.href!==void 0&&(t.href=e.href),e.matched!==void 0&&(t.matched=s(e.matched)),t}function f(e){let t={path:e.path,fullPath:e.fullPath,query:c(e.query),hash:e.hash,params:l(e.params)};return e.meta!==void 0&&(t.meta=r(e.meta)),e.href!==void 0&&(t.href=e.href),e.matched!==void 0&&(t.matched=s(e.matched)),e.redirectedFrom!==void 0&&(t.redirectedFrom=u(e.redirectedFrom)),e.name!==void 0&&(t.name=e.name),t}function p(t,r=n){let i=e(t.path),a=r(t.query);return a?`${i}?${a}`:i}function m(e){return Object.keys(e).length>0}export{c as cloneLocationQuery,u as cloneRouteLocationRedirectedFrom,r as cloneRouteMeta,l as cloneRouteParams,s as cloneRouteRecordMatchedList,p as createNativeRouteUrl,d as createRedirectedFromSnapshot,a as createRouterOptionsSnapshot,m as hasLocationQuery,o as normalizeRouteRecordMatched,f as snapshotRouteLocation};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{callHookList as e}from"../../hooks/base.mjs";import{bindCurrentPageInstance as t,ensureMiniProgramGlobalPatched as n,ensurePageShareMenus as r,releaseCurrentPageInstance as i,resolvePageOptions as a}from"./lifecycle/platform.mjs";import{scheduleTemplateRefUpdate as o}from"../../templateRefs.mjs";import{enableDeferredSetData as s,mountRuntimeInstance as c,setRuntimeSetDataVisibility as l,teardownRuntimeInstance as u}from"../runtimeInstance.mjs";import{
|
|
1
|
+
import{callHookList as e}from"../../hooks/base.mjs";import{bindCurrentPageInstance as t,ensureMiniProgramGlobalPatched as n,ensurePageShareMenus as r,releaseCurrentPageInstance as i,resolvePageOptions as a}from"./lifecycle/platform.mjs";import{scheduleTemplateRefUpdate as o}from"../../templateRefs.mjs";import{enableDeferredSetData as s,mountRuntimeInstance as c,setRuntimeSetDataVisibility as l,teardownRuntimeInstance as u}from"../runtimeInstance.mjs";import{cancelInitialNavigation as d,ensureInitialNavigation as f}from"../../../router/initialNavigation.mjs";import{notifyRouteStateSync as p}from"../../../router/routeSync.mjs";import{attachOptionalPageLifecycleHooks as m}from"./lifecycle/optionalHooks.mjs";import{WEVU_ON_LOAD_CALLED_KEY as h,WEVU_READY_CALLED_KEY as g,WEVU_ROUTE_DONE_CALLED_KEY as _}from"@weapp-core/constants";function v(v){let{runtimeApp:y,watch:b,setup:x,userOnLoad:S,userOnUnload:C,userOnShow:w,userOnHide:T,userOnReady:E,isPage:D,enableOnSaveExitState:O,enableOnPullDownRefresh:k,enableOnReachBottom:A,enableOnPageScroll:j,enableOnRouteDone:M,enableOnRouteDoneFallback:N,enableOnTabItemTap:P,enableOnResize:F,enableOnShareAppMessage:I,enableOnShareTimeline:L,enableOnAddToFavorites:R,syncWevuPropsFromValues:z,effectiveOnSaveExitState:B,effectiveOnPullDownRefresh:V,effectiveOnReachBottom:H,effectiveOnPageScroll:U,effectiveOnRouteDone:W,effectiveOnTabItemTap:G,effectiveOnResize:K,effectiveOnShareAppMessage:q,effectiveOnShareTimeline:J,effectiveOnAddToFavorites:Y,hasHook:X}=v,Z=e=>{var t,n;(t=e.__wevu)==null||(n=t.__wevu_flushSetupSnapshotSync)==null||n.call(t)},Q={onLoad(...t){if(this[h])return;this[h]=!0;let n=()=>{c(this,y,b,x);let n=t[0]&&typeof t[0]==`object`?t[0]:a(this);if(z==null||z(this,n),Z(this),s(this),D&&r({enableOnShareAppMessage:I,enableOnShareTimeline:L}),e(this,`onLoad`,t),typeof S==`function`)return S.apply(this,t.length?t:[n])};return(D?f(this,t[0],{onComplete:e=>{e&&n()}}):void 0)||n()},onUnload(...e){if(d(this),D&&i(this),u(this),typeof C==`function`)return C.apply(this,e)},onShow(...i){if(D&&(n(),t(this),this[h]||Q.onLoad.call(this,a(this)),z==null||z(this,a(this)),Z(this),r({enableOnShareAppMessage:I,enableOnShareTimeline:L}),this[_]=!1),l(this,!0),D&&p({page:this,source:`page`}),e(this,`onShow`,i),typeof w==`function`)return w.apply(this,i)},onHide(...t){if(D&&i(this),l(this,!1),e(this,`onHide`,t),typeof T==`function`)return T.apply(this,t)},onReady(...t){if(D&&(this[h]||Q.onLoad.call(this,a(this)),z==null||z(this,a(this)),Z(this),r({enableOnShareAppMessage:I,enableOnShareTimeline:L})),!this[g]){if(this[g]=!0,D&&M&&N){let e=this;setTimeout(()=>{if(!e[_]){var t;(t=Q.onRouteDone)==null||t.call(e)}},0)}let n=()=>{e(this,`onReady`,t),typeof E==`function`&&E.apply(this,t)},r=()=>o(this,n);D&&f(this,void 0,{start:!1,onComplete:e=>{e&&r()}})||r();return}if(typeof E==`function`)return E.apply(this,t)}};return m(Q,{enableOnSaveExitState:O,enableOnPullDownRefresh:k,enableOnReachBottom:A,enableOnPageScroll:j,enableOnRouteDone:M,enableOnTabItemTap:P,enableOnResize:F,enableOnShareAppMessage:I,enableOnShareTimeline:L,enableOnAddToFavorites:R,effectiveOnSaveExitState:B,effectiveOnPullDownRefresh:V,effectiveOnReachBottom:H,effectiveOnPageScroll:U,effectiveOnRouteDone:W,effectiveOnTabItemTap:G,effectiveOnResize:K,effectiveOnShareAppMessage:q,effectiveOnShareTimeline:J,effectiveOnAddToFavorites:Y,hasHook:X}),Q}export{v as createPageLifecycleHooks};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getMiniProgramRuntimeGlobalObject as e}from"../../platform.mjs";import{callHookList as t}from"../../hooks/base.mjs";import{resolveRuntimePageLayoutName as n,syncRuntimePageLayoutState as r}from"../../pageLayout.mjs";import{getOwnerProxy as i}from"../../scopedSlots.mjs";import{clearTemplateRefs as a,scheduleTemplateRefUpdate as o}from"../../templateRefs.mjs";import{enableDeferredSetData as s,mountRuntimeInstance as c,refreshRuntimeInstance as
|
|
1
|
+
import{getMiniProgramRuntimeGlobalObject as e}from"../../platform.mjs";import{callHookList as t}from"../../hooks/base.mjs";import{resolveRuntimePageLayoutName as n,syncRuntimePageLayoutState as r}from"../../pageLayout.mjs";import{getOwnerProxy as i}from"../../scopedSlots.mjs";import{clearTemplateRefs as a,scheduleTemplateRefUpdate as o}from"../../templateRefs.mjs";import{enableDeferredSetData as s,mountRuntimeInstance as c,refreshRuntimeInstance as ee,setRuntimeSetDataVisibility as l,teardownRuntimeInstance as u}from"../runtimeInstance.mjs";import{ensureInitialNavigation as d}from"../../../router/initialNavigation.mjs";import{registerRuntimeLayoutHosts as te,unregisterRuntimeLayoutHosts as ne}from"../../layoutBridge.mjs";import{registerNativeComponentDefinition as f}from"./registerNativeDefinition.mjs";import{WEAPP_VITE_STATEFUL_HMR_BRIDGE_KEY as re,WEVU_LAYOUT_HOST_BRIDGE_KEY as p,WEVU_PAGE_LAYOUT_NAME_KEY as ie,WEVU_PAGE_LAYOUT_PROPS_KEY as ae,WEVU_PAGE_LAYOUT_SETTER_KEY as m,WEVU_PUBLIC_RUNTIME_KEY as h,WEVU_READY_CALLED_KEY as g,WEVU_RESOLVE_PUBLIC_INSTANCE_METHOD as _,WEVU_RUNTIME_KEY as oe,WEVU_RUNTIME_OWNER_ID_KEY as se,WEVU_SLOT_OWNER_ID_KEY as v,WEVU_TEMPLATE_REFS_KEY as y}from"@weapp-core/constants";function b(e){let t=e.selectOwnerComponent;if(typeof t==`function`)try{let n=t.call(e);n&&n!==e&&o(n)}catch(e){}}function x(x){var S;let{runtimeApp:C,watch:w,setup:T,restOptions:ce,pageLifecycleHooks:E,finalObservers:D,userLifetimes:O,userPageLifetimes:k,finalMethods:A,finalOptions:j,applyExtraInstanceFields:M,templateRefs:N,layoutHosts:P,attachWevuPropKeys:F,setupLifecycle:I,syncWevuPropsFromInstance:L,directPropsDerivedKeys:R,isPage:z,vueLifecycles:B,getRuntimeOwnerLabel:V,registerNative:H=!0}=x,U=e=>{var t;let n=(t=e.__wevu)==null?e[h]:t;if(n)return n;let r=e.$state;if(r&&typeof r==`object`)return r[oe]},W=e=>{var t,n,r,i,a;return(t=(n=(r=e[se])==null?e[v]:r)==null?(i=e.data)==null?void 0:i[v]:n)==null?(a=e.properties)==null?void 0:a[v]:t},G=e=>{var t;let n=(t=U(e))==null?void 0:t.proxy;if(n)return n;let r=W(e);if(typeof r==`string`&&r){var a;return(a=i(r))==null?e:a}return e},K=e=>{let t=U(e);return t?{runtime:t,mounted:!1}:(M(e),F(e),c(e,C,w,T,{deferSetData:!0,snapshotOmitKeys:R}),L(e),s(e),{runtime:U(e),mounted:!0})},q=(e,t,n)=>{let r=B[t];if(typeof r==`function`)return r.apply(G(e),n)},J=(e,t)=>{if(!z){t();return}d(e,void 0,{start:!1,onComplete:e=>{e&&t()}})||t()},le=e=>{U(e)||typeof B.mounted!=`function`||K(e).mounted&&(q(e,`created`,[]),q(e,`beforeMount`,[]))},Y={},X=e=>{if(!Array.isArray(P)||!P.length||e[p])return;let t=te(P,e);t&&(e[p]=t)},Z=e=>{z&&(e[m]=(t,i)=>{var a;let o=(a=e.__wevu)==null?void 0:a.state;if(!o||typeof o!=`object`)return;o[ie]=n(t);let s=t===!1||i==null?{}:i;o[ae]=s,r(e,t,s)})};if(z)for(let e of[`onPullDownRefresh`,`onReachBottom`,`onShareAppMessage`,`onShareTimeline`,`onAddToFavorites`]){let t=E[e];typeof t==`function`&&typeof A[e]!=`function`&&(Y[e]=function(...e){return t.apply(this,e)})}let Q={...ce,...z?E:{},observers:D,lifetimes:{...O,created:function(...e){M(this),Array.isArray(N)&&N.length&&Object.defineProperty(this,y,{value:N,configurable:!0,enumerable:!1,writable:!1}),F(this),J(this,()=>{if(q(this,`beforeCreate`,e),I===`created`){try{c(this,C,w,T,{deferSetData:!0,snapshotOmitKeys:R})}catch(e){let t=V(this);throw Error(`[wevu] mount runtime failed in created (${t}): ${e instanceof Error?e.message:String(e)}`)}L(this),Z(this)}typeof O.created==`function`&&O.created.apply(this,e)})},moved:function(...e){t(this,`onMoved`,e),typeof O.moved==`function`&&O.moved.apply(this,e)},attached:function(...e){M(this),Array.isArray(N)&&N.length&&!this[y]&&Object.defineProperty(this,y,{value:N,configurable:!0,enumerable:!1,writable:!1}),F(this),J(this,()=>{if(I!==`created`||!this.__wevu)try{c(this,C,w,T,{deferSetData:!0,snapshotOmitKeys:R})}catch(e){let t=V(this);throw Error(`[wevu] mount runtime failed in attached (${t}): ${e instanceof Error?e.message:String(e)}`)}L(this),q(this,`created`,e),q(this,`beforeMount`,e),Z(this),X(this),s(this),t(this,`onAttached`,e),typeof O.attached==`function`&&O.attached.apply(this,e)})},ready:function(...e){if(!(z&&!this[g]&&d(this,void 0,{start:!0,onComplete:t=>{t&&!this.__wevuInitialNavigationReady&&(this.__wevuInitialNavigationReady=!0,Q.lifetimes.ready.call(this,...e))}})&&!this.__wevuInitialNavigationReady)){if(le(this),z&&typeof E.onReady==`function`){let t=!!this[g];if(E.onReady.call(this,...e),!t){let t=()=>q(this,`mounted`,e);d(this,void 0,{start:!1,onComplete:e=>{e&&t()}})||t()}typeof O.ready==`function`&&O.ready.apply(this,e);return}if(!this[g]){this[g]=!0,L(this),b(this),o(this,()=>{t(this,`onReady`,e),q(this,`mounted`,e),typeof O.ready==`function`&&O.ready.apply(this,e)});return}typeof O.ready==`function`&&O.ready.apply(this,e)}},detached:function(...e){if(q(this,`beforeUnmount`,e),q(this,`beforeDestroy`,e),b(this),t(this,`onDetached`,e),z&&typeof E.onUnload==`function`){E.onUnload.call(this,...e),typeof O.detached==`function`&&O.detached.apply(this,e),q(this,`unmounted`,e),q(this,`destroyed`,e);return}a(this),Array.isArray(P)&&P.length&&this[p]&&(ne(P,this[p]),delete this[p]),u(this),q(this,`unmounted`,e),q(this,`destroyed`,e),typeof O.detached==`function`&&O.detached.apply(this,e)},error:function(...e){t(this,`onError`,e),typeof O.error==`function`&&O.error.apply(this,e)}},pageLifetimes:{...k,show:function(...e){if(z&&typeof E.onShow==`function`){E.onShow.call(this,...e),typeof k.show==`function`&&k.show.apply(this,e);return}l(this,!0),t(this,`onShow`,e),typeof k.show==`function`&&k.show.apply(this,e)},hide:function(...e){if(z&&typeof E.onHide==`function`){E.onHide.call(this,...e),typeof k.hide==`function`&&k.hide.apply(this,e);return}l(this,!1),t(this,`onHide`,e),typeof k.hide==`function`&&k.hide.apply(this,e)},resize:function(...e){if(z&&typeof E.onResize==`function`){E.onResize.call(this,...e),typeof k.resize==`function`&&k.resize.apply(this,e);return}t(this,`onResize`,e),typeof k.resize==`function`&&k.resize.apply(this,e)},routeDone:function(...e){if(z&&typeof E.onRouteDone==`function`){E.onRouteDone.call(this,...e),typeof k.routeDone==`function`&&k.routeDone.apply(this,e);return}t(this,`onRouteDone`,e),typeof k.routeDone==`function`&&k.routeDone.apply(this,e)}},methods:{...Y,...A,[_]:function(){var e;let t=K(this);return t.mounted&&(q(this,`created`,[]),q(this,`beforeMount`,[])),(e=t.runtime)==null?void 0:e.proxy}},options:j};if(!H)return Q;let $=(S=e())==null?void 0:S[re];if(typeof($==null?void 0:$.trackWevuComponent)==`function`){let e=$.trackWevuComponent(Q,(e,t)=>{ee(e,C,w,T,{snapshotOmitKeys:R,stateSnapshot:t}),L(e),Z(e),X(e),s(e,{rehydrateSetupState:!0})});return $.isApplying()||f(e,z),e}return f(Q,z),Q}export{x as registerComponentDefinition};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wevu",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.0.
|
|
4
|
+
"version": "7.0.1",
|
|
5
5
|
"description": "Vue 3 风格的小程序运行时,包含响应式、diff+setData 与轻量状态管理",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -271,12 +271,12 @@
|
|
|
271
271
|
}
|
|
272
272
|
},
|
|
273
273
|
"dependencies": {
|
|
274
|
-
"
|
|
275
|
-
"@weapp-core/constants": "0.2.0",
|
|
276
|
-
"@wevu/web-apis": "1.2.38",
|
|
274
|
+
"@weapp-core/constants": "0.2.1",
|
|
277
275
|
"@weapp-core/shared": "3.2.0",
|
|
278
|
-
"@wevu/
|
|
279
|
-
"@wevu/
|
|
276
|
+
"@wevu/api": "0.3.0",
|
|
277
|
+
"@wevu/compiler": "7.0.1",
|
|
278
|
+
"@wevu/web-apis": "1.2.39",
|
|
279
|
+
"vue": "^3.5.42"
|
|
280
280
|
},
|
|
281
281
|
"scripts": {
|
|
282
282
|
"dev": "tsdown -w",
|