提交 b03ec93f 编写于 作者: Q qiang

fix: 解决纯nvue切换页面动画延迟的问题

上级 f3d3e2e4
...@@ -38,7 +38,8 @@ export function navigateTo ({ ...@@ -38,7 +38,8 @@ export function navigateTo ({
invoke(callbackId, { invoke(callbackId, {
errMsg: 'navigateTo:ok' errMsg: 'navigateTo:ok'
}) })
} },
0
) )
setStatusBarStyle() setStatusBarStyle()
......
...@@ -3,7 +3,7 @@ const ANI_SHOW = 'pop-in' ...@@ -3,7 +3,7 @@ const ANI_SHOW = 'pop-in'
export const ANI_CLOSE = 'pop-out' export const ANI_CLOSE = 'pop-out'
export function showWebview (webview, animationType, animationDuration, callback, delay = 50) { export function showWebview (webview, animationType, animationDuration, callback, delay = 50) {
setTimeout(() => { function show () {
webview.show( webview.show(
animationType || ANI_SHOW, animationType || ANI_SHOW,
parseInt(animationDuration) || ANI_DURATION, parseInt(animationDuration) || ANI_DURATION,
...@@ -11,5 +11,10 @@ export function showWebview (webview, animationType, animationDuration, callback ...@@ -11,5 +11,10 @@ export function showWebview (webview, animationType, animationDuration, callback
callback && callback() callback && callback()
} }
) )
}, delay) }
if (delay) {
setTimeout(show, delay)
} else {
show()
}
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册