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

fix(h5): redirectTo on the tabBar page

上级 572ee859
......@@ -104,13 +104,14 @@ function beforeEach (to, from, next, routes) {
if (from.meta.isQuit) { // 如果 redirectTo 的前一个页面是 quit 类型,则新打开的页面也是 quit
to.meta.isQuit = true
to.meta.isEntry = !!from.meta.isEntry
}
if (from.meta.isTabBar) { // 如果是 tabBar,需要更新系统组件 tabBar 内的 list 数据
to.meta.isTabBar = true
to.meta.tabBarIndex = from.meta.tabBarIndex
const appVm = getApp().$children[0]
appVm.$set(appVm.tabBar.list[to.meta.tabBarIndex], 'pagePath', to.meta.pagePath)
}
}
// 小程序没有这个逻辑,当时为何加了保留并更新 tabBar 的逻辑?
// if (from.meta.isTabBar) { // 如果是 tabBar,需要更新系统组件 tabBar 内的 list 数据
// to.meta.isTabBar = true
// to.meta.tabBarIndex = from.meta.tabBarIndex
// const appVm = getApp().$children[0]
// appVm.$set(appVm.tabBar.list[to.meta.tabBarIndex], 'pagePath', to.meta.pagePath)
// }
}
break
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册