提交 c07be2be 编写于 作者: fxy060608's avatar fxy060608

fix(h5): onBackPress

上级 956f95ab
import {
isFn
} from 'uni-shared'
hasLifecycleHook
} from 'uni-helpers/index'
function onAppRoute (type, {
url,
......@@ -27,7 +27,7 @@ function onAppRoute (type, {
const pages = getCurrentPages()
if (pages.length) {
const page = pages[pages.length - 1]
if (isFn(page.$options.onBackPress) && page.$options.onBackPress.call(page, {
if (hasLifecycleHook(page.$options.onBackPress) && page.__call_hook('onBackPress', {
from
}) === true) {
canBack = false
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册