refactor: 优化 tabId ,排除路由中的 query 参数

This commit is contained in:
Hooray
2025-07-21 10:21:36 +08:00
parent 2344fd78c1
commit 6549b8ffbf
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ export const useTabbarStore = defineStore(
}
})
const meta = route.matched.at(-1)?.meta
const tabId = route.fullPath
const tabId = route.path
if (route.name !== 'reload') {
// 记录查找到的标签页
const findTab = list.value.find((item) => {
+1 -1
View File
@@ -7,7 +7,7 @@ export default function useTabbar() {
const tabbarStore = useTabbarStore()
function getId() {
return route.fullPath
return route.path
}
function closeById(tabId = getId()) {