Skip to content

Commit

Permalink
修复带参路由无法记录到标签栏中
Browse files Browse the repository at this point in the history
  • Loading branch information
hooray committed Aug 8, 2024
1 parent b581cf6 commit 208df4e
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/store/modules/tabbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,13 @@ const useTabbarStore = defineStore(
if (route.name !== 'reload') {
// 记录查找到的标签页
const findTab = list.value.find((item) => {
if (item.routeName) {
return item.routeName === route.name
}
else {
return item.tabId === tabId
}
return item.tabId === tabId
})
// 新增标签页
if (!findTab) {
const listItem = {
tabId,
fullPath: route.fullPath,
routeName: route.name,
title: typeof meta?.title === 'function' ? meta.title() : meta?.title,
icon: meta?.icon ?? meta?.breadcrumbNeste?.findLast(item => item.icon)?.icon,
name: names,
Expand Down

0 comments on commit 208df4e

Please sign in to comment.