From 6f2fbf4a9002771cb46cf956d2cef9cefc4abc47 Mon Sep 17 00:00:00 2001
From: pany <939630029@qq.com>
Date: Fri, 8 Nov 2024 20:23:56 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=B8=8A=E4=B8=80?=
=?UTF-8?q?=E4=B8=AA=20commit=20=E5=B8=A6=E6=9D=A5=E7=9A=84=20tag=20?=
=?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=A1=BA=E5=BA=8F=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/layouts/components/TagsView/index.vue | 10 ++++------
src/store/modules/tags-view.ts | 4 ++--
2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/src/layouts/components/TagsView/index.vue b/src/layouts/components/TagsView/index.vue
index 0e14c32..18f8269 100644
--- a/src/layouts/components/TagsView/index.vue
+++ b/src/layouts/components/TagsView/index.vue
@@ -1,5 +1,5 @@
diff --git a/src/store/modules/tags-view.ts b/src/store/modules/tags-view.ts
index db728d3..51194de 100644
--- a/src/store/modules/tags-view.ts
+++ b/src/store/modules/tags-view.ts
@@ -18,7 +18,7 @@ export const useTagsViewStore = defineStore("tags-view", () => {
})
//#region add
- const addVisitedView = (view: TagView, isUnshift: boolean = false) => {
+ const addVisitedView = (view: TagView) => {
// 检查是否已经存在相同的 visitedView
const index = visitedViews.value.findIndex((v) => v.path === view.path)
if (index !== -1) {
@@ -26,7 +26,7 @@ export const useTagsViewStore = defineStore("tags-view", () => {
visitedViews.value[index].fullPath !== view.fullPath && (visitedViews.value[index] = { ...view })
} else {
// 添加新的 visitedView
- isUnshift ? visitedViews.value.unshift({ ...view }) : visitedViews.value.push({ ...view })
+ visitedViews.value.push({ ...view })
}
}