fix(tabbar): 修复首页路径为'/'时tabbar不显示的问题

处理本地'/pages/index/index'和线上'/'路径不一致导致的tabbar显示问题
This commit is contained in:
feige996
2025-09-15 16:05:00 +08:00
parent 60e194afc9
commit 6b5e2f9d0b
2 changed files with 13 additions and 1 deletions

View File

@@ -45,6 +45,11 @@ const tabbarStore = reactive({
}
},
setAutoCurIdx(path: string) {
// '/' 当做首页
if (path === '/') {
this.setCurIdx(0)
return
}
const index = tabbarList.findIndex(item => item.pagePath === path)
FG_LOG_ENABLE && console.log('index:', index, path)
// console.log('tabbarList:', tabbarList)