wevu 6.16.29 → 6.16.30

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.
@@ -1,4 +1,4 @@
1
- import { $ as setWevuDefaults, A as defineComponent, B as useLayoutHosts, C as useNavigationBarMetrics, Ct as isShallowRef, D as useDisposables, E as useElementIntersectionObserver, F as resolveLayoutBridge, G as teardownRuntimeInstance, H as registerApp, I as resolveLayoutHost, J as setPageLayout, K as runSetupFunction, L as unregisterPageLayoutBridge, M as registerComponent, N as registerPageLayoutBridge, O as createWevuComponent, P as registerRuntimeLayoutHosts, Q as resetWevuDefaults, R as unregisterRuntimeLayoutHosts, S as getNavigationBarMetrics, St as toRefs, T as useIntersectionObserver, Tt as triggerRef, U as mountRuntimeInstance, V as waitForLayoutHost, W as setRuntimeSetDataVisibility, X as syncRuntimePageLayoutStateFromRuntime, Y as syncRuntimePageLayoutState, Z as usePageLayout, _ as useSelectorFields, _t as onServerPrefetch, a as useModel, at as watchPostEffect, b as usePageScrollThrottle, bt as traverse, c as useSlots, ct as setDeepWatchStrategy, d as useUpdatePerformanceListener, dt as onBeforeMount, et as isNoSetData, f as normalizeClass, ft as onBeforeUnmount, g as useScrollOffset, gt as onMounted, h as useBoundingClientRect, ht as onErrorCaptured, i as useChangeModel, it as watchEffect, j as createApp, k as createWevuScopedSlotComponent, l as defineAppSetup, lt as callUpdateHooks, m as resolvePropValue, mt as onDeactivated, n as mergeModels, nt as version, o as useAttrs, ot as watchSyncEffect, p as normalizeStyle, pt as onBeforeUpdate, q as resolveRuntimePageLayoutName, r as useBindModel, rt as watch, s as useNativeInstance, st as getDeepWatchStrategy, t as useTemplateRef, tt as markNoSetData, u as use, ut as onActivated, v as useSelectorQuery, vt as onUnmounted, w as usePageStack, wt as shallowRef, x as getCurrentPageStackSnapshot, xt as toRef, y as useAsyncPullDownRefresh, yt as onUpdated, z as useLayoutBridge } from "./src-C3pTdTFG.mjs";
1
+ import { $ as setWevuDefaults, A as defineComponent, B as useLayoutHosts, C as useNavigationBarMetrics, Ct as isShallowRef, D as useDisposables, E as useElementIntersectionObserver, F as resolveLayoutBridge, G as teardownRuntimeInstance, H as registerApp, I as resolveLayoutHost, J as setPageLayout, K as runSetupFunction, L as unregisterPageLayoutBridge, M as registerComponent, N as registerPageLayoutBridge, O as createWevuComponent, P as registerRuntimeLayoutHosts, Q as resetWevuDefaults, R as unregisterRuntimeLayoutHosts, S as getNavigationBarMetrics, St as toRefs, T as useIntersectionObserver, Tt as triggerRef, U as mountRuntimeInstance, V as waitForLayoutHost, W as setRuntimeSetDataVisibility, X as syncRuntimePageLayoutStateFromRuntime, Y as syncRuntimePageLayoutState, Z as usePageLayout, _ as useSelectorFields, _t as onServerPrefetch, a as useModel, at as watchPostEffect, b as usePageScrollThrottle, bt as traverse, c as useSlots, ct as setDeepWatchStrategy, d as useUpdatePerformanceListener, dt as onBeforeMount, et as isNoSetData, f as normalizeClass, ft as onBeforeUnmount, g as useScrollOffset, gt as onMounted, h as useBoundingClientRect, ht as onErrorCaptured, i as useChangeModel, it as watchEffect, j as createApp, k as createWevuScopedSlotComponent, l as defineAppSetup, lt as callUpdateHooks, m as resolvePropValue, mt as onDeactivated, n as mergeModels, nt as version, o as useAttrs, ot as watchSyncEffect, p as normalizeStyle, pt as onBeforeUpdate, q as resolveRuntimePageLayoutName, r as useBindModel, rt as watch, s as useNativeInstance, st as getDeepWatchStrategy, t as useTemplateRef, tt as markNoSetData, u as use, ut as onActivated, v as useSelectorQuery, vt as onUnmounted, w as usePageStack, wt as shallowRef, x as getCurrentPageStackSnapshot, xt as toRef, y as useAsyncPullDownRefresh, yt as onUpdated, z as useLayoutBridge } from "./src-B6draUWz.mjs";
2
2
  import { C as effect, D as onScopeDispose, E as getCurrentScope, N as nextTick, O as startBatch, S as batch, T as endBatch, a as toValue, b as addMutationRecorder, c as isRaw, d as reactive, f as isShallowReactive, g as touchReactive, h as prelinkReactiveTree, i as ref, k as stop, l as isReactive, n as isRef, o as unref, p as shallowReactive, s as getReactiveVersion, t as customRef, u as markRaw, w as effectScope, x as removeMutationRecorder, y as toRaw } from "./ref-BoBfMdVt.mjs";
