From 3288829a01cbd62c7b62c7891e0ab7eecd5a7760 Mon Sep 17 00:00:00 2001 From: zhugongping Date: Wed, 23 Sep 2026 17:10:29 +0800 Subject: [PATCH] =?UTF-8?q?FrontendRefactoring=EF=BC=9A=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E6=A0=8F=E5=8F=AF=E4=BB=A5=E5=B1=95=E7=A4=BA=E5=A4=9A=E4=B8=AA?= =?UTF-8?q?=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yack-web/src/assets/styles/sidebar.scss | 8 + yack-web/src/assets/styles/variables.scss | 4 + yack-web/src/layout/components/AppMain.vue | 12 +- .../src/layout/components/Sidebar/Logo.vue | 44 +- .../src/layout/components/Sidebar/index.vue | 10 +- .../layout/components/TagsView/ScrollPane.vue | 26 +- .../src/layout/components/TagsView/index.vue | 478 ++++++++++++++++-- yack-web/src/layout/index.vue | 96 +++- yack-web/src/settings.js | 4 +- yack-web/src/store/modules/settings.js | 12 + yack-web/src/store/modules/tagsView.js | 83 ++- 11 files changed, 703 insertions(+), 74 deletions(-) diff --git a/yack-web/src/assets/styles/sidebar.scss b/yack-web/src/assets/styles/sidebar.scss index 47b82f5c..0872eec1 100644 --- a/yack-web/src/assets/styles/sidebar.scss +++ b/yack-web/src/assets/styles/sidebar.scss @@ -107,6 +107,14 @@ } } + // 顶部浏览器式标签栏存在时,侧边栏让出顶部高度,避免被标签栏遮住 + &.has-top-tabs { + .sidebar-container { + top: $top-tabs-height; + height: calc(100% - #{$top-tabs-height}); + } + } + .hideSidebar { .sidebar-container { width: 54px !important; diff --git a/yack-web/src/assets/styles/variables.scss b/yack-web/src/assets/styles/variables.scss index 56fed1f2..c1882c1d 100644 --- a/yack-web/src/assets/styles/variables.scss +++ b/yack-web/src/assets/styles/variables.scss @@ -38,6 +38,10 @@ $base-sub-menu-hover:#001528; $base-sidebar-width: 200px; +// 顶部浏览器式标签栏高度(固定在页面最顶部,横跨侧边栏) +// 取 50px 与 navbar 同高,才能放得下侧边栏原有的 42px logo + 24px 标题 +$top-tabs-height: 50px; + // the :export directive is the magic sauce for webpack // https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass :export { diff --git a/yack-web/src/layout/components/AppMain.vue b/yack-web/src/layout/components/AppMain.vue index f4e74dbd..f5cc0418 100644 --- a/yack-web/src/layout/components/AppMain.vue +++ b/yack-web/src/layout/components/AppMain.vue @@ -27,6 +27,8 @@ export default { diff --git a/yack-web/src/layout/components/Sidebar/Logo.vue b/yack-web/src/layout/components/Sidebar/Logo.vue index 7b33d446..91e08459 100644 --- a/yack-web/src/layout/components/Sidebar/Logo.vue +++ b/yack-web/src/layout/components/Sidebar/Logo.vue @@ -1,5 +1,5 @@