diff --git a/packages/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js b/packages/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js index e3d8735d8325d6563752dea7a7be82206ecc7549..b30ced005a4298d5c0fc94e18ebb95f6a9810383 100644 --- a/packages/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js +++ b/packages/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js @@ -5963,7 +5963,8 @@ var LIFECYCLE_HOOKS$1 = [ 'onUniNViewMessage', 'onPageNotFound', 'onThemeChange', - 'onError', + 'onError', + 'onUnhandledRejection', //Page 'onLoad', // 'onShow', @@ -5972,7 +5973,9 @@ var LIFECYCLE_HOOKS$1 = [ 'onUnload', 'onPullDownRefresh', 'onReachBottom', - 'onTabItemTap', + 'onTabItemTap', + 'onAddToFavorites', + 'onShareTimeline', 'onShareAppMessage', 'onResize', 'onPageScroll', diff --git a/src/core/runtime/mp/constants.js b/src/core/runtime/mp/constants.js index cb42d25064e6aee45348a4bef15c4824888ee707..771dbd4e8208fb9bc8cbdc9b8130c0ab0a0cfbd2 100644 --- a/src/core/runtime/mp/constants.js +++ b/src/core/runtime/mp/constants.js @@ -17,7 +17,7 @@ export const PAGE_LIFETIMES = { } export const PAGE_LIFETIMES_KEYS = Object.keys(PAGE_LIFETIMES) - +// TODO 待整理,现在到处都是 export const PAGE_LIFECYCLE = [ 'onLoad', 'onShow', @@ -25,7 +25,9 @@ export const PAGE_LIFECYCLE = [ 'onHide', 'onUnload', 'onPullDownRefresh', - 'onReachBottom', + 'onReachBottom', + 'onAddToFavorites', + 'onShareTimeline', 'onShareAppMessage', 'onPageScroll', 'onResize', diff --git a/src/core/runtime/wrapper/util.js b/src/core/runtime/wrapper/util.js index dfd0ded680be633db29e4365115f5e836d34a290..d1c8e6ba9727135109ddf5167fcdbe44809f8b4d 100644 --- a/src/core/runtime/wrapper/util.js +++ b/src/core/runtime/wrapper/util.js @@ -9,7 +9,9 @@ import { export const PAGE_EVENT_HOOKS = [ 'onPullDownRefresh', - 'onReachBottom', + 'onReachBottom', + 'onAddToFavorites', + 'onShareTimeline', 'onShareAppMessage', 'onPageScroll', 'onResize', diff --git a/src/core/service/plugins/lifecycle.js b/src/core/service/plugins/lifecycle.js index d2512177102d57ab9653620be3fdf23395d3d2af..6cf7846b12e7c97b1eed6860bbe3a2ae0bfdaea5 100644 --- a/src/core/service/plugins/lifecycle.js +++ b/src/core/service/plugins/lifecycle.js @@ -8,7 +8,8 @@ const LIFECYCLE_HOOKS = [ 'onUniNViewMessage', 'onPageNotFound', 'onThemeChange', - 'onError', + 'onError', + 'onUnhandledRejection', // Page 'onLoad', // 'onShow', @@ -17,7 +18,9 @@ const LIFECYCLE_HOOKS = [ 'onUnload', 'onPullDownRefresh', 'onReachBottom', - 'onTabItemTap', + 'onTabItemTap', + 'onAddToFavorites', + 'onShareTimeline', 'onShareAppMessage', 'onResize', 'onPageScroll', diff --git a/src/platforms/mp-weixin/runtime/wrapper/app-base-parser.js b/src/platforms/mp-weixin/runtime/wrapper/app-base-parser.js index faaecadfb84952f5f28f723fd254f2f360d0808d..e09bdfbb9d8e8cf6b4da24ed82073a56f80141f1 100644 --- a/src/platforms/mp-weixin/runtime/wrapper/app-base-parser.js +++ b/src/platforms/mp-weixin/runtime/wrapper/app-base-parser.js @@ -10,7 +10,8 @@ const hooks = [ 'onHide', 'onError', 'onPageNotFound', - 'onThemeChange' + 'onThemeChange', + 'onUnhandledRejection' ] export default function parseBaseApp (vm, {