From 642f7b025bad349b93c37cd38a5bedfda686fa84 Mon Sep 17 00:00:00 2001 From: xiongqin <3323939337@qq.com> Date: Thu, 3 Jul 2025 15:27:33 +0800 Subject: [PATCH] =?UTF-8?q?xq=20feat:"=E5=AE=8C=E6=88=90=E4=BA=86=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E9=A1=B5=E5=8F=AA=E8=83=BD=E5=90=8C=E6=97=B6=E5=AD=98?= =?UTF-8?q?=E5=9C=A8=E4=BA=94=E4=B8=AA"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/tagsView.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/store/modules/tagsView.ts b/src/store/modules/tagsView.ts index dc8850c..2200e94 100644 --- a/src/store/modules/tagsView.ts +++ b/src/store/modules/tagsView.ts @@ -18,8 +18,14 @@ export const useTagsViewStore = defineStore('tagsView', () => { }; const addView = (view: RouteLocationNormalized) => { - addVisitedView(view); - addCachedView(view); + if (visitedViews.value.length >= 6) { + delView(visitedViews.value[1]); + addVisitedView(view); + addCachedView(view); + } else { + addVisitedView(view); + addCachedView(view); + } }; const addIframeView = (view: RouteLocationNormalized): void => {