Skip to content

Commit 10427c6

Browse files
author
caominjie
committed
confirm App lifecycle onPageNotFound
1 parent 427fedd commit 10427c6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/mpvue/index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4947,6 +4947,10 @@ function callHook$1 (vm, hook, params) {
49474947
handlers = [handlers];
49484948
}
49494949

4950+
if (hook = 'onPageNotFound' && handlers) {
4951+
handlers = [handlers];
4952+
}
4953+
49504954
var ret;
49514955
if (handlers) {
49524956
for (var i = 0, j = handlers.length; i < j; i++) {
@@ -5160,6 +5164,10 @@ function initMP (mpType, next) {
51605164

51615165
onError: function onError (err) {
51625166
callHook$1(rootVueVM, 'onError', err);
5167+
},
5168+
5169+
onPageNotFound: function onPageNotFound (err) {
5170+
callHook$1(rootVueVM, 'onPageNotFound', err)
51635171
}
51645172
});
51655173
} else if (mpType === 'component') {

0 commit comments

Comments
 (0)