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

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

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