提交 050515c8 编写于 作者: Q qiang

fix: 解决纯nvue模式tab页面首次初始化无法触发onTabItemTap生命周期的问题

上级 31b1a2e9
......@@ -112,15 +112,17 @@ function initTabBar () {
const onLaunchWebviewReady = function onLaunchWebviewReady () {
tabBar.init(__uniConfig.tabBar, (item, index) => {
UniServiceJSBridge.emit('onTabItemTap', {
index,
text: item.text,
pagePath: item.pagePath
})
uni.switchTab({
url: '/' + item.pagePath,
openType: 'switchTab',
from: 'tabBar'
from: 'tabBar',
success () {
UniServiceJSBridge.emit('onTabItemTap', {
index,
text: item.text,
pagePath: item.pagePath
})
}
})
})
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册