From a4b3c241a2210f2eb440de1f0f98ccf9ef2ae53d Mon Sep 17 00:00:00 2001 From: zhaichao Date: Sun, 23 Aug 2026 16:12:57 +0800 Subject: [PATCH] =?UTF-8?q?=E7=82=B9=E5=87=BB=E6=A0=87=E9=A2=98=E5=85=B3?= =?UTF-8?q?=E9=97=AD=E6=89=80=E6=9C=89tab?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/layout/index.vue | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/frontend/src/layout/index.vue b/frontend/src/layout/index.vue index a4684cfa..66d9ddee 100644 --- a/frontend/src/layout/index.vue +++ b/frontend/src/layout/index.vue @@ -12,7 +12,7 @@ class="mobile-hamburger" @toggleClick="toggleSideBar" /> - 教学管理信息系统 + 教学管理信息系统 @@ -69,6 +69,16 @@ export default { }, toggleSideBar() { this.$store.dispatch('app/toggleSideBar') + }, + handleCloseAllTabs() { + this.$store.dispatch('tagsView/delAllViews').then(({ visitedViews }) => { + const last = visitedViews[visitedViews.length - 1] + if (last) { + this.$router.push(last.fullPath).catch(() => {}) + } else { + this.$router.push('/').catch(() => {}) + } + }) } } } @@ -129,6 +139,14 @@ export default { white-space: nowrap; letter-spacing: 1.5px; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); + cursor: pointer; + border-radius: 6px; + padding: 4px 10px; + transition: background 0.25s ease; + + &:hover { + background: rgba(255, 255, 255, 0.15); + } } }