Showing
7 changed files
with
138 additions
and
56 deletions
| ... | @@ -7,8 +7,11 @@ export {} | ... | @@ -7,8 +7,11 @@ export {} |
| 7 | /* prettier-ignore */ | 7 | /* prettier-ignore */ |
| 8 | declare module 'vue' { | 8 | declare module 'vue' { |
| 9 | export interface GlobalComponents { | 9 | export interface GlobalComponents { |
| 10 | + ElButton: typeof import('element-ui/lib/button')['default'] | ||
| 10 | ElCol: typeof import('element-ui/lib/col')['default'] | 11 | ElCol: typeof import('element-ui/lib/col')['default'] |
| 12 | + ElCollapseTransition: typeof import('element-ui/lib/transitions/collapse-transition')['default'] | ||
| 11 | ElRow: typeof import('element-ui/lib/row')['default'] | 13 | ElRow: typeof import('element-ui/lib/row')['default'] |
| 14 | + HagerBox: typeof import('./src/components/common/hagerBox.vue')['default'] | ||
| 12 | HagerFooter: typeof import('./src/components/common/hagerFooter.vue')['default'] | 15 | HagerFooter: typeof import('./src/components/common/hagerFooter.vue')['default'] |
| 13 | HagerHeader: typeof import('./src/components/common/hagerHeader.vue')['default'] | 16 | HagerHeader: typeof import('./src/components/common/hagerHeader.vue')['default'] |
| 14 | Navbar: typeof import('./src/components/navbar.vue')['default'] | 17 | Navbar: typeof import('./src/components/navbar.vue')['default'] | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2024-09-26 13:36:06 | 2 | * @Date: 2024-09-26 13:36:06 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-09-26 14:33:29 | 4 | + * @LastEditTime: 2024-09-26 17:16:14 |
| 5 | * @FilePath: /hager/src/App.vue | 5 | * @FilePath: /hager/src/App.vue |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | --> | 7 | --> |
| 8 | <template> | 8 | <template> |
| 9 | <div class=""> | 9 | <div class=""> |
| 10 | <hager-header></hager-header> | 10 | <hager-header></hager-header> |
| 11 | - <el-row> | 11 | + <router-view style="margin-top: 3rem;"></router-view> |
| 12 | - <el-col :sm="2" :md="2" :lg="3" :xl="4"> </el-col> | ||
| 13 | - <el-col :sm="20" :md="20" :lg="18" :xl="16"> | ||
| 14 | - <router-view style="padding-top: 3rem;"></router-view> | ||
| 15 | - </el-col> | ||
| 16 | - <el-col :sm="2" :md="2" :lg="3" :xl="4"> </el-col> | ||
| 17 | - </el-row> | ||
| 18 | <hager-footer></hager-footer> | 12 | <hager-footer></hager-footer> |
| 19 | </div> | 13 | </div> |
| 20 | </template> | 14 | </template> |
| ... | @@ -34,7 +28,6 @@ export default { | ... | @@ -34,7 +28,6 @@ export default { |
| 34 | 28 | ||
| 35 | }, | 29 | }, |
| 36 | methods: { | 30 | methods: { |
| 37 | - | ||
| 38 | } | 31 | } |
| 39 | } | 32 | } |
| 40 | </script> | 33 | </script> | ... | ... |
src/components/common/hagerBox.vue
0 → 100644
| 1 | +<!-- | ||
| 2 | + * @Date: 2024-09-26 17:15:15 | ||
| 3 | + * @LastEditors: hookehuyr hookehuyr@gmail.com | ||
| 4 | + * @LastEditTime: 2024-09-26 17:15:27 | ||
| 5 | + * @FilePath: /hager/src/components/common/hagerBox.vue | ||
| 6 | + * @Description: 文件描述 | ||
| 7 | +--> | ||
| 8 | +<template> | ||
| 9 | + <div class="hagerBox"> | ||
| 10 | + <el-row> | ||
| 11 | + <el-col :sm="2" :md="2" :lg="3" :xl="4"> </el-col> | ||
| 12 | + <el-col :sm="20" :md="20" :lg="18" :xl="16"> | ||
| 13 | + <slot></slot> | ||
| 14 | + </el-col> | ||
| 15 | + <el-col :sm="2" :md="2" :lg="3" :xl="4"> </el-col> | ||
| 16 | + </el-row> | ||
| 17 | + </div> | ||
| 18 | +</template> | ||
| 19 | + | ||
| 20 | +<script> | ||
| 21 | +import mixin from 'common/mixin'; | ||
| 22 | + | ||
| 23 | +export default { | ||
| 24 | + mixins: [mixin.init], | ||
| 25 | + data () { | ||
| 26 | + return { | ||
| 27 | + | ||
| 28 | + } | ||
| 29 | + }, | ||
| 30 | + mounted () { | ||
| 31 | + | ||
| 32 | + }, | ||
| 33 | + methods: { | ||
| 34 | + | ||
| 35 | + } | ||
| 36 | +} | ||
| 37 | +</script> | ||
| 38 | + | ||
| 39 | +<style lang="less" scoped> | ||
| 40 | +.hagerBox {} | ||
| 41 | +</style> |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2024-09-26 13:42:22 | 2 | * @Date: 2024-09-26 13:42:22 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-09-26 14:36:26 | 4 | + * @LastEditTime: 2024-09-26 15:43:37 |
| 5 | * @FilePath: /hager/src/components/common/hagerFooter.vue | 5 | * @FilePath: /hager/src/components/common/hagerFooter.vue |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | --> | 7 | --> |
| ... | @@ -9,23 +9,31 @@ | ... | @@ -9,23 +9,31 @@ |
| 9 | <div class="hager-footer"> | 9 | <div class="hager-footer"> |
| 10 | <el-row class="hidden-xs-only"> | 10 | <el-row class="hidden-xs-only"> |
| 11 | <el-col :sm="2" :md="2" :lg="3" :xl="4"> </el-col> | 11 | <el-col :sm="2" :md="2" :lg="3" :xl="4"> </el-col> |
| 12 | - <el-col :sm="14" :md="14" :lg="13" :xl="12"> | 12 | + <el-col :sm="20" :md="20" :lg="18" :xl="16"> |
| 13 | - <div style="display: flex; background-color: gray;"> | 13 | + <div style="display: flex; justify-content: space-between; color: #FFF;"> |
| 14 | - <div>图标</div> | 14 | + <div> |
| 15 | - <div>产品中心</div> | 15 | + <div>产品目录</div> |
| 16 | - <div>解决方案</div> | 16 | + <div>空气短路器</div> |
| 17 | - <div>新闻中心</div> | 17 | + <div>空气短路器</div> |
| 18 | - <div>招聘信息</div> | 18 | + <div>空气短路器</div> |
| 19 | - <div>关于海格</div> | 19 | + </div> |
| 20 | - <div>联系我们</div> | 20 | + <div> |
| 21 | - <div>首页</div> | 21 | + <div>解决方案</div> |
| 22 | - </div> | 22 | + <div>住宅解决方案</div> |
| 23 | - </el-col> | 23 | + <div>住宅解决方案</div> |
| 24 | - <el-col :sm="6" :md="6" :lg="5" :xl="4"> | 24 | + <div>住宅解决方案</div> |
| 25 | - <div style="display: flex; background-color: blue;"> | 25 | + </div> |
| 26 | - <div>搜索</div> | 26 | + <div> |
| 27 | - <div>地球仪</div> | 27 | + <div>企业</div> |
| 28 | - <div>用户</div> | 28 | + <div>海格全球</div> |
| 29 | + <div>海格全球</div> | ||
| 30 | + <div>海格全球</div> | ||
| 31 | + </div> | ||
| 32 | + <div> | ||
| 33 | + <div>海格电气在中国</div> | ||
| 34 | + <div>联系我们</div> | ||
| 35 | + <div>图标</div> | ||
| 36 | + </div> | ||
| 29 | </div> | 37 | </div> |
| 30 | </el-col> | 38 | </el-col> |
| 31 | <el-col :sm="2" :md="2" :lg="3" :xl="4"> </el-col> | 39 | <el-col :sm="2" :md="2" :lg="3" :xl="4"> </el-col> |
| ... | @@ -54,6 +62,6 @@ export default { | ... | @@ -54,6 +62,6 @@ export default { |
| 54 | 62 | ||
| 55 | <style lang="less" scoped> | 63 | <style lang="less" scoped> |
| 56 | .hager-footer { | 64 | .hager-footer { |
| 57 | - | 65 | + background-color: #414141; |
| 58 | } | 66 | } |
| 59 | </style> | 67 | </style> | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2024-09-26 13:42:11 | 2 | * @Date: 2024-09-26 13:42:11 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-09-26 14:34:49 | 4 | + * @LastEditTime: 2024-09-26 16:52:12 |
| 5 | * @FilePath: /hager/src/components/common/hagerHeader.vue | 5 | * @FilePath: /hager/src/components/common/hagerHeader.vue |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | --> | 7 | --> |
| ... | @@ -9,24 +9,42 @@ | ... | @@ -9,24 +9,42 @@ |
| 9 | <div class="hager-header"> | 9 | <div class="hager-header"> |
| 10 | <el-row class="hidden-xs-only"> | 10 | <el-row class="hidden-xs-only"> |
| 11 | <el-col :sm="2" :md="2" :lg="3" :xl="4"> </el-col> | 11 | <el-col :sm="2" :md="2" :lg="3" :xl="4"> </el-col> |
| 12 | - <el-col :sm="14" :md="14" :lg="13" :xl="12"> | 12 | + <el-col :sm="20" :md="20" :lg="18" :xl="16" style="position: relative;"> |
| 13 | - <div style="display: flex; background-color: gray;"> | 13 | + <el-row> |
| 14 | - <div>图标</div> | 14 | + <el-col :sm="16" :md="16" :lg="16" :xl="16"> |
| 15 | - <div>产品中心</div> | 15 | + <div style="display: flex; background-color: gray;"> |
| 16 | - <div>解决方案</div> | 16 | + <div>图标</div> |
| 17 | - <div>新闻中心</div> | 17 | + <div @mouseover="onMouseOver" @mouseleave="onMouseLeave">产品中心</div> |
| 18 | - <div>招聘信息</div> | 18 | + <div>解决方案</div> |
| 19 | - <div>关于海格</div> | 19 | + <div>新闻中心</div> |
| 20 | - <div>联系我们</div> | 20 | + <div>招聘信息</div> |
| 21 | - <div>首页</div> | 21 | + <div>关于海格</div> |
| 22 | - </div> | 22 | + <div>联系我们</div> |
| 23 | - </el-col> | 23 | + <div>首页</div> |
| 24 | - <el-col :sm="6" :md="6" :lg="5" :xl="4"> | 24 | + </div> |
| 25 | - <div style="display: flex; background-color: blue;"> | 25 | + </el-col> |
| 26 | - <div>搜索</div> | 26 | + <el-col :sm="8" :md="8" :lg="8" :xl="8"> |
| 27 | - <div>地球仪</div> | 27 | + <div style="display: flex; background-color: blue;"> |
| 28 | - <div>用户</div> | 28 | + <div>搜索</div> |
| 29 | - </div> | 29 | + <div>地球仪</div> |
| 30 | + <div>用户</div> | ||
| 31 | + </div> | ||
| 32 | + </el-col> | ||
| 33 | + </el-row> | ||
| 34 | + <el-collapse-transition> | ||
| 35 | + <div v-show="show" style="position: absolute; top: 2rem; left: 0; width: 100%; height: auto; background-color: #f1f1f1;"> | ||
| 36 | + <div> | ||
| 37 | + lorem ipsum dolor sit amet consectetur adipisicing elit. | ||
| 38 | + lorem ipsum dolor sit amet consectetur adipisicing elit. | ||
| 39 | + lorem ipsum dolor sit amet consectetur adipisicing elit. | ||
| 40 | + lorem ipsum dolor sit amet consectetur adipisicing elit. | ||
| 41 | + lorem ipsum dolor sit amet consectetur adipisicing elit. | ||
| 42 | + lorem ipsum dolor sit amet consectetur adipisicing elit. | ||
| 43 | + lorem ipsum dolor sit amet consectetur adipisicing elit. | ||
| 44 | + lorem ipsum dolor sit amet consectetur adipisicing elit. | ||
| 45 | + </div> | ||
| 46 | + </div> | ||
| 47 | + </el-collapse-transition> | ||
| 30 | </el-col> | 48 | </el-col> |
| 31 | <el-col :sm="2" :md="2" :lg="3" :xl="4"> </el-col> | 49 | <el-col :sm="2" :md="2" :lg="3" :xl="4"> </el-col> |
| 32 | </el-row> | 50 | </el-row> |
| ... | @@ -40,14 +58,21 @@ export default { | ... | @@ -40,14 +58,21 @@ export default { |
| 40 | mixins: [mixin.init], | 58 | mixins: [mixin.init], |
| 41 | data () { | 59 | data () { |
| 42 | return { | 60 | return { |
| 43 | - | 61 | + show: true, |
| 44 | } | 62 | } |
| 45 | }, | 63 | }, |
| 46 | mounted () { | 64 | mounted () { |
| 47 | 65 | ||
| 48 | }, | 66 | }, |
| 49 | methods: { | 67 | methods: { |
| 50 | - | 68 | + onMouseOver() { |
| 69 | + // 当鼠标悬停时 | ||
| 70 | + this.show = true; | ||
| 71 | + }, | ||
| 72 | + onMouseLeave() { | ||
| 73 | + // 当鼠标离开时 | ||
| 74 | + this.show = false; | ||
| 75 | + } | ||
| 51 | } | 76 | } |
| 52 | } | 77 | } |
| 53 | </script> | 78 | </script> |
| ... | @@ -58,5 +83,6 @@ export default { | ... | @@ -58,5 +83,6 @@ export default { |
| 58 | top: 0; | 83 | top: 0; |
| 59 | left: 0; | 84 | left: 0; |
| 60 | right: 0; | 85 | right: 0; |
| 86 | + z-index: 9; | ||
| 61 | } | 87 | } |
| 62 | </style> | 88 | </style> | ... | ... |
| 1 | /* | 1 | /* |
| 2 | * @Date: 2024-08-26 10:12:56 | 2 | * @Date: 2024-08-26 10:12:56 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-09-26 15:24:16 | 4 | + * @LastEditTime: 2024-09-26 16:31:40 |
| 5 | * @FilePath: /hager/src/main.js | 5 | * @FilePath: /hager/src/main.js |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | */ | 7 | */ |
| ... | @@ -15,10 +15,13 @@ import router from './router' | ... | @@ -15,10 +15,13 @@ import router from './router' |
| 15 | import 'element-ui/lib/theme-chalk/display.css'; // 基于断点的隐藏类,用于在某些条件下隐藏元素 | 15 | import 'element-ui/lib/theme-chalk/display.css'; // 基于断点的隐藏类,用于在某些条件下隐藏元素 |
| 16 | // import '@/styles/element-ui/element-variables.scss' // 自定义主题, 不需要展示屏蔽 | 16 | // import '@/styles/element-ui/element-variables.scss' // 自定义主题, 不需要展示屏蔽 |
| 17 | // import { Button, Row, Col, } from 'element-ui'; | 17 | // import { Button, Row, Col, } from 'element-ui'; |
| 18 | +// collapse 展开折叠 | ||
| 19 | +import CollapseTransition from 'element-ui/lib/transitions/collapse-transition'; | ||
| 18 | 20 | ||
| 19 | Vue.use(VueRouter); | 21 | Vue.use(VueRouter); |
| 20 | // Vue.use(ElementUI); | 22 | // Vue.use(ElementUI); |
| 21 | // Vue.use(Button).use(Row).use(Col) | 23 | // Vue.use(Button).use(Row).use(Col) |
| 24 | +Vue.component(CollapseTransition.name, CollapseTransition) | ||
| 22 | 25 | ||
| 23 | new Vue({ | 26 | new Vue({ |
| 24 | router, | 27 | router, | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2024-08-27 10:06:30 | 2 | * @Date: 2024-08-27 10:06:30 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-09-26 14:42:54 | 4 | + * @LastEditTime: 2024-09-26 17:18:46 |
| 5 | * @FilePath: /hager/src/views/index.vue | 5 | * @FilePath: /hager/src/views/index.vue |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | --> | 7 | --> |
| 8 | <template> | 8 | <template> |
| 9 | <div> | 9 | <div> |
| 10 | - <div v-for="(item, index) in 100" :key="index"> | 10 | + <hager-box style="background-color: #fff;"> |
| 11 | - <div style="height: 5rem;">{{ index + 1 }}</div> | 11 | + <div v-for="(item, index) in 10" :key="index"> |
| 12 | - </div> | 12 | + <div style="height: 5rem;">{{ index + 1 }}</div> |
| 13 | + </div> | ||
| 14 | + </hager-box> | ||
| 15 | + <hager-box style="background-color: #f1f1f1;"> | ||
| 16 | + <div v-for="(item, index) in 10" :key="index"> | ||
| 17 | + <div style="height: 5rem;">{{ index + 1 }}</div> | ||
| 18 | + </div> | ||
| 19 | + </hager-box> | ||
| 13 | </div> | 20 | </div> |
| 14 | </template> | 21 | </template> |
| 15 | 22 | ||
| 16 | <script> | 23 | <script> |
| 17 | -import mixin from '@/common/mixin' | 24 | +import mixin from '@/common/mixin'; |
| 25 | +import hagerBox from '@/components/common/hagerBox'; | ||
| 18 | 26 | ||
| 19 | export default { | 27 | export default { |
| 20 | mixins: [mixin.init], | 28 | mixins: [mixin.init], |
| 21 | - components: {}, | 29 | + components: { hagerBox }, |
| 22 | data () { | 30 | data () { |
| 23 | return { | 31 | return { |
| 24 | } | 32 | } | ... | ... |
-
Please register or login to post a comment