提交 953da7f1 编写于 作者: inkwalk's avatar inkwalk

fixed : h5 tabbar navigate error

上级 471c58c7
......@@ -40,21 +40,24 @@
},
computed: {
...mapState({
active: state => state.active
active: state => state.active,
hasLeftWin: state => !state.noMatchLeftWindow
})
},
watch: {
$route: {
immediate: true,
handler(newRoute) {
let comp = newRoute.path.split('/')[2]
this.current = this.selected[comp]
if ( this.hasLeftWin ) {
let comp = newRoute.path.split('/')[2]
this.current = this.selected[comp]
for(const item of this.indexPage) {
if (newRoute.path === item.tabBar) {
uni.redirectTo({
url: item.index
})
for(const item of this.indexPage) {
if (newRoute.path === item.tabBar) {
uni.redirectTo({
url: item.index
})
}
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册