提交 09d39974 编写于 作者: Q qiang

fix: 修复 app-v3 点击 tabBar 会重复触发 onShow 的问题

上级 3cde694c
......@@ -60,6 +60,9 @@ function _switchTab ({
// 查找当前 tabBarPage,且设置 visible
getCurrentPages(true).forEach(page => {
if (('/' + page.route) === path) {
if (!page.$page.meta.visible) {
page.$vm.__call_hook('onShow')
}
page.$page.meta.visible = true
tabBarPage = page
} else {
......@@ -70,7 +73,6 @@ function _switchTab ({
})
if (tabBarPage) {
tabBarPage.$vm.__call_hook('onShow')
tabBarPage.$getAppWebview().show('none')
} else {
return showWebview(registerPage({
......@@ -105,4 +107,4 @@ export function switchTab ({
from
}, callbackId)
}, openType === 'appLaunch')
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册