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 @@