mirror of
https://github.com/fantastic-admin/basic.git
synced 2026-10-07 11:34:10 +08:00
refactor: 优化 tabId ,排除路由中的 query 参数
This commit is contained in:
@@ -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) => {
|
||||
|
||||
@@ -7,7 +7,7 @@ export default function useTabbar() {
|
||||
const tabbarStore = useTabbarStore()
|
||||
|
||||
function getId() {
|
||||
return route.fullPath
|
||||
return route.path
|
||||
}
|
||||
|
||||
function closeById(tabId = getId()) {
|
||||
|
||||
Reference in New Issue
Block a user