We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e05ae82 commit 5412e35Copy full SHA for 5412e35
src/utils/composables/useTabbar.ts
@@ -25,11 +25,11 @@ export default function useTabbar() {
25
// 如果关闭的标签正好是当前路由
26
if (tabId === activedTabId) {
27
const index = tabbarStore.list.findIndex(item => item.tabId === tabId)
28
- if (index < tabbarStore.list.length - 1) {
29
- close(tabbarStore.list[index + 1].fullPath)
+ if (index > 0) {
+ close(tabbarStore.list[index - 1].fullPath)
30
}
31
else {
32
- close(tabbarStore.list[index - 1].fullPath)
+ close(tabbarStore.list[index + 1].fullPath)
33
34
35
0 commit comments