From a105df66b1e7b5448c35bb405798c1ae782c17fa Mon Sep 17 00:00:00 2001 From: Hooray Hu <304327508@qq.com> Date: Mon, 18 Mar 2024 00:31:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=A1=B6=E9=83=A8?= =?UTF-8?q?=E5=AF=BC=E8=88=AA=E6=95=B0=E9=87=8F=E8=BF=87=E5=A4=9A=EF=BC=8C?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E5=B7=A5=E5=85=B7=E6=A0=8F=E8=A2=AB=E9=81=AE?= =?UTF-8?q?=E6=8C=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layouts/components/Header/index.vue | 139 +++++++++++------------- 1 file changed, 65 insertions(+), 74 deletions(-) diff --git a/src/layouts/components/Header/index.vue b/src/layouts/components/Header/index.vue index 83983b2f6..379916f2e 100755 --- a/src/layouts/components/Header/index.vue +++ b/src/layouts/components/Header/index.vue @@ -29,32 +29,30 @@ function handlerMouserScroll(event: WheelEvent) {
-
- - @@ -83,75 +81,68 @@ header { .header-container { display: flex; + gap: 30px; align-items: center; justify-content: space-between; width: 100%; height: 100%; margin: 0 auto; - .main { - display: flex; - flex: 1; - flex-wrap: wrap; - align-items: center; - height: 100%; - } - } - - :deep(a.title) { - position: relative; - width: inherit; - height: inherit; - padding: inherit; - background-color: inherit; + :deep(a.title) { + position: relative; + flex: 0; + width: inherit; + height: inherit; + padding: inherit; + background-color: inherit; + + .logo { + width: initial; + height: 40px; + } - .logo { - width: initial; - height: 40px; + span { + font-size: 20px; + color: var(--g-header-color); + letter-spacing: 1px; + } } - span { - font-size: 20px; - color: var(--g-header-color); - letter-spacing: 1px; - } - } + .menu-container { + flex: 1; + height: 100%; + padding: 0 20px; + overflow-x: auto; + mask-image: linear-gradient(to right, transparent, #000 20px, #000 calc(100% - 20px), transparent); - .menu-container { - flex: 1; - height: 100%; - padding: 0 20px; - margin: 0 30px; - overflow-x: auto; - mask-image: linear-gradient(to right, transparent, #000 20px, #000 calc(100% - 20px), transparent); + // firefox隐藏滚动条 + scrollbar-width: none; - // firefox隐藏滚动条 - scrollbar-width: none; + // chrome隐藏滚动条 + &::-webkit-scrollbar { + display: none; + } - // chrome隐藏滚动条 - &::-webkit-scrollbar { - display: none; - } - } + .menu { + display: inline-flex; + height: 100%; - .menu { - display: inline-flex; - height: 100%; + :deep(.menu-item) { + .menu-item-container { + color: var(--g-header-menu-color); - :deep(.menu-item) { - .menu-item-container { - color: var(--g-header-menu-color); + &:hover { + color: var(--g-header-menu-hover-color); + background-color: var(--g-header-menu-hover-bg); + } + } - &:hover { - color: var(--g-header-menu-hover-color); - background-color: var(--g-header-menu-hover-bg); + &.active .menu-item-container { + color: var(--g-header-menu-active-color); + background-color: var(--g-header-menu-active-bg); + } } } - - &.active .menu-item-container { - color: var(--g-header-menu-active-color); - background-color: var(--g-header-menu-active-bg); - } } } }