Skip to content

Commit

Permalink
🐛 修复多页签切换时丢失 queryString 的问题
Browse files Browse the repository at this point in the history
close gh-39
  • Loading branch information
Hccake committed Apr 2, 2024
1 parent b2753e0 commit 98e80f7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/layouts/components/MultiTab/MultiTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,13 @@ const MultiTab = defineComponent({

/** 点击事件 */
const handleTabClick = (path: Key) => {
router.push(path as string)
const routeList = multiTabStore.routeList
const index = routeList.findIndex(route => route.path === path)
if (index < 0) {
return
}
const route = routeList[index]
router.push(route.fullPath)
}

/** 修改事件(删除当前) */
Expand Down

0 comments on commit 98e80f7

Please sign in to comment.