wevu 6.15.6 → 6.15.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index-SDxsBVMY.d.mts → index-51F79u-U.d.mts} +1 -1
- package/dist/{index-DWouSxpz.d.mts → index-B2-lsPjZ.d.mts} +44 -44
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +2 -2
- package/dist/jsx-runtime.d.mts +2 -2
- package/dist/{router-BR3hx21a.mjs → router-B43fz4cM.mjs} +100 -42
- package/dist/router.d.mts +1 -1
- package/dist/router.mjs +1 -1
- package/dist/{src-CwFkiJuJ.mjs → src-CXeO96dW.mjs} +99 -81
- package/dist/store.d.mts +1 -1
- package/dist/vue-demi.d.mts +5 -5
- package/dist/vue-demi.mjs +2 -2
- package/dist/{vue-types-BUOuHH4O.d.mts → vue-types-Ir1bT6Gp.d.mts} +274 -95
- package/dist/{weappIntrinsicElements-CwA7kB31.d.mts → weappIntrinsicElements-Cdfh6BlL.d.mts} +345 -339
- package/package.json +4 -3
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { C as removeMutationRecorder, E as effectScope, F as nextTick, I as queueJob, M as track, N as trigger, P as triggerEffects, S as addMutationRecorder, T as effect, _ as ReactiveFlags, b as isObject$1, d as reactive, g as touchReactive, h as prelinkReactiveTree, i as ref, j as stop, k as onScopeDispose, l as isReactive, m as clearPatchIndices, n as isRef, o as unref, p as shallowReactive, r as markAsRef, s as getReactiveVersion, t as customRef, x as toRaw } from "./ref-mshhFqmk.mjs";
|
|
2
|
-
import { $ as
|
|
2
|
+
import { $ as getCurrentMiniProgramPages, A as onPageScroll, G as callHookList, J as getCurrentSetupContext, K as callHookReturn, Q as getCurrentMiniProgramHostConfig, S as onDetached, U as onUnload, W as assertInSetup, X as setCurrentInstance, Y as pushHook, Z as setCurrentSetupContext, et as getCurrentMiniProgramRuntimeCapabilities, nt as getScopedSlotHostGlobalObject, ot as readonly, q as getCurrentInstance, rt as supportsCurrentMiniProgramRuntimeCapability, tt as getMiniProgramGlobalObject, x as onAttached, y as setGlobalProvidedValue } from "./router-B43fz4cM.mjs";
|
|
3
3
|
import { WEVU_ATTRS_KEY, WEVU_EFFECT_SCOPE_KEY, WEVU_EXPOSED_KEY, WEVU_HOOKS_KEY, WEVU_INLINE_HANDLER, WEVU_INLINE_MAP_KEY, WEVU_IS_APP_INSTANCE_KEY, WEVU_LAYOUT_BRIDGE_PAGE_KEYS, WEVU_LAYOUT_HOST_BRIDGE_KEY, WEVU_MODEL_HANDLER, WEVU_NATIVE_INSTANCE_KEY, WEVU_ON_BEFORE_UPDATE_HOOK, WEVU_ON_LOAD_CALLED_KEY, WEVU_ON_UPDATED_HOOK, WEVU_OWNER_HANDLER, WEVU_PAGE_LAYOUT_NAME_KEY, WEVU_PAGE_LAYOUT_NONE, WEVU_PAGE_LAYOUT_PROPS_KEY, WEVU_PAGE_LAYOUT_SETTER_KEY, WEVU_PAGE_SCROLL_HOOK_DEPTH_KEY, WEVU_PENDING_PROP_VALUES_KEY, WEVU_PROPS_KEY, WEVU_PROP_KEYS_KEY, WEVU_PUBLIC_RUNTIME_KEY, WEVU_READY_CALLED_KEY, WEVU_RESERVED_METHOD_PREFIX, WEVU_ROUTE_DONE_CALLED_KEY, WEVU_ROUTE_DONE_IN_TICK_KEY, WEVU_RUNTIME_APP_KEY, WEVU_RUNTIME_KEY, WEVU_SCOPED_SLOT_CREATOR_KEY, WEVU_SETUP_CONTEXT_INSTANCE_KEY, WEVU_SLOT_OWNER_ID_KEY, WEVU_SLOT_OWNER_ID_PROP, WEVU_SLOT_OWNER_KEY, WEVU_SLOT_PROPS_DATA_KEY, WEVU_SLOT_PROPS_KEY, WEVU_SLOT_SCOPE_KEY, WEVU_TEMPLATE_REFS_CALLBACKS_KEY, WEVU_TEMPLATE_REFS_KEY, WEVU_TEMPLATE_REFS_PENDING_KEY, WEVU_TEMPLATE_REF_MAP_KEY, WEVU_WATCH_STOPS_KEY } from "@weapp-core/constants";
|
|
4
|
+
import { resolveMiniProgramPageKeys } from "@weapp-core/shared";
|
|
4
5
|
//#region src/reactivity/shallowRef.ts
|
|
5
6
|
/**
|
|
6
7
|
* 创建一个“浅层” ref:它只在 .value 被整体替换时触发依赖,不会对内部对象做深层响应式处理。
|
|
@@ -432,7 +433,7 @@ function watchSyncEffect(effectFn, options = {}) {
|
|
|
432
433
|
}
|
|
433
434
|
//#endregion
|
|
434
435
|
//#region src/version.ts
|
|
435
|
-
const version = "6.15.
|
|
436
|
+
const version = "6.15.7";
|
|
436
437
|
//#endregion
|
|
437
438
|
//#region src/utils.ts
|
|
438
439
|
function capitalize(str) {
|
|
@@ -2116,7 +2117,7 @@ function runInlineExpression(ctx, expr, event, inlineMap) {
|
|
|
2116
2117
|
}
|
|
2117
2118
|
//#endregion
|
|
2118
2119
|
//#region src/runtime/register/component/lifecycle/platform.ts
|
|
2119
|
-
let
|
|
2120
|
+
let miniProgramGlobalPatched = false;
|
|
2120
2121
|
let currentPageInstance;
|
|
2121
2122
|
function getCurrentPageInstance() {
|
|
2122
2123
|
return currentPageInstance;
|
|
@@ -2142,63 +2143,71 @@ function runInPageScrollHook(target, task) {
|
|
|
2142
2143
|
function resolvePageOptions(target) {
|
|
2143
2144
|
const direct = target.options;
|
|
2144
2145
|
if (direct && typeof direct === "object") return direct;
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
const options = page && typeof page === "object" ? page.options : void 0;
|
|
2149
|
-
if (options && typeof options === "object") return options;
|
|
2150
|
-
}
|
|
2146
|
+
const page = getCurrentMiniProgramPages().at(-1);
|
|
2147
|
+
const options = page && typeof page === "object" ? page.options : void 0;
|
|
2148
|
+
if (options && typeof options === "object") return options;
|
|
2151
2149
|
return {};
|
|
2152
2150
|
}
|
|
2153
|
-
function
|
|
2154
|
-
if (
|
|
2155
|
-
|
|
2156
|
-
const
|
|
2157
|
-
if (!
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2151
|
+
function ensureMiniProgramGlobalPatched() {
|
|
2152
|
+
if (miniProgramGlobalPatched) return;
|
|
2153
|
+
miniProgramGlobalPatched = true;
|
|
2154
|
+
const miniProgramGlobal = getMiniProgramGlobalObject();
|
|
2155
|
+
if (!miniProgramGlobal || typeof miniProgramGlobal !== "object") return;
|
|
2156
|
+
if (supportsCurrentMiniProgramRuntimeCapability("pullDownRefreshApi")) {
|
|
2157
|
+
const rawStartPullDownRefresh = miniProgramGlobal.startPullDownRefresh;
|
|
2158
|
+
if (typeof rawStartPullDownRefresh === "function") miniProgramGlobal.startPullDownRefresh = function startPullDownRefreshPatched(...args) {
|
|
2159
|
+
const result = rawStartPullDownRefresh.apply(this, args);
|
|
2160
|
+
if (currentPageInstance) callHookList(currentPageInstance, "onPullDownRefresh", []);
|
|
2161
|
+
return result;
|
|
2162
|
+
};
|
|
2163
|
+
}
|
|
2164
|
+
if (supportsCurrentMiniProgramRuntimeCapability("pageScrollApi")) {
|
|
2165
|
+
const rawPageScrollTo = miniProgramGlobal.pageScrollTo;
|
|
2166
|
+
if (typeof rawPageScrollTo === "function") miniProgramGlobal.pageScrollTo = function pageScrollToPatched(options, ...rest) {
|
|
2167
|
+
const result = rawPageScrollTo.apply(this, [options, ...rest]);
|
|
2168
|
+
if (currentPageInstance) {
|
|
2169
|
+
const pageInstance = currentPageInstance;
|
|
2170
|
+
runInPageScrollHook(pageInstance, () => {
|
|
2171
|
+
callHookList(pageInstance, "onPageScroll", [options !== null && options !== void 0 ? options : {}]);
|
|
2172
|
+
});
|
|
2173
|
+
}
|
|
2174
|
+
return result;
|
|
2175
|
+
};
|
|
2176
|
+
}
|
|
2175
2177
|
}
|
|
2176
2178
|
function ensurePageShareMenus(options) {
|
|
2177
2179
|
const { enableOnShareAppMessage, enableOnShareTimeline } = options;
|
|
2178
2180
|
if (!enableOnShareAppMessage && !enableOnShareTimeline) return;
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
if (!(enableOnShareAppMessage || enableOnShareTimeline)) return;
|
|
2187
|
-
const menus = ["shareAppMessage"];
|
|
2181
|
+
if (!supportsCurrentMiniProgramRuntimeCapability("pageShareMenu")) return;
|
|
2182
|
+
const miniProgramGlobal = getMiniProgramGlobalObject();
|
|
2183
|
+
if (!miniProgramGlobal || typeof miniProgramGlobal.showShareMenu !== "function") return;
|
|
2184
|
+
const shouldShowShareAppMessage = getCurrentMiniProgramRuntimeCapabilities().shareTimelineRequiresShareAppMessage ? enableOnShareAppMessage || enableOnShareTimeline : enableOnShareAppMessage;
|
|
2185
|
+
if (!shouldShowShareAppMessage && !enableOnShareTimeline) return;
|
|
2186
|
+
const menus = [];
|
|
2187
|
+
if (shouldShowShareAppMessage) menus.push("shareAppMessage");
|
|
2188
2188
|
if (enableOnShareTimeline) menus.push("shareTimeline");
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2189
|
+
const payloads = [
|
|
2190
|
+
{
|
|
2191
|
+
withShareTicket: true,
|
|
2192
|
+
menus
|
|
2193
|
+
},
|
|
2194
|
+
{ menus },
|
|
2195
|
+
enableOnShareTimeline ? { withShareTicket: true } : void 0,
|
|
2196
|
+
enableOnShareTimeline ? {} : void 0,
|
|
2197
|
+
void 0
|
|
2198
|
+
];
|
|
2199
|
+
for (const payload of payloads) try {
|
|
2200
|
+
if (payload === void 0) miniProgramGlobal.showShareMenu();
|
|
2201
|
+
else miniProgramGlobal.showShareMenu(payload);
|
|
2202
|
+
break;
|
|
2203
|
+
} catch (_unused) {}
|
|
2193
2204
|
}
|
|
2194
2205
|
//#endregion
|
|
2195
2206
|
//#region src/runtime/pageLayout.ts
|
|
2196
2207
|
function resolveCurrentPageInstance$1() {
|
|
2197
2208
|
const runtimeCurrentPage = getCurrentPageInstance();
|
|
2198
2209
|
if (runtimeCurrentPage) return runtimeCurrentPage;
|
|
2199
|
-
|
|
2200
|
-
if (typeof getCurrentPagesFn !== "function") return;
|
|
2201
|
-
return getCurrentPagesFn().at(-1);
|
|
2210
|
+
return getCurrentMiniProgramPages().at(-1);
|
|
2202
2211
|
}
|
|
2203
2212
|
function normalizeRuntimePageLayoutName(layout) {
|
|
2204
2213
|
return layout === WEVU_PAGE_LAYOUT_NONE ? false : layout;
|
|
@@ -2461,8 +2470,14 @@ function ensureRefsContainer(target) {
|
|
|
2461
2470
|
function createSelectorQuery(target) {
|
|
2462
2471
|
const instance = target;
|
|
2463
2472
|
if (instance && typeof instance.createSelectorQuery === "function") return instance.createSelectorQuery();
|
|
2473
|
+
if (!supportsCurrentMiniProgramRuntimeCapability("globalCreateSelectorQuery")) return null;
|
|
2464
2474
|
const miniProgramGlobal = getMiniProgramGlobalObject();
|
|
2465
|
-
if (miniProgramGlobal && typeof miniProgramGlobal.createSelectorQuery === "function")
|
|
2475
|
+
if (miniProgramGlobal && typeof miniProgramGlobal.createSelectorQuery === "function") {
|
|
2476
|
+
const query = miniProgramGlobal.createSelectorQuery();
|
|
2477
|
+
if (!query) return null;
|
|
2478
|
+
if (getCurrentMiniProgramRuntimeCapabilities().selectorQueryScopeByIn && typeof query.in === "function") return query.in(instance);
|
|
2479
|
+
return query;
|
|
2480
|
+
}
|
|
2466
2481
|
return null;
|
|
2467
2482
|
}
|
|
2468
2483
|
function runQuery(target, selector, options, apply, cb) {
|
|
@@ -2795,9 +2810,10 @@ function ensureSetupContextInstance(target, runtime) {
|
|
|
2795
2810
|
const nativeOwner = resolveSetupBridgeOwner("createSelectorQuery");
|
|
2796
2811
|
if (nativeOwner && typeof nativeOwner.createSelectorQuery === "function") return nativeOwner.createSelectorQuery();
|
|
2797
2812
|
const miniProgramGlobal = getMiniProgramGlobalObject();
|
|
2798
|
-
if (!miniProgramGlobal || typeof miniProgramGlobal.createSelectorQuery !== "function") return;
|
|
2813
|
+
if (!supportsCurrentMiniProgramRuntimeCapability("globalCreateSelectorQuery") || !miniProgramGlobal || typeof miniProgramGlobal.createSelectorQuery !== "function") return;
|
|
2799
2814
|
const query = miniProgramGlobal.createSelectorQuery();
|
|
2800
|
-
if (!query
|
|
2815
|
+
if (!query) return query;
|
|
2816
|
+
if (!getCurrentMiniProgramRuntimeCapabilities().selectorQueryScopeByIn || typeof query.in !== "function") return query;
|
|
2801
2817
|
const scopedOwner = (_resolveRuntimeNative = resolveRuntimeNativeMethodOwner(runtime, target, "setData")) !== null && _resolveRuntimeNative !== void 0 ? _resolveRuntimeNative : target;
|
|
2802
2818
|
return query.in(scopedOwner);
|
|
2803
2819
|
});
|
|
@@ -2806,9 +2822,10 @@ function ensureSetupContextInstance(target, runtime) {
|
|
|
2806
2822
|
const nativeOwner = resolveSetupBridgeOwner("createIntersectionObserver");
|
|
2807
2823
|
if (nativeOwner && typeof nativeOwner.createIntersectionObserver === "function") return nativeOwner.createIntersectionObserver(options !== null && options !== void 0 ? options : {});
|
|
2808
2824
|
const miniProgramGlobal = getMiniProgramGlobalObject();
|
|
2809
|
-
if (!miniProgramGlobal || typeof miniProgramGlobal.createIntersectionObserver !== "function") return;
|
|
2825
|
+
if (!supportsCurrentMiniProgramRuntimeCapability("globalCreateIntersectionObserver") || !miniProgramGlobal || typeof miniProgramGlobal.createIntersectionObserver !== "function") return;
|
|
2810
2826
|
const scopedOwner = (_resolveRuntimeNative2 = resolveRuntimeNativeMethodOwner(runtime, target, "setData")) !== null && _resolveRuntimeNative2 !== void 0 ? _resolveRuntimeNative2 : target;
|
|
2811
|
-
return miniProgramGlobal.createIntersectionObserver(scopedOwner, options !== null && options !== void 0 ? options : {});
|
|
2827
|
+
if (getCurrentMiniProgramRuntimeCapabilities().intersectionObserverScopeByParameter) return miniProgramGlobal.createIntersectionObserver(scopedOwner, options !== null && options !== void 0 ? options : {});
|
|
2828
|
+
return miniProgramGlobal.createIntersectionObserver(options !== null && options !== void 0 ? options : {});
|
|
2812
2829
|
});
|
|
2813
2830
|
defineSetupInstanceMethod(setupInstanceBridge, "setData", (payload, callback) => {
|
|
2814
2831
|
const nativeOwner = resolveSetupBridgeOwner("setData");
|
|
@@ -3138,9 +3155,8 @@ function resolveHighFrequencyWarningOptions(option) {
|
|
|
3138
3155
|
* 判断当前是否为开发态运行环境。
|
|
3139
3156
|
*/
|
|
3140
3157
|
function isDevelopmentRuntime() {
|
|
3141
|
-
const
|
|
3142
|
-
|
|
3143
|
-
if ((wxConfig === null || wxConfig === void 0 ? void 0 : wxConfig.debug) === true || (wxConfig === null || wxConfig === void 0 ? void 0 : wxConfig.envVersion) === "develop") return true;
|
|
3158
|
+
const miniProgramHostConfig = getCurrentMiniProgramHostConfig();
|
|
3159
|
+
if ((miniProgramHostConfig === null || miniProgramHostConfig === void 0 ? void 0 : miniProgramHostConfig.debug) === true || (miniProgramHostConfig === null || miniProgramHostConfig === void 0 ? void 0 : miniProgramHostConfig.envVersion) === "develop") return true;
|
|
3144
3160
|
const miniProgramGlobal = getMiniProgramGlobalObject();
|
|
3145
3161
|
try {
|
|
3146
3162
|
var _miniProgramGlobal$ge;
|
|
@@ -3453,9 +3469,13 @@ const MEMORY_WARNING_LISTENER_KEY = "__wevuOnMemoryWarningListener";
|
|
|
3453
3469
|
function bindMemoryWarningListener(target) {
|
|
3454
3470
|
const hooks = target[WEVU_HOOKS_KEY];
|
|
3455
3471
|
const hasMemoryWarningHook = Boolean(hooks === null || hooks === void 0 ? void 0 : hooks.onMemoryWarning);
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3472
|
+
if (!supportsCurrentMiniProgramRuntimeCapability("appMemoryWarningListener")) {
|
|
3473
|
+
delete target[MEMORY_WARNING_LISTENER_KEY];
|
|
3474
|
+
return;
|
|
3475
|
+
}
|
|
3476
|
+
const miniProgramGlobal = getMiniProgramGlobalObject();
|
|
3477
|
+
const onMemoryWarning = miniProgramGlobal === null || miniProgramGlobal === void 0 ? void 0 : miniProgramGlobal.onMemoryWarning;
|
|
3478
|
+
const offMemoryWarning = miniProgramGlobal === null || miniProgramGlobal === void 0 ? void 0 : miniProgramGlobal.offMemoryWarning;
|
|
3459
3479
|
if (typeof onMemoryWarning !== "function") return;
|
|
3460
3480
|
const existing = target[MEMORY_WARNING_LISTENER_KEY];
|
|
3461
3481
|
if (typeof existing === "function" && typeof offMemoryWarning === "function") try {
|
|
@@ -3473,14 +3493,19 @@ function bindMemoryWarningListener(target) {
|
|
|
3473
3493
|
}
|
|
3474
3494
|
function bindAppGlobalListener(target, options) {
|
|
3475
3495
|
var _ref, _ref$APP_GLOBAL_LISTE;
|
|
3476
|
-
const { hookName, onApiName, offApiName, userHandler } = options;
|
|
3496
|
+
const { hookName, onApiName, offApiName, capabilityName, userHandler } = options;
|
|
3477
3497
|
const hooks = target[WEVU_HOOKS_KEY];
|
|
3478
3498
|
const hasHook = Boolean(hooks === null || hooks === void 0 ? void 0 : hooks[hookName]);
|
|
3479
|
-
const wxGlobal = getMiniProgramGlobalObject();
|
|
3480
|
-
const onApi = wxGlobal === null || wxGlobal === void 0 ? void 0 : wxGlobal[onApiName];
|
|
3481
|
-
const offApi = wxGlobal === null || wxGlobal === void 0 ? void 0 : wxGlobal[offApiName];
|
|
3482
3499
|
const store = (_ref$APP_GLOBAL_LISTE = (_ref = target)[APP_GLOBAL_LISTENER_STORE_KEY]) !== null && _ref$APP_GLOBAL_LISTE !== void 0 ? _ref$APP_GLOBAL_LISTE : _ref[APP_GLOBAL_LISTENER_STORE_KEY] = Object.create(null);
|
|
3483
3500
|
const existing = store[hookName];
|
|
3501
|
+
if (!supportsCurrentMiniProgramRuntimeCapability(capabilityName)) {
|
|
3502
|
+
delete store[hookName];
|
|
3503
|
+
delete target[hookName];
|
|
3504
|
+
return;
|
|
3505
|
+
}
|
|
3506
|
+
const miniProgramGlobal = getMiniProgramGlobalObject();
|
|
3507
|
+
const onApi = miniProgramGlobal === null || miniProgramGlobal === void 0 ? void 0 : miniProgramGlobal[onApiName];
|
|
3508
|
+
const offApi = miniProgramGlobal === null || miniProgramGlobal === void 0 ? void 0 : miniProgramGlobal[offApiName];
|
|
3484
3509
|
if (typeof existing === "function" && typeof offApi === "function") try {
|
|
3485
3510
|
offApi(existing);
|
|
3486
3511
|
} catch (_unused2) {}
|
|
@@ -3501,24 +3526,28 @@ function bindAppGlobalListeners(target, handlers) {
|
|
|
3501
3526
|
hookName: "onError",
|
|
3502
3527
|
onApiName: "onError",
|
|
3503
3528
|
offApiName: "offError",
|
|
3529
|
+
capabilityName: "appErrorListener",
|
|
3504
3530
|
userHandler: handlers.onError
|
|
3505
3531
|
});
|
|
3506
3532
|
bindAppGlobalListener(target, {
|
|
3507
3533
|
hookName: "onPageNotFound",
|
|
3508
3534
|
onApiName: "onPageNotFound",
|
|
3509
3535
|
offApiName: "offPageNotFound",
|
|
3536
|
+
capabilityName: "appPageNotFoundListener",
|
|
3510
3537
|
userHandler: handlers.onPageNotFound
|
|
3511
3538
|
});
|
|
3512
3539
|
bindAppGlobalListener(target, {
|
|
3513
3540
|
hookName: "onUnhandledRejection",
|
|
3514
3541
|
onApiName: "onUnhandledRejection",
|
|
3515
3542
|
offApiName: "offUnhandledRejection",
|
|
3543
|
+
capabilityName: "appUnhandledRejectionListener",
|
|
3516
3544
|
userHandler: handlers.onUnhandledRejection
|
|
3517
3545
|
});
|
|
3518
3546
|
bindAppGlobalListener(target, {
|
|
3519
3547
|
hookName: "onThemeChange",
|
|
3520
3548
|
onApiName: "onThemeChange",
|
|
3521
3549
|
offApiName: "offThemeChange",
|
|
3550
|
+
capabilityName: "appThemeChangeListener",
|
|
3522
3551
|
userHandler: handlers.onThemeChange
|
|
3523
3552
|
});
|
|
3524
3553
|
}
|
|
@@ -3704,7 +3733,7 @@ function createPageLifecycleHooks(options) {
|
|
|
3704
3733
|
},
|
|
3705
3734
|
onShow(...args) {
|
|
3706
3735
|
if (isPage) {
|
|
3707
|
-
|
|
3736
|
+
ensureMiniProgramGlobalPatched();
|
|
3708
3737
|
bindCurrentPageInstance(this);
|
|
3709
3738
|
if (!this[WEVU_ON_LOAD_CALLED_KEY]) pageLifecycleHooks.onLoad.call(this, resolvePageOptions(this));
|
|
3710
3739
|
ensurePageShareMenus({
|
|
@@ -4138,25 +4167,14 @@ function createPropsSync(options) {
|
|
|
4138
4167
|
//#endregion
|
|
4139
4168
|
//#region src/runtime/layoutBridge.ts
|
|
4140
4169
|
const pageLayoutBridges = /* @__PURE__ */ new Map();
|
|
4141
|
-
const LEADING_SLASH_RE = /^\/+/;
|
|
4142
4170
|
function resolveCurrentPageInstance() {
|
|
4143
|
-
|
|
4144
|
-
if (typeof getCurrentPagesFn !== "function") return;
|
|
4145
|
-
return getCurrentPagesFn().at(-1);
|
|
4171
|
+
return getCurrentMiniProgramPages().at(-1);
|
|
4146
4172
|
}
|
|
4147
4173
|
function normalizeSelectors(selectors) {
|
|
4148
4174
|
return Array.from(new Set(Array.isArray(selectors) ? selectors : [selectors])).filter((selector) => typeof selector === "string" && selector.length > 0);
|
|
4149
4175
|
}
|
|
4150
4176
|
function resolvePageKeys(page) {
|
|
4151
|
-
|
|
4152
|
-
if (!page || typeof page !== "object") return keys;
|
|
4153
|
-
const webviewId = page.__wxWebviewId__;
|
|
4154
|
-
if (typeof webviewId === "number" || typeof webviewId === "string") keys.push(`webview:${String(webviewId)}`);
|
|
4155
|
-
const exparserNodeId = page.__wxExparserNodeId__;
|
|
4156
|
-
if (typeof exparserNodeId === "number" || typeof exparserNodeId === "string") keys.push(`exparser:${String(exparserNodeId)}`);
|
|
4157
|
-
const route = typeof page.route === "string" ? page.route.replace(LEADING_SLASH_RE, "") : "";
|
|
4158
|
-
if (route) keys.push(`route:${route}`);
|
|
4159
|
-
return Array.from(new Set(keys));
|
|
4177
|
+
return resolveMiniProgramPageKeys(page);
|
|
4160
4178
|
}
|
|
4161
4179
|
function resolvePageFromContext(context) {
|
|
4162
4180
|
if (context && typeof context.__wevuSetPageLayout === "function") return context;
|
|
@@ -4696,10 +4714,9 @@ function createApp(options) {
|
|
|
4696
4714
|
}
|
|
4697
4715
|
if (hasGlobalApp) {
|
|
4698
4716
|
const globalObject = getMiniProgramGlobalObject();
|
|
4699
|
-
const hasWxConfig = typeof (globalObject === null || globalObject === void 0 ? void 0 : globalObject.__wxConfig) !== "undefined";
|
|
4700
4717
|
const appRegisterKey = "__wevuAppRegistered";
|
|
4701
|
-
if (!(
|
|
4702
|
-
if (
|
|
4718
|
+
if (!(globalObject ? Boolean(globalObject[appRegisterKey]) : false)) {
|
|
4719
|
+
if (globalObject) globalObject[appRegisterKey] = true;
|
|
4703
4720
|
registerApp(runtimeApp, methods !== null && methods !== void 0 ? methods : {}, appWatch, appSetup, mpOptions);
|
|
4704
4721
|
}
|
|
4705
4722
|
}
|
|
@@ -5237,16 +5254,17 @@ function createObserverFromInstance(instance, options) {
|
|
|
5237
5254
|
return creator.call(nativeInstance, options);
|
|
5238
5255
|
}
|
|
5239
5256
|
function createObserverFromGlobal(instance, options) {
|
|
5257
|
+
if (!supportsCurrentMiniProgramRuntimeCapability("globalCreateIntersectionObserver")) return;
|
|
5240
5258
|
const miniProgramGlobal = getMiniProgramGlobalObject();
|
|
5241
5259
|
const creator = miniProgramGlobal === null || miniProgramGlobal === void 0 ? void 0 : miniProgramGlobal.createIntersectionObserver;
|
|
5242
5260
|
if (typeof creator !== "function") return;
|
|
5243
|
-
return creator.call(miniProgramGlobal, instance, options);
|
|
5261
|
+
return getCurrentMiniProgramRuntimeCapabilities().intersectionObserverScopeByParameter ? creator.call(miniProgramGlobal, instance, options) : creator.call(miniProgramGlobal, options);
|
|
5244
5262
|
}
|
|
5245
5263
|
/**
|
|
5246
5264
|
* 在 setup 中创建 IntersectionObserver,并在卸载时自动断开。
|
|
5247
5265
|
*
|
|
5248
5266
|
* - 优先使用 `ctx.instance.createIntersectionObserver(options)`。
|
|
5249
|
-
* -
|
|
5267
|
+
* - 不可用时回退到宿主全局对象的 `createIntersectionObserver(...)`。
|
|
5250
5268
|
*/
|
|
5251
5269
|
function useIntersectionObserver(options = {}) {
|
|
5252
5270
|
var _createObserverFromIn;
|
package/dist/store.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
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-
|
|
1
|
+
import { a as ActionContext, c as MutationType, d as SubscriptionCallback, i as defineStore, l as StoreManager, n as storeToRefs, o as ActionSubscriber, r as createStore, s as DefineStoreOptions, t as StoreToRefsResult, u as StoreSubscribeOptions } from "./index-51F79u-U.mjs";
|
|
2
2
|
export { ActionContext, ActionSubscriber, DefineStoreOptions, MutationType, StoreManager, StoreSubscribeOptions, StoreToRefsResult, SubscriptionCallback, createStore, defineStore, storeToRefs };
|
package/dist/vue-demi.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { $ as
|
|
3
|
-
import { $ as PageLayoutState, $t as onTabItemTap, A as defineAppSetup, An as
|
|
4
|
-
import { a as ActionContext, c as MutationType, d as SubscriptionCallback, i as defineStore, l as StoreManager, n as storeToRefs, o as ActionSubscriber, r as createStore, s as DefineStoreOptions, t as StoreToRefsResult, u as StoreSubscribeOptions } from "./index-
|
|
1
|
+
import { a as MiniProgramCSSProperties, c as MiniProgramIntrinsicEventHandler, d as WeappIntrinsicElementBaseAttributes, f as WeappIntrinsicEventHandler, i as WeappIntrinsicElements, l as WeappCSSProperties, n as MiniProgramIntrinsicElements, o as MiniProgramDatasetAttributes, r as WeappHtmlAliasIntrinsicElements, s as MiniProgramIntrinsicElementBaseAttributes, t as MiniProgramHtmlAliasIntrinsicElements, u as WeappDatasetAttributes } from "./weappIntrinsicElements-Cdfh6BlL.mjs";
|
|
2
|
+
import { $ as shallowRef, $n as HostMiniProgramNodesRefFields, A as watchPostEffect, An as MiniProgramPageLifetimes, Ar as TtMiniProgramHostSourceContract, At as nextTick, B as WatchOptions, Bn as HostMiniProgramComponentInstance, Bt as MaybeRef, C as ExtractMethods, Cn as MiniProgramAppOptions, Cr as MiniProgramHostSourceRegistry, Ct as effect, D as ModelBindingPayload, Dn as MiniProgramComponentPropertyValue, Dr as MiniProgramRuntimeHostNamespaceBySource, Dt as onScopeDispose, E as ModelBindingOptions, En as MiniProgramComponentOptions, Er as MiniProgramPlatformHostSourceRegistry, Et as getCurrentScope, F as OnCleanup, Fn as HostMiniProgramBoundingClientRectResult, Fr as WechatMiniProgramHostNamespace, Ft as WritableComputedRef, G as WatchStopHandle, Gn as HostMiniProgramComponentTrivialInstance, Gt as isRef, H as WatchSource, Hn as HostMiniProgramComponentPropertyOption, Ht as Ref, I as WatchCallback, In as HostMiniProgramComponentAllFullProperty, Ir as DefaultMiniProgramHostNamespace, It as computed, J as traverse, Jn as HostMiniProgramIntersectionObserverOptions, Jt as unref, K as getDeepWatchStrategy, Kn as HostMiniProgramComponentTrivialOption, Kt as ref, L as WatchEffect, Ln as HostMiniProgramComponentAllProperty, Lt as CustomRefFactory, M as MapSources, Mn as HostMiniProgramAppOptions, Mr as DouyinMiniProgramHostNamespace, Mt as ComputedRef, N as MaybeUndefined, Nn as HostMiniProgramAppTrivialInstance, Nr as TtMiniProgramHostNamespace, Nt as ComputedSetter, O as watch, On as MiniProgramComponentRawOptions, Or as MiniProgramRuntimeHostSourceName, Ot as startBatch, P as MultiWatchSources, Pn as HostMiniProgramBehaviorIdentifier, Pr as AlipayMiniProgramHostNamespace, Pt as WritableComputedOptions, Q as isShallowRef, Qn as HostMiniProgramNodesRef, Qt as MiniProgramRouterSwitchTabOption, R as WatchEffectOptions, Rn as HostMiniProgramComponentBehaviorOptions, Rt as CustomRefOptions, S as ExtractComputed, Sn as MiniProgramAdapter, Sr as MiniProgramHostSourceName, St as batch, T as ModelBinding, Tn as MiniProgramComponentInstance, Tr as MiniProgramPlatformHostSourceName, Tt as endBatch, U as WatchSourceValue, Un as HostMiniProgramComponentPropertyValue, Ut as ShallowRef, V as WatchScheduler, Vn as HostMiniProgramComponentMethodOption, Vt as MaybeRefOrGetter, W as WatchSources, Wn as HostMiniProgramComponentShortProperty, Wt as customRef, X as toRef, Xn as HostMiniProgramMemoryWarningResult, Xt as MiniProgramRouterReLaunchOption, Y as ToRefs, Yn as HostMiniProgramLaunchOptions, Yt as MiniProgramRouterNavigateToOption, Z as toRefs, Zn as HostMiniProgramNavigateToOption, Zt as MiniProgramRouterRedirectToOption, _ as RuntimeApp, _n as NativeTypeHint, _r as MiniProgramHostNamespace, _t as MutationOp, a as NativeComponent, ar as HostMiniProgramReLaunchOption, at as getReactiveVersion, b as ComponentPublicInstance, bn as PropOptions, br as DouyinMiniProgramHostSourceContract, bt as removeMutationRecorder, c as ShallowUnwrapRef, cn as ExtractDefaultPropTypes, cr as HostMiniProgramSaveExitState, ct as markRaw, d as SetupContext, dn as InferNativePropType, dr as HostMiniProgramShareAppMessageOption, dt as isShallowReactive, er as HostMiniProgramPageLifetime, et as triggerRef, f as SetupContextNativeInstance, fn as InferNativeProps, fr as HostMiniProgramSwitchTabOption, ft as shallowReactive, g as InternalRuntimeStateFields, gn as NativePropsOptions, gr as HostMiniProgramUnhandledRejectionResult, gt as MutationKind, h as InternalRuntimeState, hn as NativePropType, hr as HostMiniProgramTriggerEventOptions, ht as touchReactive, i as DefineComponent, ir as HostMiniProgramPageTrivialInstance, it as shallowReadonly, j as watchSyncEffect, jn as HostMiniProgramAddToFavoritesOption, jr as WechatMiniProgramHostSourceContract, jt as ComputedGetter, k as watchEffect, kn as MiniProgramInstance, kr as MiniProgramRuntimeHostSourceRegistry, kt as stop, l as VNode, ln as ExtractPropTypes, lr as HostMiniProgramScrollOffsetResult, lt as reactive, m as AppConfig, mn as InferProps, mr as HostMiniProgramThemeChangeResult, mt as prelinkReactiveTree, n as ComponentCustomProps, nr as HostMiniProgramPageResizeOption, nt as isReadonly, o as ObjectDirective, on as WevuTypedRouterRouteMap, or as HostMiniProgramRedirectToOption, ot as isRaw, p as SetupFunction, pn as InferPropType, pr as HostMiniProgramTabItemTapOption, pt as PrelinkReactiveTreeOptions, q as setDeepWatchStrategy, qn as HostMiniProgramIntersectionObserver, qt as toValue, r as ComponentOptionsMixin, rn as SetupContextRouter, rr as HostMiniProgramPageScrollOption, rt as readonly, s as PublicProps, sn as ComponentPropsOptions, sr as HostMiniProgramRouter, st as isReactive, t as AllowedComponentProps, tr as HostMiniProgramPageNotFoundOptions, tt as isProxy, u as VNodeProps, un as ExtractPublicPropTypes, ur as HostMiniProgramSelectorQuery, ut as toRaw, v as RuntimeInstance, vn as NativeTypedProperty, vr as AlipayMiniProgramHostSourceContract, vt as MutationRecord, w as MethodDefinitions, wn as MiniProgramBehaviorIdentifier, wr as MiniProgramPlatformHostNamespaceBySource, wt as effectScope, x as ComputedDefinitions, xn as PropType, xr as MiniProgramHostNamespaceBySource, xt as EffectScope, y as WevuPlugin, yn as PropConstructor, yr as DefaultMiniProgramHostSourceContract, yt as addMutationRecorder, z as WatchMultiSources, zn as HostMiniProgramComponentEmptyArray, zt as CustomRefSource } from "./vue-types-Ir1bT6Gp.mjs";
|
|
3
|
+
import { $ as PageLayoutState, $t as onTabItemTap, A as defineAppSetup, An as MiniProgramTemplateRefValue, At as onServerPrefetch, B as setRuntimeSetDataVisibility, Bn as SetDataDebugInfo, Bt as onMemoryWarning, C as UseModelOptions, Cn as defineComponent, Ct as onActivated, D as useAttrs, Dn as createApp, Dt as onDeactivated, E as useModel, En as setWevuDefaults, Et as onBeforeUpdate, F as useUpdatePerformanceListener, Fn as CreateAppOptions, Ft as onDetached, G as inject, Gt as onReachBottom, H as registerComponent, Ht as onPageNotFound, I as normalizeClass, In as DataOption, It as onError, J as provideGlobal, Jt as onRouteDone, K as injectGlobal, Kt as onReady, L as normalizeStyle, Ln as DefineAppOptions, Lt as onHide, M as UpdatePerformanceListener, Mn as TemplateRefs, Mt as onUpdated, N as UpdatePerformanceListenerResult, Nn as WevuGlobalComponents, Nt as onAddToFavorites, O as useNativeInstance, On as GlobalComponents, Ot as onErrorCaptured, P as UseUpdatePerformanceListenerStopHandle, Pn as WevuGlobalDirectives, Pt as onAttached, Q as usePageScrollThrottle, Qt as onShow, R as runSetupFunction, Rn as DefineComponentOptions, Rt as onLaunch, S as ModelModifiers, Sn as createWevuScopedSlotComponent, St as callUpdateHooks, T as useBindModel, Tn as resetWevuDefaults, Tt as onBeforeUnmount, U as registerApp, Ut as onPageScroll, V as teardownRuntimeInstance, Vn as SetDataSnapshotOptions, Vt as onMoved, W as hasInjectionContext, Wt as onPullDownRefresh, X as UsePageScrollThrottleOptions, Xt as onShareAppMessage, Y as setGlobalProvidedValue, Yt as onSaveExitState, Z as UsePageScrollThrottleStopHandle, Zt as onShareTimeline, _ as EmitsOptions, _n as SetupContextWithTypeProps, _t as useLayoutHosts, a as PageLayoutMeta, an as getCurrentInstance, at as usePageLayout, b as useNativePageRouter, bn as WevuDefinedComponent, bt as UseIntersectionObserverResult, c as defineExpose, cn as setCurrentSetupContext, ct as LayoutBridgeInstance, d as definePageMeta, dn as DisposableMethodName, dt as registerRuntimeLayoutHosts, en as onThemeChange, et as WevuPageLayoutMap, f as defineProps, fn as DisposableObject, ft as resolveLayoutBridge, g as EmitFn, gn as DefineComponentWithTypeProps, gt as useLayoutBridge, h as ComponentTypeEmits, hn as DefineComponentTypePropsOptions, ht as unregisterRuntimeLayoutHosts, i as ModelRef, in as callHookReturn, it as syncRuntimePageLayoutStateFromRuntime, j as use, jn as TemplateRefValue, jt as onUnmounted, k as useSlots, kn as GlobalDirectives, kt as onMounted, l as defineModel, ln as DisposableBag, lt as LayoutHostBinding, m as withDefaults, mn as ComponentDefinition, mt as unregisterPageLayoutBridge, n as DefineModelModifiers, nn as onUnload, nt as setPageLayout, o as PageMeta, on as getCurrentSetupContext, ot as isNoSetData, p as defineSlots, pn as useDisposables, pt as resolveLayoutHost, q as provide, qt as onResize, r as DefineModelTransformOptions, rn as callHookList, rt as syncRuntimePageLayoutState, s as defineEmits, sn as setCurrentInstance, st as markNoSetData, t as version, tn as onUnhandledRejection, tt as resolveRuntimePageLayoutName, u as defineOptions, un as DisposableLike, ut as registerPageLayoutBridge, v as TemplateRef, vn as SetupFunctionWithTypeProps, vt as waitForLayoutHost, w as mergeModels, wn as WevuDefaults, wt as onBeforeMount, x as useNativeRouter, xn as createWevuComponent, xt as useIntersectionObserver, y as useTemplateRef, yn as WevuComponentConstructor, yt as UseIntersectionObserverOptions, z as mountRuntimeInstance, zn as PageFeatures, zt as onLoad } from "./index-B2-lsPjZ.mjs";
|
|
4
|
+
import { a as ActionContext, c as MutationType, d as SubscriptionCallback, i as defineStore, l as StoreManager, n as storeToRefs, o as ActionSubscriber, r as createStore, s as DefineStoreOptions, t as StoreToRefsResult, u as StoreSubscribeOptions } from "./index-51F79u-U.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/vue-demi.d.ts
|
|
7
7
|
/**
|
|
@@ -21,4 +21,4 @@ declare const Vue2: undefined;
|
|
|
21
21
|
*/
|
|
22
22
|
declare function install(): void;
|
|
23
23
|
//#endregion
|
|
24
|
-
export { ActionContext, ActionSubscriber, AllowedComponentProps, AppConfig, ComponentCustomProps, ComponentDefinition, ComponentOptionsMixin, ComponentPropsOptions, ComponentPublicInstance, ComponentTypeEmits, ComputedDefinitions, ComputedGetter, ComputedRef, ComputedSetter, CreateAppOptions, CustomRefFactory, CustomRefOptions, CustomRefSource, DataOption, DefineAppOptions, DefineComponent, DefineComponentOptions, DefineComponentTypePropsOptions, DefineComponentWithTypeProps, DefineModelModifiers, DefineModelTransformOptions, DefineStoreOptions, DisposableBag, DisposableLike, DisposableMethodName, DisposableObject, EffectScope, EmitFn, EmitsOptions, ExtractComputed, ExtractDefaultPropTypes, ExtractMethods, ExtractPropTypes, ExtractPublicPropTypes, GlobalComponents, GlobalDirectives, InferNativePropType, InferNativeProps, InferPropType, InferProps, InternalRuntimeState, InternalRuntimeStateFields, LayoutBridgeInstance, LayoutHostBinding, MapSources, MaybeRef, MaybeRefOrGetter, MaybeUndefined, MethodDefinitions, MiniProgramAdapter, MiniProgramAppOptions, MiniProgramBehaviorIdentifier,
|
|
24
|
+
export { ActionContext, ActionSubscriber, AlipayMiniProgramHostNamespace, AlipayMiniProgramHostSourceContract, AllowedComponentProps, AppConfig, ComponentCustomProps, ComponentDefinition, ComponentOptionsMixin, ComponentPropsOptions, ComponentPublicInstance, ComponentTypeEmits, ComputedDefinitions, ComputedGetter, ComputedRef, ComputedSetter, CreateAppOptions, CustomRefFactory, CustomRefOptions, CustomRefSource, DataOption, DefaultMiniProgramHostNamespace, DefaultMiniProgramHostSourceContract, DefineAppOptions, DefineComponent, DefineComponentOptions, DefineComponentTypePropsOptions, DefineComponentWithTypeProps, DefineModelModifiers, DefineModelTransformOptions, DefineStoreOptions, DisposableBag, DisposableLike, DisposableMethodName, DisposableObject, DouyinMiniProgramHostNamespace, DouyinMiniProgramHostSourceContract, EffectScope, EmitFn, EmitsOptions, ExtractComputed, ExtractDefaultPropTypes, ExtractMethods, ExtractPropTypes, ExtractPublicPropTypes, GlobalComponents, GlobalDirectives, HostMiniProgramAddToFavoritesOption, HostMiniProgramAddToFavoritesOption as MiniProgramAddToFavoritesOption, HostMiniProgramAppOptions, HostMiniProgramAppTrivialInstance, HostMiniProgramBehaviorIdentifier, HostMiniProgramBoundingClientRectResult, HostMiniProgramBoundingClientRectResult as MiniProgramBoundingClientRectResult, HostMiniProgramComponentAllFullProperty, HostMiniProgramComponentAllFullProperty as MiniProgramComponentAllFullProperty, HostMiniProgramComponentAllProperty, HostMiniProgramComponentAllProperty as MiniProgramComponentAllProperty, HostMiniProgramComponentBehaviorOptions, HostMiniProgramComponentBehaviorOptions as MiniProgramComponentBehaviorOptions, HostMiniProgramComponentEmptyArray, HostMiniProgramComponentEmptyArray as MiniProgramComponentEmptyArray, HostMiniProgramComponentInstance, HostMiniProgramComponentMethodOption, HostMiniProgramComponentMethodOption as MiniProgramComponentMethodOption, HostMiniProgramComponentPropertyOption, HostMiniProgramComponentPropertyOption as MiniProgramComponentPropertyOption, HostMiniProgramComponentPropertyValue, HostMiniProgramComponentShortProperty, HostMiniProgramComponentShortProperty as MiniProgramComponentShortProperty, HostMiniProgramComponentTrivialInstance, HostMiniProgramComponentTrivialOption, HostMiniProgramIntersectionObserver, HostMiniProgramIntersectionObserver as MiniProgramIntersectionObserver, HostMiniProgramIntersectionObserverOptions, HostMiniProgramIntersectionObserverOptions as MiniProgramIntersectionObserverOptions, HostMiniProgramLaunchOptions, HostMiniProgramLaunchOptions as MiniProgramLaunchOptions, HostMiniProgramMemoryWarningResult, HostMiniProgramMemoryWarningResult as MiniProgramMemoryWarningResult, HostMiniProgramNavigateToOption, HostMiniProgramNavigateToOption as MiniProgramNavigateToOption, HostMiniProgramNodesRef, HostMiniProgramNodesRef as MiniProgramNodesRef, HostMiniProgramNodesRefFields, HostMiniProgramNodesRefFields as MiniProgramNodesRefFields, HostMiniProgramPageLifetime, HostMiniProgramPageLifetime as MiniProgramPageLifetime, HostMiniProgramPageNotFoundOptions, HostMiniProgramPageNotFoundOptions as MiniProgramPageNotFoundOptions, HostMiniProgramPageResizeOption, HostMiniProgramPageResizeOption as MiniProgramPageResizeOption, HostMiniProgramPageScrollOption, HostMiniProgramPageScrollOption as MiniProgramPageScrollOption, HostMiniProgramPageTrivialInstance, HostMiniProgramReLaunchOption, HostMiniProgramReLaunchOption as MiniProgramReLaunchOption, HostMiniProgramRedirectToOption, HostMiniProgramRedirectToOption as MiniProgramRedirectToOption, HostMiniProgramRouter, HostMiniProgramRouter as MiniProgramRouter, HostMiniProgramSaveExitState, HostMiniProgramSaveExitState as MiniProgramSaveExitState, HostMiniProgramScrollOffsetResult, HostMiniProgramScrollOffsetResult as MiniProgramScrollOffsetResult, HostMiniProgramSelectorQuery, HostMiniProgramSelectorQuery as MiniProgramSelectorQuery, HostMiniProgramShareAppMessageOption, HostMiniProgramShareAppMessageOption as MiniProgramShareAppMessageOption, HostMiniProgramSwitchTabOption, HostMiniProgramSwitchTabOption as MiniProgramSwitchTabOption, HostMiniProgramTabItemTapOption, HostMiniProgramTabItemTapOption as MiniProgramTabItemTapOption, HostMiniProgramThemeChangeResult, HostMiniProgramThemeChangeResult as MiniProgramThemeChangeResult, HostMiniProgramTriggerEventOptions, HostMiniProgramTriggerEventOptions as TriggerEventOptions, HostMiniProgramUnhandledRejectionResult, HostMiniProgramUnhandledRejectionResult as MiniProgramUnhandledRejectionResult, InferNativePropType, InferNativeProps, InferPropType, InferProps, InternalRuntimeState, InternalRuntimeStateFields, LayoutBridgeInstance, LayoutHostBinding, MapSources, MaybeRef, MaybeRefOrGetter, MaybeUndefined, MethodDefinitions, MiniProgramAdapter, MiniProgramAppOptions, MiniProgramBehaviorIdentifier, MiniProgramCSSProperties, MiniProgramComponentInstance, MiniProgramComponentOptions, MiniProgramComponentPropertyValue, MiniProgramComponentRawOptions, MiniProgramDatasetAttributes, MiniProgramHostNamespace, MiniProgramHostNamespaceBySource, MiniProgramHostSourceName, MiniProgramHostSourceRegistry, MiniProgramHtmlAliasIntrinsicElements, MiniProgramInstance, MiniProgramIntrinsicElementBaseAttributes, MiniProgramIntrinsicElements, MiniProgramIntrinsicEventHandler, MiniProgramPageLifetimes, MiniProgramPlatformHostNamespaceBySource, MiniProgramPlatformHostSourceName, MiniProgramPlatformHostSourceRegistry, MiniProgramRouterNavigateToOption, MiniProgramRouterReLaunchOption, MiniProgramRouterRedirectToOption, MiniProgramRouterSwitchTabOption, MiniProgramRuntimeHostNamespaceBySource, MiniProgramRuntimeHostSourceName, MiniProgramRuntimeHostSourceRegistry, MiniProgramTemplateRefValue, ModelBinding, ModelBindingOptions, ModelBindingPayload, ModelModifiers, ModelRef, MultiWatchSources, MutationKind, MutationOp, MutationRecord, MutationType, NativeComponent, NativePropType, NativePropsOptions, NativeTypeHint, NativeTypedProperty, ObjectDirective, OnCleanup, PageFeatures, PageLayoutMeta, PageLayoutState, PageMeta, PrelinkReactiveTreeOptions, PropConstructor, PropOptions, PropType, PublicProps, Ref, RuntimeApp, RuntimeInstance, SetDataDebugInfo, SetDataSnapshotOptions, SetupContext, SetupContextNativeInstance, SetupContextRouter, SetupContextWithTypeProps, SetupFunction, SetupFunctionWithTypeProps, ShallowRef, ShallowUnwrapRef, StoreManager, StoreSubscribeOptions, StoreToRefsResult, SubscriptionCallback, TemplateRef, TemplateRefValue, TemplateRefs, ToRefs, TtMiniProgramHostNamespace, TtMiniProgramHostSourceContract, UpdatePerformanceListener, UpdatePerformanceListenerResult, UseIntersectionObserverOptions, UseIntersectionObserverResult, UseModelOptions, UsePageScrollThrottleOptions, UsePageScrollThrottleStopHandle, UseUpdatePerformanceListenerStopHandle, VNode, VNodeProps, Vue2, WatchCallback, WatchEffect, WatchEffectOptions, WatchMultiSources, WatchOptions, WatchScheduler, WatchSource, WatchSourceValue, WatchSources, WatchStopHandle, WeappCSSProperties, WeappDatasetAttributes, WeappHtmlAliasIntrinsicElements, WeappIntrinsicElementBaseAttributes, WeappIntrinsicElements, WeappIntrinsicEventHandler, WechatMiniProgramHostNamespace, WechatMiniProgramHostSourceContract, WevuComponentConstructor, WevuDefaults, WevuDefinedComponent, WevuGlobalComponents, WevuGlobalDirectives, WevuPageLayoutMap, WevuPlugin, WevuTypedRouterRouteMap, WritableComputedOptions, WritableComputedRef, addMutationRecorder, batch, callHookList, callHookReturn, callUpdateHooks, computed, createApp, createStore, createWevuComponent, createWevuScopedSlotComponent, customRef, defineAppSetup, defineComponent, defineEmits, defineExpose, defineModel, defineOptions, definePageMeta, defineProps, defineSlots, defineStore, effect, effectScope, endBatch, getCurrentInstance, getCurrentScope, getCurrentSetupContext, getDeepWatchStrategy, getReactiveVersion, hasInjectionContext, inject, injectGlobal, install, isNoSetData, isProxy, isRaw, isReactive, isReadonly, isRef, isShallowReactive, isShallowRef, isVue2, isVue3, markNoSetData, markRaw, mergeModels, mountRuntimeInstance, nextTick, normalizeClass, normalizeStyle, onActivated, onAddToFavorites, onAttached, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onDetached, onError, onErrorCaptured, onHide, onLaunch, onLoad, onMemoryWarning, onMounted, onMoved, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onScopeDispose, onServerPrefetch, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload, onUnmounted, onUpdated, prelinkReactiveTree, provide, provideGlobal, reactive, readonly, ref, registerApp, registerComponent, registerPageLayoutBridge, registerRuntimeLayoutHosts, removeMutationRecorder, resetWevuDefaults, resolveLayoutBridge, resolveLayoutHost, resolveRuntimePageLayoutName, runSetupFunction, setCurrentInstance, setCurrentSetupContext, setDeepWatchStrategy, setGlobalProvidedValue, setPageLayout, setRuntimeSetDataVisibility, setWevuDefaults, shallowReactive, shallowReadonly, shallowRef, startBatch, stop, storeToRefs, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, teardownRuntimeInstance, toRaw, toRef, toRefs, toValue, touchReactive, traverse, triggerRef, unref, unregisterPageLayoutBridge, unregisterRuntimeLayoutHosts, use, useAttrs, useBindModel, useDisposables, useIntersectionObserver, useLayoutBridge, useLayoutHosts, useModel, useNativeInstance, useNativePageRouter, useNativeRouter, usePageLayout, usePageScrollThrottle, useSlots, useTemplateRef, useUpdatePerformanceListener, version, waitForLayoutHost, watch, watchEffect, watchPostEffect, watchSyncEffect, withDefaults };
|
package/dist/vue-demi.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { A as startBatch, C as removeMutationRecorder, D as endBatch, E as effectScope, F as nextTick, O as getCurrentScope, S as addMutationRecorder, T as effect, a as toValue, c as isRaw, d as reactive, f as isShallowReactive, g as touchReactive, h as prelinkReactiveTree, i as ref, j as stop, k as onScopeDispose, l as isReactive, n as isRef, o as unref, p as shallowReactive, s as getReactiveVersion, t as customRef, u as markRaw, w as batch, x as toRaw } from "./ref-mshhFqmk.mjs";
|
|
2
2
|
import { i as computed, n as defineStore, r as createStore, t as storeToRefs } from "./store-fwgCLl_K.mjs";
|
|
3
|
-
import { A as onPageScroll, B as onTabItemTap, C as onError, D as onMemoryWarning, E as onLoad, F as onRouteDone, G as callHookList, H as onUnhandledRejection, I as onSaveExitState, J as getCurrentSetupContext, K as callHookReturn, L as onShareAppMessage, M as onReachBottom, N as onReady, O as onMoved, P as onResize, R as onShareTimeline, S as onDetached, T as onLaunch, U as onUnload, V as onThemeChange, X as setCurrentInstance, Z as setCurrentSetupContext, _ as provide,
|
|
4
|
-
import { $ as onBeforeMount, A as registerApp, B as resetWevuDefaults, C as resolveLayoutBridge, D as useLayoutBridge, E as unregisterRuntimeLayoutHosts, F as resolveRuntimePageLayoutName, G as watch, H as isNoSetData, I as setPageLayout, J as watchSyncEffect, K as watchEffect, L as syncRuntimePageLayoutState, M as setRuntimeSetDataVisibility, N as teardownRuntimeInstance, O as useLayoutHosts, P as runSetupFunction, Q as onActivated, R as syncRuntimePageLayoutStateFromRuntime, S as registerRuntimeLayoutHosts, T as unregisterPageLayoutBridge, U as markNoSetData, V as setWevuDefaults, W as version, X as setDeepWatchStrategy, Y as getDeepWatchStrategy, Z as callUpdateHooks, _ as createWevuScopedSlotComponent, a as useAttrs, at as onServerPrefetch, b as registerComponent, c as defineAppSetup, ct as traverse, d as normalizeClass, dt as isShallowRef, et as onBeforeUnmount, f as normalizeStyle, ft as shallowRef, g as createWevuComponent, h as useDisposables, i as useModel, it as onMounted, j as mountRuntimeInstance, k as waitForLayoutHost, l as use, lt as toRef, m as useIntersectionObserver, n as mergeModels, nt as onDeactivated, o as useNativeInstance, ot as onUnmounted, p as usePageScrollThrottle, pt as triggerRef, q as watchPostEffect, r as useBindModel, rt as onErrorCaptured, s as useSlots, st as onUpdated, t as useTemplateRef, tt as onBeforeUpdate, u as useUpdatePerformanceListener, ut as toRefs, v as defineComponent, w as resolveLayoutHost, x as registerPageLayoutBridge, y as createApp, z as usePageLayout } from "./src-
|
|
3
|
+
import { A as onPageScroll, B as onTabItemTap, C as onError, D as onMemoryWarning, E as onLoad, F as onRouteDone, G as callHookList, H as onUnhandledRejection, I as onSaveExitState, J as getCurrentSetupContext, K as callHookReturn, L as onShareAppMessage, M as onReachBottom, N as onReady, O as onMoved, P as onResize, R as onShareTimeline, S as onDetached, T as onLaunch, U as onUnload, V as onThemeChange, X as setCurrentInstance, Z as setCurrentSetupContext, _ as provide, at as isReadonly, b as onAddToFavorites, g as injectGlobal, h as inject, it as isProxy, j as onPullDownRefresh, k as onPageNotFound, m as hasInjectionContext, n as useNativeRouter, ot as readonly, q as getCurrentInstance, st as shallowReadonly, t as useNativePageRouter, v as provideGlobal, w as onHide, x as onAttached, y as setGlobalProvidedValue, z as onShow } from "./router-B43fz4cM.mjs";
|
|
4
|
+
import { $ as onBeforeMount, A as registerApp, B as resetWevuDefaults, C as resolveLayoutBridge, D as useLayoutBridge, E as unregisterRuntimeLayoutHosts, F as resolveRuntimePageLayoutName, G as watch, H as isNoSetData, I as setPageLayout, J as watchSyncEffect, K as watchEffect, L as syncRuntimePageLayoutState, M as setRuntimeSetDataVisibility, N as teardownRuntimeInstance, O as useLayoutHosts, P as runSetupFunction, Q as onActivated, R as syncRuntimePageLayoutStateFromRuntime, S as registerRuntimeLayoutHosts, T as unregisterPageLayoutBridge, U as markNoSetData, V as setWevuDefaults, W as version, X as setDeepWatchStrategy, Y as getDeepWatchStrategy, Z as callUpdateHooks, _ as createWevuScopedSlotComponent, a as useAttrs, at as onServerPrefetch, b as registerComponent, c as defineAppSetup, ct as traverse, d as normalizeClass, dt as isShallowRef, et as onBeforeUnmount, f as normalizeStyle, ft as shallowRef, g as createWevuComponent, h as useDisposables, i as useModel, it as onMounted, j as mountRuntimeInstance, k as waitForLayoutHost, l as use, lt as toRef, m as useIntersectionObserver, n as mergeModels, nt as onDeactivated, o as useNativeInstance, ot as onUnmounted, p as usePageScrollThrottle, pt as triggerRef, q as watchPostEffect, r as useBindModel, rt as onErrorCaptured, s as useSlots, st as onUpdated, t as useTemplateRef, tt as onBeforeUpdate, u as useUpdatePerformanceListener, ut as toRefs, v as defineComponent, w as resolveLayoutHost, x as registerPageLayoutBridge, y as createApp, z as usePageLayout } from "./src-CXeO96dW.mjs";
|
|
5
5
|
//#region src/vue-demi.ts
|
|
6
6
|
/**
|
|
7
7
|
* 标记当前兼容层运行在 Vue 3 风格分支。
|