diff --git a/packages/uni-app-plus/dist/tools.umd.js b/packages/uni-app-plus/dist/tools.umd.js index bf1f6556ca39b20c9bbcd3d98e6b4975e1de12dc..21b147e591cb393c5e9212d1f86e0d1eb7ba1518 100644 --- a/packages/uni-app-plus/dist/tools.umd.js +++ b/packages/uni-app-plus/dist/tools.umd.js @@ -2,7 +2,7 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : window || self, factory(window.Tools = {})); -})(this, (function (exports) { 'use strict'; +}(this, (function (exports) { 'use strict'; const ACTION_TYPE_PAGE_CREATE = 1; const ACTION_TYPE_PAGE_CREATED = 2; @@ -160,4 +160,4 @@ Object.defineProperty(exports, '__esModule', { value: true }); -})); +}))); diff --git a/packages/uni-app-plus/dist/uni-app-service.es.js b/packages/uni-app-plus/dist/uni-app-service.es.js index 8236ef20ed2b479eac5eaba5494f8ad19dc8793d..7a81a32c21eb17ec5f666b6cb8ca7dbd8d0e748e 100644 --- a/packages/uni-app-plus/dist/uni-app-service.es.js +++ b/packages/uni-app-plus/dist/uni-app-service.es.js @@ -10147,6 +10147,12 @@ var serviceContext = (function (vue) { injectAppLaunchHooks(appVm.$); invokeHook(appVm, ON_LAUNCH, args); invokeHook(appVm, ON_SHOW, args); + // https://tower.im/teams/226535/todos/16905/ + const getAppState = weex.requireModule('plus').getAppState; + const appState = getAppState && Number(getAppState()); + if (appState === 2) { + invokeHook(appVm, ON_HIDE, args); + } } // 统一处理路径 @@ -19490,7 +19496,7 @@ var serviceContext = (function (vue) { return index; -})(Vue); +}(Vue)); const uni = serviceContext.uni; const getApp = serviceContext.getApp; const getCurrentPages = serviceContext.getCurrentPages; diff --git a/packages/uni-shared/dist/uni-shared.d.ts b/packages/uni-shared/dist/uni-shared.d.ts index ff5f8ea745056d946a3690116ae2f21eee97f28d..db7f082f73c29cbd3c70fc56e7786387bd603d5c 100644 --- a/packages/uni-shared/dist/uni-shared.d.ts +++ b/packages/uni-shared/dist/uni-shared.d.ts @@ -1,3 +1,5 @@ +/// + import { ComponentInternalInstance } from 'vue'; import { ComponentOptionsBase } from 'vue'; import { ComponentPublicInstance } from 'vue';