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); + } } }