From a86557cc2a9730eb4206b9ca8d96e2a7762c4869 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Tue, 24 Mar 2026 17:58:07 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E9=A1=B5?= =?UTF-8?q?=E7=AD=BE=E5=8C=BA=E5=A2=9E=E5=8A=A0=E5=B7=A6=E5=8F=B3=E6=BB=9A?= =?UTF-8?q?=E5=8A=A8=E3=80=81=E5=8F=B3=E4=BE=A7=E4=B8=8B=E6=8B=89=E3=80=81?= =?UTF-8?q?=E5=8D=95=E7=8B=AC=E2=80=9C=E5=88=B7=E6=96=B0=E2=80=9D=E6=8C=89?= =?UTF-8?q?=E9=92=AE=20add=20=E6=96=B0=E5=A2=9E=20TagsView=20=E5=85=A8?= =?UTF-8?q?=E5=B1=8F=E5=8A=9F=E8=83=BD=20add=20=E6=96=B0=E5=A2=9E=20?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E9=9D=A2=E6=9D=BF=E5=A2=9E=E5=8A=A0=E4=BA=86?= =?UTF-8?q?=E2=80=9C=E6=8C=81=E4=B9=85=E5=8C=96=E6=A0=87=E7=AD=BE=E9=A1=B5?= =?UTF-8?q?=E2=80=9D=E5=BC=80=E5=85=B3=20=E6=94=AF=E6=8C=81=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E9=A1=B5=E6=8C=81=E4=B9=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/AppMain.vue | 8 + src/layout/components/Settings/index.vue | 28 +- src/layout/components/TagsView/ScrollPane.vue | 167 ++++-- src/layout/components/TagsView/index.vue | 513 ++++++++++++++---- src/settings.ts | 5 + src/store/modules/settings.ts | 4 +- src/store/modules/tagsView.ts | 162 +++++- src/types/global.d.ts | 4 + 8 files changed, 681 insertions(+), 210 deletions(-) diff --git a/src/layout/components/AppMain.vue b/src/layout/components/AppMain.vue index 6d3e0a6..17df5af 100644 --- a/src/layout/components/AppMain.vue +++ b/src/layout/components/AppMain.vue @@ -52,6 +52,14 @@ function addIframe() { position: relative; overflow: hidden; padding: 12px; + + &:fullscreen, + &:-webkit-full-screen, + &:-moz-full-screen, + &:-ms-fullscreen { + background: var(--el-bg-color); + overflow-y: auto; + } } .app-main.with-fixed-header { diff --git a/src/layout/components/Settings/index.vue b/src/layout/components/Settings/index.vue index d60b24b..3bca22f 100644 --- a/src/layout/components/Settings/index.vue +++ b/src/layout/components/Settings/index.vue @@ -42,7 +42,7 @@ dark
- light
-
+
+ 持久化标签页 + + + +
+
显示页签图标 @@ -161,19 +168,19 @@ const toggleDark = () => useToggle(isDark); /** 菜单导航设置 */ watch( - () => navType, - (val: string) => { - if (val.value === NavTypeEnum.TOP) { + navType, + (val) => { + if (val === NavTypeEnum.TOP) { appStore.toggleSideBarHide(true); permissionStore.setSidebarRouters(permissionStore.defaultRoutes as any); - } else if (val.value === NavTypeEnum.LEFT) { + } else if (val === NavTypeEnum.LEFT) { appStore.toggleSideBarHide(false); permissionStore.setSidebarRouters(permissionStore.defaultRoutes as any); - } else if (val.value === NavTypeEnum.MIX) { + } else if (val === NavTypeEnum.MIX) { appStore.toggleSideBarHide(false); } }, - { immediate: true, deep: true } + { immediate: true } ); const handleNavType = (val: NavTypeEnum) => { @@ -202,7 +209,11 @@ const handleTheme = (val: string) => { const saveSetting = () => { proxy?.$modal.loading('正在保存到本地,请稍候...'); const settings = useStorage('layout-setting', defaultSettings); + if (!storeSettings.value.tagsViewPersist) { + localStorage.removeItem('tags-view-visited'); + } settings.value.tagsView = storeSettings.value.tagsView; + settings.value.tagsViewPersist = storeSettings.value.tagsViewPersist; settings.value.tagsIcon = storeSettings.value.tagsIcon; settings.value.fixedHeader = storeSettings.value.fixedHeader; settings.value.sidebarLogo = storeSettings.value.sidebarLogo; @@ -216,6 +227,7 @@ const saveSetting = () => { }; const resetSetting = () => { proxy?.$modal.loading('正在清除设置缓存并刷新,请稍候...'); + localStorage.removeItem('tags-view-visited'); useStorage('layout-setting', null).value = null; setTimeout('window.location.reload()', 1000); }; diff --git a/src/layout/components/TagsView/ScrollPane.vue b/src/layout/components/TagsView/ScrollPane.vue index e24f5ec..8c64c68 100644 --- a/src/layout/components/TagsView/ScrollPane.vue +++ b/src/layout/components/TagsView/ScrollPane.vue @@ -5,84 +5,127 @@ @@ -92,11 +135,15 @@ defineExpose({ position: relative; overflow: hidden; width: 100%; + :deep(.el-scrollbar__bar) { - bottom: 0px; + bottom: 0; } + :deep(.el-scrollbar__wrap) { - height: 49px; + height: 34px; + display: flex; + align-items: center; } } diff --git a/src/layout/components/TagsView/index.vue b/src/layout/components/TagsView/index.vue index 92c52a3..8fed762 100644 --- a/src/layout/components/TagsView/index.vue +++ b/src/layout/components/TagsView/index.vue @@ -1,63 +1,115 @@