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