3
3
  import { i as computed, n as defineStore, r as createStore, t as storeToRefs } from "./store-eNxaNZbj.mjs";
4
4
  import { $ as onUnhandledRejection, A as setGlobalProvidedValue, B as onPageNotFound, F as onHide, G as onResize, H as onPullDownRefresh, I as onLaunch, J as onShareAppMessage, K as onRouteDone, L as onLoad, M as onAttached, N as onDetached, P as onError, Q as onThemeChange, R as onMemoryWarning, U as onReachBottom, V as onPageScroll, W as onReady, X as onShow, Y as onShareTimeline, Z as onTabItemTap, _ as provide, _t as readonly, at as getCurrentSetupContext, ct as setCurrentSetupContext, et as onUnload, g as injectGlobal, gt as isReadonly, h as inject, ht as isProxy, it as getCurrentInstance, j as onAddToFavorites, m as hasInjectionContext, n as useNativeRouter, nt as callHookList, q as onSaveExitState, rt as callHookReturn, st as setCurrentInstance, t as useNativePageRouter, v as provideGlobal, vt as shallowReadonly, z as onMoved } from "./router-ByTtgUmi.mjs";
@@ -478,7 +478,7 @@ function watchSyncEffect(effectFn, options = {}) {
478
478
 
479
479
  //#endregion
480
480
  //#region package.json
481
- var version$1 = "6.16.29";
481
+ var version$1 = "6.16.30";
482
482
 
483
483
  //#endregion
484
484
  //#region src/version.ts
@@ -525,15 +525,16 @@ function setWithSegments(target, segments, value) {
525
525
  }
526
526
  current[segments[segments.length - 1]] = value;
527
527
  }
