From 20fcf2d5facfb81089c63f8f79d261d244f09a3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Mon, 25 Aug 2025 18:49:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/menu/index.vue | 68 ++++++++++++++++--- src/router/index.js | 27 ++++++-- src/views/contactUs/companyProfile.vue | 2 +- .../contactUs/enterpriseQualification.vue | 2 +- src/views/contactUs/index.vue | 12 ++-- 5 files changed, 86 insertions(+), 25 deletions(-) diff --git a/src/components/menu/index.vue b/src/components/menu/index.vue index bd78ebf..0a55e16 100644 --- a/src/components/menu/index.vue +++ b/src/components/menu/index.vue @@ -1,11 +1,12 @@ @@ -272,7 +308,21 @@ export default { @menuHeight: 11vw; +/deep/ .el-submenu.is-active .el-submenu__title { + height: 4.5vw; +} +/deep/ .el-menu--horizontal > .el-submenu .el-submenu__title { + height: 4.5vw; +} + +/deep/ .el-menu--horizontal > .el-submenu .el-submenu__icon-arrow { + display: none; +} + +/deep/ .el-submenu__title { + margin: 0 20px +} diff --git a/src/router/index.js b/src/router/index.js index 35a0f20..230fa72 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -34,11 +34,15 @@ export default new Router({ { path: 'productCenter/detail', component: () => import('@/views/productCenter/detail.vue'), + }, { + path: 'index', component: () => import('@/views/index/index.vue'), }, { path: '/contactUs', component: () => import('@/views/contactUs/index.vue'), - }, + }, { + path: '/industryPlan/detail', component: () => import('@/views/productInfo.vue'), + }, ] // children: [ // { @@ -62,10 +66,6 @@ export default new Router({ // component: () => import('@/views/industryPlan.vue'), // }, // { - // path: '/industryPlan/detail', - // component: () => import('@/views/productInfo.vue'), - // }, - // { // path: '/serviceSupport', // component: () => import('@/views/serviceSupport.vue'), // }, @@ -82,6 +82,19 @@ export default new Router({ // component: () => import('@/views/casesAndClients/IOT/more.vue'), // }, // ] - }, - ] + },], scrollBehavior(to, from, savedPosition) { + if (to.hash) { + // 等 DOM 渲染完成再滚动 + return new Promise((resolve) => { + setTimeout(() => { + const el = document.querySelector(to.hash); + if (el) { + el.scrollIntoView({behavior: 'smooth'}); + } + resolve({left: 0, top: 0}); + }, 200); + }); + } + return {left: 0, top: 0}; + } }) diff --git a/src/views/contactUs/companyProfile.vue b/src/views/contactUs/companyProfile.vue index 47ee4e4..4db4fbb 100644 --- a/src/views/contactUs/companyProfile.vue +++ b/src/views/contactUs/companyProfile.vue @@ -2,7 +2,7 @@
- +
diff --git a/src/views/contactUs/enterpriseQualification.vue b/src/views/contactUs/enterpriseQualification.vue index e1759a2..f46959c 100644 --- a/src/views/contactUs/enterpriseQualification.vue +++ b/src/views/contactUs/enterpriseQualification.vue @@ -1,7 +1,7 @@