提交 2719b6e2 编写于 作者: 雪洛's avatar 雪洛

fix(v3): 修复webveiw卸载时的返回问题

上级 b257c342
......@@ -50,7 +50,7 @@ function back (delta, animationType, animationDuration) {
})
}
const backPage = function () {
const backPage = function (webview) {
if (animationType) {
webview.close(animationType, animationDuration || ANI_DURATION)
} else {
......@@ -69,11 +69,13 @@ function back (delta, animationType, animationDuration) {
})
}
const webview = currentPage.$getAppWebview()
if (!currentPage.__uniapp_webview) {
return backPage()
return backPage(webview)
}
const webview = currentPage.$getAppWebview()
backWebview(webview, backPage)
backWebview(webview, () => {
backPage(webview)
})
}
export function navigateBack ({
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册