|
@@ -3471,43 +3471,43 @@ function injectHook(type, hook, target = currentInstance, prepend = false) {
|
|
warn(`${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().`);
|
|
warn(`${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().`);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-const createHook = (lifecycle) => (hook, target = currentInstance) => (
|
|
|
|
|
|
+const createHook$1 = (lifecycle) => (hook, target = currentInstance) => (
|
|
// post-create lifecycle registrations are noops during SSR (except for serverPrefetch)
|
|
// post-create lifecycle registrations are noops during SSR (except for serverPrefetch)
|
|
(!isInSSRComponentSetup || lifecycle === "sp") && injectHook(lifecycle, (...args) => hook(...args), target)
|
|
(!isInSSRComponentSetup || lifecycle === "sp") && injectHook(lifecycle, (...args) => hook(...args), target)
|
|
);
|
|
);
|
|
-const onBeforeMount = createHook(
|
|
|
|
|
|
+const onBeforeMount = createHook$1(
|
|
"bm"
|
|
"bm"
|
|
/* LifecycleHooks.BEFORE_MOUNT */
|
|
/* LifecycleHooks.BEFORE_MOUNT */
|
|
);
|
|
);
|
|
-const onMounted = createHook(
|
|
|
|
|
|
+const onMounted = createHook$1(
|
|
"m"
|
|
"m"
|
|
/* LifecycleHooks.MOUNTED */
|
|
/* LifecycleHooks.MOUNTED */
|
|
);
|
|
);
|
|
-const onBeforeUpdate = createHook(
|
|
|
|
|
|
+const onBeforeUpdate = createHook$1(
|
|
"bu"
|
|
"bu"
|
|
/* LifecycleHooks.BEFORE_UPDATE */
|
|
/* LifecycleHooks.BEFORE_UPDATE */
|
|
);
|
|
);
|
|
-const onUpdated = createHook(
|
|
|
|
|
|
+const onUpdated = createHook$1(
|
|
"u"
|
|
"u"
|
|
/* LifecycleHooks.UPDATED */
|
|
/* LifecycleHooks.UPDATED */
|
|
);
|
|
);
|
|
-const onBeforeUnmount = createHook(
|
|
|
|
|
|
+const onBeforeUnmount = createHook$1(
|
|
"bum"
|
|
"bum"
|
|
/* LifecycleHooks.BEFORE_UNMOUNT */
|
|
/* LifecycleHooks.BEFORE_UNMOUNT */
|
|
);
|
|
);
|
|
-const onUnmounted = createHook(
|
|
|
|
|
|
+const onUnmounted = createHook$1(
|
|
"um"
|
|
"um"
|
|
/* LifecycleHooks.UNMOUNTED */
|
|
/* LifecycleHooks.UNMOUNTED */
|
|
);
|
|
);
|
|
-const onServerPrefetch = createHook(
|
|
|
|
|
|
+const onServerPrefetch = createHook$1(
|
|
"sp"
|
|
"sp"
|
|
/* LifecycleHooks.SERVER_PREFETCH */
|
|
/* LifecycleHooks.SERVER_PREFETCH */
|
|
);
|
|
);
|
|
-const onRenderTriggered = createHook(
|
|
|
|
|
|
+const onRenderTriggered = createHook$1(
|
|
"rtg"
|
|
"rtg"
|
|
/* LifecycleHooks.RENDER_TRIGGERED */
|
|
/* LifecycleHooks.RENDER_TRIGGERED */
|
|
);
|
|
);
|
|
-const onRenderTracked = createHook(
|
|
|
|
|
|
+const onRenderTracked = createHook$1(
|
|
"rtc"
|
|
"rtc"
|
|
/* LifecycleHooks.RENDER_TRACKED */
|
|
/* LifecycleHooks.RENDER_TRACKED */
|
|
);
|
|
);
|
|
@@ -6559,10 +6559,15 @@ const createSubpackageApp = initCreateSubpackageApp();
|
|
wx.createPluginApp = global.createPluginApp = createPluginApp;
|
|
wx.createPluginApp = global.createPluginApp = createPluginApp;
|
|
wx.createSubpackageApp = global.createSubpackageApp = createSubpackageApp;
|
|
wx.createSubpackageApp = global.createSubpackageApp = createSubpackageApp;
|
|
}
|
|
}
|
|
|
|
+const createHook = (lifecycle) => (hook, target = getCurrentInstance()) => {
|
|
|
|
+ !isInSSRComponentSetup && injectHook(lifecycle, hook, target);
|
|
|
|
+};
|
|
|
|
+const onShow = /* @__PURE__ */ createHook(ON_SHOW);
|
|
exports._export_sfc = _export_sfc;
|
|
exports._export_sfc = _export_sfc;
|
|
exports.computed = computed;
|
|
exports.computed = computed;
|
|
exports.createSSRApp = createSSRApp;
|
|
exports.createSSRApp = createSSRApp;
|
|
exports.defineComponent = defineComponent;
|
|
exports.defineComponent = defineComponent;
|
|
exports.getCurrentInstance = getCurrentInstance;
|
|
exports.getCurrentInstance = getCurrentInstance;
|
|
exports.index = index;
|
|
exports.index = index;
|
|
|
|
+exports.onShow = onShow;
|
|
exports.ref = ref;
|
|
exports.ref = ref;
|