528
- function setByPath(state, computedRefs, computedSetters, segments, value) {
528
+ function setByPath(state, setupState, computedRefs, computedSetters, segments, value) {
529
529
  if (!segments.length) return;
530
530
  const [head, ...rest] = segments;
531
531
  if (!rest.length) {
532
532
  if (computedRefs[head]) setComputedValue(computedSetters, head, value);
533
533
  else {
534
- const current = state[head];
534
+ const target = setupState && Object.prototype.hasOwnProperty.call(setupState, head) ? setupState : state;
535
+ const current = target[head];
535
536
  if (isRef(current)) current.value = value;
536
- else state[head] = value;
537
+ else target[head] = value;
537
538
  }
538
539
  return;
539
540
  }
@@ -541,8 +542,9 @@ function setByPath(state, computedRefs, computedSetters, segments, value) {
541
542
  setComputedValue(computedSetters, head, value);
542
543
  return;
543
544
  }
544
- if (state[head] == null || typeof state[head] !== "object") state[head] = {};
545
- setWithSegments(state[head], rest, value);
545
+ const target = setupState && Object.prototype.hasOwnProperty.call(setupState, head) ? setupState : state;
546
+ if (target[head] == null || typeof target[head] !== "object") target[head] = {};
547
+ setWithSegments(target[head], rest, value);
546
548
  }
547
549
  function getFromPath(target, segments) {
548
550
  return segments.reduce((acc, segment) => {
@@ -553,13 +555,13 @@ function getFromPath(target, segments) {
553
555
  function defaultParser(event) {
554
556
  return parseModelEventValue(event);
555
557
  }
556
- function createBindModel(publicInstance, state, computedRefs, computedSetters) {
558
+ function createBindModel(publicInstance, state, computedRefs, computedSetters, setupState) {
557
559
  const bindModel = (path, bindingOptions) => {
558
560
  const segments = toPathSegments(path);
559
561
  if (!segments.length) throw new Error("bindModel 需要非空路径");
560
562
  const resolveValue = () => getFromPath(publicInstance, segments);
561
563
  const assignValue = (value) => {
562
- setByPath(state, computedRefs, computedSetters, segments, value);
564
+ setByPath(state, setupState, computedRefs, computedSetters, segments, value);
563
565
  };
564
566
  const defaultOptions = {
565
567
  event: "input",
@@ -2032,7 +2034,7 @@ function createRuntimeMount(options) {
2032
2034
  if (index >= 0) stopHandles.splice(index, 1);
2033
2035
  }, stopHandle);
2034
2036
  }
2035
- const bindModel = createBindModel(publicInstance, state, computedRefs, computedSetters);
2037
+ const bindModel = createBindModel(publicInstance, state, computedRefs, computedSetters, setupState);
2036
2038
  const unmount = () => {
2037
2039
  if (!mounted) return;
2038
2040
  mounted = false;
@@ -6600,4 +6602,4 @@ function useTemplateRef(name) {
6600
6602
 
6601
6603
  //#endregion
6602
6604
  export { setWevuDefaults as $, defineComponent as A, useLayoutHosts as B, useNavigationBarMetrics as C, isShallowRef as Ct, useDisposables as D, __reExport as Dt, useElementIntersectionObserver as E, __exportAll as Et, resolveLayoutBridge as F, teardownRuntimeInstance as G, registerApp as H, resolveLayoutHost as I, setPageLayout as J, runSetupFunction as K, unregisterPageLayoutBridge as L, registerComponent as M, registerPageLayoutBridge as N, createWevuComponent as O, registerRuntimeLayoutHosts as P, resetWevuDefaults as Q, unregisterRuntimeLayoutHosts as R, getNavigationBarMetrics as S, toRefs as St, useIntersectionObserver as T, triggerRef as Tt, mountRuntimeInstance as U, waitForLayoutHost as V, setRuntimeSetDataVisibility as W, syncRuntimePageLayoutStateFromRuntime as X, syncRuntimePageLayoutState as Y, usePageLayout as Z, useSelectorFields as _, onServerPrefetch as _t, useModel as a, watchPostEffect as at, usePageScrollThrottle as b, traverse as bt, useSlots as c, setDeepWatchStrategy as ct, useUpdatePerformanceListener as d, onBeforeMount as dt, isNoSetData as et, normalizeClass as f, onBeforeUnmount as ft, useScrollOffset as g, onMounted as gt, useBoundingClientRect as h, onErrorCaptured as ht, useChangeModel as i, watchEffect as it, createApp as j, createWevuScopedSlotComponent as k, defineAppSetup as l, callUpdateHooks as lt, resolvePropValue as m, onDeactivated as mt, mergeModels as n, version as nt, useAttrs as o, watchSyncEffect as ot, normalizeStyle as p, onBeforeUpdate as pt, resolveRuntimePageLayoutName as q, useBindModel as r, watch as rt, useNativeInstance as s, getDeepWatchStrategy as st, useTemplateRef as t, markNoSetData as tt, use as u, onActivated as ut, useSelectorQuery as v, onUnmounted as vt, usePageStack as w, shallowRef as wt, getCurrentPageStackSnapshot as x, toRef as xt, useAsyncPullDownRefresh as y, onUpdated as yt, useLayoutBridge as z };
6603
- //# sourceMappingURL=src-C3pTdTFG.mjs.map
6605
+ //# sourceMappingURL=src-B6draUWz.mjs.map