From 75cbc471ab4a8556e0842f28d2ec020bf237751d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A6=86=E9=92=B1=E8=90=BD=E5=B0=BD=E6=A7=BF=E8=8A=B1?= =?UTF-8?q?=E7=A8=80?= <2675540038@qq.com> Date: Mon, 21 Apr 2025 09:42:33 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=8F=90=E4=BA=A4=E7=BA=BF=E4=B8=8A=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E4=BA=A4=E6=8E=A5=E7=BB=99=E4=BA=8C=E7=BB=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/AppHeader.vue | 41 +++++++++++++++++++++++++++------------- nuxt.config.ts | 2 +- pages/index.vue | 2 +- 3 files changed, 30 insertions(+), 15 deletions(-) diff --git a/components/AppHeader.vue b/components/AppHeader.vue index f7f9b90..94f51ea 100644 --- a/components/AppHeader.vue +++ b/components/AppHeader.vue @@ -3,7 +3,7 @@
- +
企业首页 @@ -59,7 +59,7 @@ console.log(route) @import '@/assets/index.css'; .box_1 { - justify-content: space-between; + justify-content: center; padding: 0 20px; align-items: center; position: relative; @@ -78,7 +78,7 @@ console.log(route) .mobile-menu-btn { display: none; cursor: pointer; - + @media (max-width: 768px) { display: block; } @@ -88,7 +88,7 @@ console.log(route) width: 30px; height: 24px; position: relative; - + span { display: block; position: absolute; @@ -97,21 +97,31 @@ console.log(route) background: #000; border-radius: 3px; transition: all 0.3s ease; - - &:nth-child(1) { top: 0; } - &:nth-child(2) { top: 10px; } - &:nth-child(3) { top: 20px; } + + &:nth-child(1) { + top: 0; + } + + &:nth-child(2) { + top: 10px; + } + + &:nth-child(3) { + top: 20px; + } } - + &.is-active { span { &:nth-child(1) { transform: rotate(45deg); top: 10px; } + &:nth-child(2) { opacity: 0; } + &:nth-child(3) { transform: rotate(-45deg); top: 10px; @@ -131,23 +141,28 @@ console.log(route) padding: 20px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); z-index: 100; - + @media (max-width: 768px) { display: flex; } - + .mobile-nav-item { padding: 15px 0; border-bottom: 1px solid #eee; cursor: pointer; - + &:last-child { border-bottom: none; } - + &:hover { color: #666; } } } + +.desktop-nav span:hover { + cursor: pointer; + color: #fff; +} diff --git a/nuxt.config.ts b/nuxt.config.ts index 6b93d47..104fa22 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -3,7 +3,7 @@ import { defineNuxtConfig } from 'nuxt/config' export default defineNuxtConfig({ app: { - baseURL:'/web/', + baseURL:'/', }, nitro: { routeRules: { diff --git a/pages/index.vue b/pages/index.vue index de27618..200c267 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -234,6 +234,7 @@ 2025-06-24
+
@@ -464,5 +465,4 @@ const animate = () => { transition: 6s linear; transform: scale(1, 1); } -