提交 c42b6480 编写于 作者: Q qiang

fix: 优化app端tab显示时机

上级 ecb2c3d3
...@@ -62,13 +62,11 @@ export function switchTab ({ ...@@ -62,13 +62,11 @@ export function switchTab ({
tabBarPage.$vm.__call_hook('onShow') tabBarPage.$vm.__call_hook('onShow')
tabBarPage.$getAppWebview().show('none') tabBarPage.$getAppWebview().show('none')
} else { } else {
showWebview( showWebview(__registerPage({
__registerPage({ path,
path, query: {},
query: {}, openType: 'switchTab'
openType: 'switchTab' }), 'none', 0, null, 70)
}), 'none', 0
)
} }
setStatusBarStyle() setStatusBarStyle()
......
...@@ -2,7 +2,7 @@ export const ANI_DURATION = 300 ...@@ -2,7 +2,7 @@ export const ANI_DURATION = 300
const ANI_SHOW = 'pop-in' const ANI_SHOW = 'pop-in'
export const ANI_CLOSE = 'pop-out' export const ANI_CLOSE = 'pop-out'
export function showWebview (webview, animationType, animationDuration, callback) { export function showWebview (webview, animationType, animationDuration, callback, delay = 50) {
setTimeout(() => { setTimeout(() => {
webview.show( webview.show(
animationType || ANI_SHOW, animationType || ANI_SHOW,
...@@ -11,5 +11,5 @@ export function showWebview (webview, animationType, animationDuration, callback ...@@ -11,5 +11,5 @@ export function showWebview (webview, animationType, animationDuration, callback
callback && callback() callback && callback()
} }
) )
}, 50) }, delay)
} }
...@@ -137,7 +137,7 @@ export default { ...@@ -137,7 +137,7 @@ export default {
console.log('tab append error') console.log('tab append error')
setTimeout(() => { setTimeout(() => {
this.append(webview) this.append(webview)
}, 100) }, 20)
} }
}) })
}, },
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册