提交 4520767f 编写于 作者: fxy060608's avatar fxy060608

fix(h5): onTabItemTap

上级 e285adf4
......@@ -5,7 +5,8 @@ import {
function onAppRoute (type, {
url,
delta,
from = 'navigateBack'
from = 'navigateBack',
detail
} = {}) {
const router = getApp().$router
switch (type) {
......@@ -45,7 +46,10 @@ function onAppRoute (type, {
case 'switchTab':
router.replace({
type,
path: url
path: url,
params: {
detail
}
})
break
}
......
......@@ -20,7 +20,13 @@ export function callPageHook (vm, hook, ...params) {
vm.$mp.query = params[0]
UniServiceJSBridge.publishHandler('onPageLoad', vm, vm.$page.id)
}
if (hook === 'onShow') {
if (hook === 'onShow') {
if (
vm.$route.meta.isTabBar &&
vm.$route.params.detail
) {
UniServiceJSBridge.emit('onTabItemTap', vm.$route.params.detail)
}
UniServiceJSBridge.publishHandler('onPageShow', vm, vm.$page.id)
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册