Skip to content

Commit

Permalink
feat(x-web): onHostThemeChange、offHostThemeChange
Browse files Browse the repository at this point in the history
  • Loading branch information
StrivingRabbit committed Nov 9, 2024
1 parent 46a7dc9 commit 466d02e
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 3 deletions.
21 changes: 20 additions & 1 deletion packages/uni-h5/dist-x/uni-h5.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var __publicField = (obj, key, value) => {
};
import { withModifiers, createVNode, getCurrentInstance, ref, defineComponent, openBlock, createElementBlock, onMounted, provide, computed, watch, onUnmounted, inject, onBeforeUnmount, mergeProps, reactive, injectHook, nextTick, createApp, createBlock, watchEffect, isVNode, withDirectives, vShow, renderList, isReactive, Transition, effectScope, Fragment, onActivated, withCtx, KeepAlive, resolveDynamicComponent, markRaw, createElementVNode, normalizeClass, normalizeStyle, toDisplayString, createCommentVNode, onBeforeMount, onBeforeActivate, onBeforeDeactivate, renderSlot, shallowRef, Comment, h, createTextVNode } from "vue";
import { isArray, isString, extend, remove, stringifyStyle, parseStringStyle, isPlainObject as isPlainObject$1, isFunction, capitalize, camelize, hasOwn, isObject, toRawType, makeMap as makeMap$1, isPromise, invokeArrayFns as invokeArrayFns$1, hyphenate } from "@vue/shared";
import { once, UNI_STORAGE_LOCALE, I18N_JSON_DELIMITERS, Emitter, passive, initCustomDatasetOnce, resolveComponentInstance, normalizeStyles, addLeadingSlash, invokeArrayFns, removeLeadingSlash, resolveOwnerVm, resolveOwnerEl, ON_WXS_INVOKE_CALL_METHOD, ON_RESIZE, ON_APP_ENTER_FOREGROUND, ON_APP_ENTER_BACKGROUND, ON_SHOW, ON_HIDE, ON_PAGE_SCROLL, ON_REACH_BOTTOM, EventChannel, createRpx2Unit, defaultRpx2Unit, parseQuery, NAVBAR_HEIGHT, ON_ERROR, callOptions, ON_UNHANDLE_REJECTION, ON_PAGE_NOT_FOUND, getLen, getCustomDataset, parseUrl, sortObject, ON_THEME_CHANGE, OFF_THEME_CHANGE, updateElementStyle, LINEFEED, ON_WEB_INVOKE_APP_SERVICE, debounce, ON_BACK_PRESS, addFont, ON_NAVIGATION_BAR_CHANGE, scrollTo, RESPONSIVE_MIN_WIDTH, formatDateTime, normalizeTitleColor, ON_REACH_BOTTOM_DISTANCE, isSystemDialogPage, isSystemActionSheetDialogPage, ON_UNLOAD, onCreateVueApp, SCHEME_RE, DATA_RE, decodedQuery, WEB_INVOKE_APPSERVICE, ON_NAVIGATION_BAR_BUTTON_TAP, ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED, ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED, ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED, ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED, ON_PULL_DOWN_REFRESH, stringifyQuery as stringifyQuery$1, PRIMARY_COLOR, isUniLifecycleHook, ON_LOAD, UniLifecycleHooks, invokeCreateErrorHandler, invokeCreateVueAppHook } from "@dcloudio/uni-shared";
import { once, UNI_STORAGE_LOCALE, I18N_JSON_DELIMITERS, Emitter, passive, initCustomDatasetOnce, resolveComponentInstance, normalizeStyles, addLeadingSlash, invokeArrayFns, removeLeadingSlash, resolveOwnerVm, resolveOwnerEl, ON_WXS_INVOKE_CALL_METHOD, ON_RESIZE, ON_APP_ENTER_FOREGROUND, ON_APP_ENTER_BACKGROUND, ON_SHOW, ON_HIDE, ON_PAGE_SCROLL, ON_REACH_BOTTOM, EventChannel, createRpx2Unit, defaultRpx2Unit, parseQuery, NAVBAR_HEIGHT, ON_ERROR, callOptions, ON_UNHANDLE_REJECTION, ON_PAGE_NOT_FOUND, getLen, getCustomDataset, parseUrl, sortObject, ON_THEME_CHANGE, OFF_THEME_CHANGE, ON_HOST_THEME_CHANGE, OFF_HOST_THEME_CHANGE, updateElementStyle, LINEFEED, ON_WEB_INVOKE_APP_SERVICE, debounce, ON_BACK_PRESS, addFont, ON_NAVIGATION_BAR_CHANGE, scrollTo, RESPONSIVE_MIN_WIDTH, formatDateTime, normalizeTitleColor, ON_REACH_BOTTOM_DISTANCE, isSystemDialogPage, isSystemActionSheetDialogPage, ON_UNLOAD, onCreateVueApp, SCHEME_RE, DATA_RE, decodedQuery, WEB_INVOKE_APPSERVICE, ON_NAVIGATION_BAR_BUTTON_TAP, ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED, ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED, ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED, ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED, ON_PULL_DOWN_REFRESH, stringifyQuery as stringifyQuery$1, PRIMARY_COLOR, isUniLifecycleHook, ON_LOAD, UniLifecycleHooks, invokeCreateErrorHandler, invokeCreateVueAppHook } from "@dcloudio/uni-shared";
import { onCreateVueApp as onCreateVueApp2 } from "@dcloudio/uni-shared";
import { useRoute, isNavigationFailure, RouterView, useRouter, createRouter, createWebHistory, createWebHashHistory } from "vue-router";
import { initVueI18n, isI18nStr, LOCALE_EN, LOCALE_ES, LOCALE_FR, LOCALE_ZH_HANS, LOCALE_ZH_HANT } from "@dcloudio/uni-i18n";
Expand Down Expand Up @@ -9064,6 +9064,21 @@ const offThemeChange$1 = /* @__PURE__ */ defineOffApi(
UniServiceJSBridge.off(ON_THEME_CHANGE, themeChangeCallBack);
}
);
const hostThemeChangeCallBack = (res) => {
UniServiceJSBridge.invokeOnCallback(ON_HOST_THEME_CHANGE, { hostTheme: res.theme });
};
const onHostThemeChange = /* @__PURE__ */ defineOnApi(
ON_HOST_THEME_CHANGE,
() => {
UniServiceJSBridge.on(ON_THEME_CHANGE, hostThemeChangeCallBack);
}
);
const offHostThemeChange = /* @__PURE__ */ defineOnApi(
OFF_HOST_THEME_CHANGE,
() => {
UniServiceJSBridge.off(ON_THEME_CHANGE, hostThemeChangeCallBack);
}
);
const STORAGE_KEYS = "uni-storage-keys";
function parseValue(value) {
const types = ["object", "string", "number", "boolean", "undefined"];
Expand Down Expand Up @@ -17944,6 +17959,7 @@ const api = /* @__PURE__ */ Object.defineProperty({
offAppShow,
offCompassChange,
offError,
offHostThemeChange,
offLocationChange,
offLocationChangeError,
offNetworkStatusChange,
Expand All @@ -17959,6 +17975,7 @@ const api = /* @__PURE__ */ Object.defineProperty({
onCreateVueApp,
onError,
onGyroscopeChange,
onHostThemeChange,
onLocaleChange,
onLocationChange,
onLocationChangeError,
Expand Down Expand Up @@ -28897,6 +28914,7 @@ export {
offAppShow,
offCompassChange,
offError,
offHostThemeChange,
offLocationChange,
offLocationChangeError,
offNetworkStatusChange,
Expand All @@ -28912,6 +28930,7 @@ export {
onCreateVueApp2 as onCreateVueApp,
onError,
onGyroscopeChange,
onHostThemeChange,
onLocaleChange,
onLocationChange,
onLocationChangeError,
Expand Down
29 changes: 28 additions & 1 deletion packages/uni-h5/src/service/api/device/theme.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import { OFF_THEME_CHANGE, ON_THEME_CHANGE } from '@dcloudio/uni-shared'
import {
OFF_HOST_THEME_CHANGE,
OFF_THEME_CHANGE,
ON_HOST_THEME_CHANGE,
ON_THEME_CHANGE,
} from '@dcloudio/uni-shared'
import { defineOffApi, defineOnApi } from '@dcloudio/uni-api'

const themeChangeCallBack = (res: UniApp.OnThemeChangeCallbackResult) => {
Expand All @@ -18,3 +23,25 @@ export const offThemeChange = defineOffApi<typeof uni.offThemeChange>(
UniServiceJSBridge.off(ON_THEME_CHANGE, themeChangeCallBack)
}
)

// #if _X_
const hostThemeChangeCallBack = (res: UniApp.OnThemeChangeCallbackResult) => {
UniServiceJSBridge.invokeOnCallback(ON_HOST_THEME_CHANGE, {
hostTheme: res.theme,
})
}

export const onHostThemeChange = defineOnApi<typeof uni.onThemeChange>(
ON_HOST_THEME_CHANGE,
() => {
UniServiceJSBridge.on(ON_THEME_CHANGE, hostThemeChangeCallBack)
}
)

export const offHostThemeChange = defineOnApi<typeof uni.onThemeChange>(
OFF_HOST_THEME_CHANGE,
() => {
UniServiceJSBridge.off(ON_THEME_CHANGE, hostThemeChangeCallBack)
}
)
// #endif
4 changes: 4 additions & 0 deletions packages/uni-shared/dist/uni-shared.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,8 @@ const ON_LAUNCH = 'onLaunch';
const ON_ERROR = 'onError';
const ON_THEME_CHANGE = 'onThemeChange';
const OFF_THEME_CHANGE = 'offThemeChange';
const ON_HOST_THEME_CHANGE = 'onHostThemeChange';
const OFF_HOST_THEME_CHANGE = 'offHostThemeChange';
const ON_KEYBOARD_HEIGHT_CHANGE = 'onKeyboardHeightChange';
const ON_PAGE_NOT_FOUND = 'onPageNotFound';
const ON_UNHANDLE_REJECTION = 'onUnhandledRejection';
Expand Down Expand Up @@ -1733,6 +1735,7 @@ exports.NODE_TYPE_PAGE = NODE_TYPE_PAGE;
exports.NODE_TYPE_TEXT = NODE_TYPE_TEXT;
exports.NVUE_BUILT_IN_TAGS = NVUE_BUILT_IN_TAGS;
exports.NVUE_U_BUILT_IN_TAGS = NVUE_U_BUILT_IN_TAGS;
exports.OFF_HOST_THEME_CHANGE = OFF_HOST_THEME_CHANGE;
exports.OFF_THEME_CHANGE = OFF_THEME_CHANGE;
exports.ON_ADD_TO_FAVORITES = ON_ADD_TO_FAVORITES;
exports.ON_APP_ENTER_BACKGROUND = ON_APP_ENTER_BACKGROUND;
Expand All @@ -1741,6 +1744,7 @@ exports.ON_BACK_PRESS = ON_BACK_PRESS;
exports.ON_ERROR = ON_ERROR;
exports.ON_EXIT = ON_EXIT;
exports.ON_HIDE = ON_HIDE;
exports.ON_HOST_THEME_CHANGE = ON_HOST_THEME_CHANGE;
exports.ON_INIT = ON_INIT;
exports.ON_KEYBOARD_HEIGHT_CHANGE = ON_KEYBOARD_HEIGHT_CHANGE;
exports.ON_LAUNCH = ON_LAUNCH;
Expand Down
4 changes: 4 additions & 0 deletions packages/uni-shared/dist/uni-shared.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,8 @@ export declare interface NVueTaskCenter {
updateData: (componentId: string, data: Record<string, unknown> | void, callback?: Function) => void;
}

export declare const OFF_HOST_THEME_CHANGE = "offHostThemeChange";

export declare const OFF_THEME_CHANGE = "offThemeChange";

export declare const ON_ADD_TO_FAVORITES = "onAddToFavorites";
Expand All @@ -481,6 +483,8 @@ export declare const ON_EXIT = "onExit";

export declare const ON_HIDE = "onHide";

export declare const ON_HOST_THEME_CHANGE = "onHostThemeChange";

export declare const ON_INIT = "onInit";

export declare const ON_KEYBOARD_HEIGHT_CHANGE = "onKeyboardHeightChange";
Expand Down
4 changes: 3 additions & 1 deletion packages/uni-shared/dist/uni-shared.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,8 @@ const ON_LAUNCH = 'onLaunch';
const ON_ERROR = 'onError';
const ON_THEME_CHANGE = 'onThemeChange';
const OFF_THEME_CHANGE = 'offThemeChange';
const ON_HOST_THEME_CHANGE = 'onHostThemeChange';
const OFF_HOST_THEME_CHANGE = 'offHostThemeChange';
const ON_KEYBOARD_HEIGHT_CHANGE = 'onKeyboardHeightChange';
const ON_PAGE_NOT_FOUND = 'onPageNotFound';
const ON_UNHANDLE_REJECTION = 'onUnhandledRejection';
Expand Down Expand Up @@ -1689,4 +1691,4 @@ function isSystemActionSheetDialogPage(page) {
return page.route.startsWith(SYSTEM_DIALOG_ACTION_SHEET_PAGE_PATH);
}

export { ACTION_TYPE_ADD_EVENT, ACTION_TYPE_ADD_WXS_EVENT, ACTION_TYPE_CREATE, ACTION_TYPE_EVENT, ACTION_TYPE_INSERT, ACTION_TYPE_PAGE_CREATE, ACTION_TYPE_PAGE_CREATED, ACTION_TYPE_PAGE_SCROLL, ACTION_TYPE_REMOVE, ACTION_TYPE_REMOVE_ATTRIBUTE, ACTION_TYPE_REMOVE_EVENT, ACTION_TYPE_SET_ATTRIBUTE, ACTION_TYPE_SET_TEXT, ATTR_CHANGE_PREFIX, ATTR_CLASS, ATTR_INNER_HTML, ATTR_STYLE, ATTR_TEXT_CONTENT, ATTR_V_OWNER_ID, ATTR_V_RENDERJS, ATTR_V_SHOW, BACKGROUND_COLOR, BUILT_IN_TAGS, BUILT_IN_TAG_NAMES, COMPONENT_NAME_PREFIX, COMPONENT_PREFIX, COMPONENT_SELECTOR_PREFIX, DATA_RE, E$1 as Emitter, EventChannel, EventModifierFlags, I18N_JSON_DELIMITERS, JSON_PROTOCOL, LINEFEED, MINI_PROGRAM_PAGE_RUNTIME_HOOKS, NAVBAR_HEIGHT, NODE_TYPE_COMMENT, NODE_TYPE_ELEMENT, NODE_TYPE_PAGE, NODE_TYPE_TEXT, NVUE_BUILT_IN_TAGS, NVUE_U_BUILT_IN_TAGS, OFF_THEME_CHANGE, ON_ADD_TO_FAVORITES, ON_APP_ENTER_BACKGROUND, ON_APP_ENTER_FOREGROUND, ON_BACK_PRESS, ON_ERROR, ON_EXIT, ON_HIDE, ON_INIT, ON_KEYBOARD_HEIGHT_CHANGE, ON_LAUNCH, ON_LOAD, ON_NAVIGATION_BAR_BUTTON_TAP, ON_NAVIGATION_BAR_CHANGE, ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED, ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED, ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED, ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED, ON_PAGE_NOT_FOUND, ON_PAGE_SCROLL, ON_PULL_DOWN_REFRESH, ON_REACH_BOTTOM, ON_REACH_BOTTOM_DISTANCE, ON_READY, ON_RESIZE, ON_SAVE_EXIT_STATE, ON_SHARE_APP_MESSAGE, ON_SHARE_CHAT, ON_SHARE_TIMELINE, ON_SHOW, ON_TAB_ITEM_TAP, ON_THEME_CHANGE, ON_UNHANDLE_REJECTION, ON_UNLOAD, ON_WEB_INVOKE_APP_SERVICE, ON_WXS_INVOKE_CALL_METHOD, PLUS_RE, PRIMARY_COLOR, RENDERJS_MODULES, RESPONSIVE_MIN_WIDTH, SCHEME_RE, SELECTED_COLOR, SLOT_DEFAULT_NAME, SYSTEM_DIALOG_ACTION_SHEET_PAGE_PATH, SYSTEM_DIALOG_PAGE_PATH_STARTER, TABBAR_HEIGHT, TAGS, UNI_SSR, UNI_SSR_DATA, UNI_SSR_GLOBAL_DATA, UNI_SSR_STORE, UNI_SSR_TITLE, UNI_STORAGE_LOCALE, UNI_UI_CONFLICT_TAGS, UVUE_BUILT_IN_TAGS, UVUE_IOS_BUILT_IN_TAGS, UVUE_WEB_BUILT_IN_TAGS, UniBaseNode, UniCommentNode, UniElement, UniEvent, UniInputElement, UniLifecycleHooks, UniNode, UniTextAreaElement, UniTextNode, WEB_INVOKE_APPSERVICE, WXS_MODULES, WXS_PROTOCOL, addFont, addLeadingSlash, borderStyles, cache, cacheStringFunction, callOptions, createIsCustomElement, createRpx2Unit, createUniEvent, customizeEvent, debounce, decode, decodedQuery, defaultMiniProgramRpx2Unit, defaultNVueRpx2Unit, defaultRpx2Unit, dynamicSlotName, forcePatchProp, formatDateTime, formatLog, getCustomDataset, getEnvLocale, getGlobal, getLen, getValueByDataPath, initCustomDatasetOnce, invokeArrayFns, invokeCreateErrorHandler, invokeCreateVueAppHook, isAppIOSUVueNativeTag, isAppNVueNativeTag, isAppNativeTag, isAppUVueBuiltInEasyComponent, isAppUVueNativeTag, isBuiltInComponent, isComponentInternalInstance, isComponentTag, isH5CustomElement, isH5NativeTag, isMiniProgramNativeTag, isRootHook, isRootImmediateHook, isSystemActionSheetDialogPage, isSystemDialogPage, isUniLifecycleHook, isUniXElement, normalizeClass, normalizeDataset, normalizeEventType, normalizeProps, normalizeStyle, normalizeStyles, normalizeTabBarStyles, normalizeTarget, normalizeTitleColor, onCreateVueApp, once, parseEventName, parseNVueDataset, parseQuery, parseUrl, passive, plusReady, removeLeadingSlash, resolveComponentInstance, resolveOwnerEl, resolveOwnerVm, sanitise, scrollTo, sortObject, stringifyQuery, updateElementStyle };
export { ACTION_TYPE_ADD_EVENT, ACTION_TYPE_ADD_WXS_EVENT, ACTION_TYPE_CREATE, ACTION_TYPE_EVENT, ACTION_TYPE_INSERT, ACTION_TYPE_PAGE_CREATE, ACTION_TYPE_PAGE_CREATED, ACTION_TYPE_PAGE_SCROLL, ACTION_TYPE_REMOVE, ACTION_TYPE_REMOVE_ATTRIBUTE, ACTION_TYPE_REMOVE_EVENT, ACTION_TYPE_SET_ATTRIBUTE, ACTION_TYPE_SET_TEXT, ATTR_CHANGE_PREFIX, ATTR_CLASS, ATTR_INNER_HTML, ATTR_STYLE, ATTR_TEXT_CONTENT, ATTR_V_OWNER_ID, ATTR_V_RENDERJS, ATTR_V_SHOW, BACKGROUND_COLOR, BUILT_IN_TAGS, BUILT_IN_TAG_NAMES, COMPONENT_NAME_PREFIX, COMPONENT_PREFIX, COMPONENT_SELECTOR_PREFIX, DATA_RE, E$1 as Emitter, EventChannel, EventModifierFlags, I18N_JSON_DELIMITERS, JSON_PROTOCOL, LINEFEED, MINI_PROGRAM_PAGE_RUNTIME_HOOKS, NAVBAR_HEIGHT, NODE_TYPE_COMMENT, NODE_TYPE_ELEMENT, NODE_TYPE_PAGE, NODE_TYPE_TEXT, NVUE_BUILT_IN_TAGS, NVUE_U_BUILT_IN_TAGS, OFF_HOST_THEME_CHANGE, OFF_THEME_CHANGE, ON_ADD_TO_FAVORITES, ON_APP_ENTER_BACKGROUND, ON_APP_ENTER_FOREGROUND, ON_BACK_PRESS, ON_ERROR, ON_EXIT, ON_HIDE, ON_HOST_THEME_CHANGE, ON_INIT, ON_KEYBOARD_HEIGHT_CHANGE, ON_LAUNCH, ON_LOAD, ON_NAVIGATION_BAR_BUTTON_TAP, ON_NAVIGATION_BAR_CHANGE, ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED, ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED, ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED, ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED, ON_PAGE_NOT_FOUND, ON_PAGE_SCROLL, ON_PULL_DOWN_REFRESH, ON_REACH_BOTTOM, ON_REACH_BOTTOM_DISTANCE, ON_READY, ON_RESIZE, ON_SAVE_EXIT_STATE, ON_SHARE_APP_MESSAGE, ON_SHARE_CHAT, ON_SHARE_TIMELINE, ON_SHOW, ON_TAB_ITEM_TAP, ON_THEME_CHANGE, ON_UNHANDLE_REJECTION, ON_UNLOAD, ON_WEB_INVOKE_APP_SERVICE, ON_WXS_INVOKE_CALL_METHOD, PLUS_RE, PRIMARY_COLOR, RENDERJS_MODULES, RESPONSIVE_MIN_WIDTH, SCHEME_RE, SELECTED_COLOR, SLOT_DEFAULT_NAME, SYSTEM_DIALOG_ACTION_SHEET_PAGE_PATH, SYSTEM_DIALOG_PAGE_PATH_STARTER, TABBAR_HEIGHT, TAGS, UNI_SSR, UNI_SSR_DATA, UNI_SSR_GLOBAL_DATA, UNI_SSR_STORE, UNI_SSR_TITLE, UNI_STORAGE_LOCALE, UNI_UI_CONFLICT_TAGS, UVUE_BUILT_IN_TAGS, UVUE_IOS_BUILT_IN_TAGS, UVUE_WEB_BUILT_IN_TAGS, UniBaseNode, UniCommentNode, UniElement, UniEvent, UniInputElement, UniLifecycleHooks, UniNode, UniTextAreaElement, UniTextNode, WEB_INVOKE_APPSERVICE, WXS_MODULES, WXS_PROTOCOL, addFont, addLeadingSlash, borderStyles, cache, cacheStringFunction, callOptions, createIsCustomElement, createRpx2Unit, createUniEvent, customizeEvent, debounce, decode, decodedQuery, defaultMiniProgramRpx2Unit, defaultNVueRpx2Unit, defaultRpx2Unit, dynamicSlotName, forcePatchProp, formatDateTime, formatLog, getCustomDataset, getEnvLocale, getGlobal, getLen, getValueByDataPath, initCustomDatasetOnce, invokeArrayFns, invokeCreateErrorHandler, invokeCreateVueAppHook, isAppIOSUVueNativeTag, isAppNVueNativeTag, isAppNativeTag, isAppUVueBuiltInEasyComponent, isAppUVueNativeTag, isBuiltInComponent, isComponentInternalInstance, isComponentTag, isH5CustomElement, isH5NativeTag, isMiniProgramNativeTag, isRootHook, isRootImmediateHook, isSystemActionSheetDialogPage, isSystemDialogPage, isUniLifecycleHook, isUniXElement, normalizeClass, normalizeDataset, normalizeEventType, normalizeProps, normalizeStyle, normalizeStyles, normalizeTabBarStyles, normalizeTarget, normalizeTitleColor, onCreateVueApp, once, parseEventName, parseNVueDataset, parseQuery, parseUrl, passive, plusReady, removeLeadingSlash, resolveComponentInstance, resolveOwnerEl, resolveOwnerVm, sanitise, scrollTo, sortObject, stringifyQuery, updateElementStyle };
2 changes: 2 additions & 0 deletions packages/uni-shared/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ export const ON_LAUNCH = 'onLaunch'
export const ON_ERROR = 'onError'
export const ON_THEME_CHANGE = 'onThemeChange'
export const OFF_THEME_CHANGE = 'offThemeChange'
export const ON_HOST_THEME_CHANGE = 'onHostThemeChange'
export const OFF_HOST_THEME_CHANGE = 'offHostThemeChange'
export const ON_KEYBOARD_HEIGHT_CHANGE = 'onKeyboardHeightChange'
export const ON_PAGE_NOT_FOUND = 'onPageNotFound'
export const ON_UNHANDLE_REJECTION = 'onUnhandledRejection'
Expand Down

0 comments on commit 466d02e

Please sign in to comment.