hookehuyr

✨ feat: 基本自适应布局结构

<!--
* @Date: 2024-09-26 13:36:06
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-09-26 13:40:04
* @FilePath: /hager/index.html
* @Description: 文件描述
-->
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + Vue</title>
<title>海格电器</title>
</head>
<body>
<div id="app"></div>
......
<!--
* @Date: 2024-09-26 13:36:06
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-09-26 14:33:29
* @FilePath: /hager/src/App.vue
* @Description: 文件描述
-->
<template>
<div>
<router-view></router-view>
<div class="">
<hager-header></hager-header>
<el-row>
<el-col :sm="2" :md="2" :lg="3" :xl="4">&nbsp;</el-col>
<el-col :sm="20" :md="20" :lg="18" :xl="16">
<router-view style="padding-top: 3rem;"></router-view>
</el-col>
<el-col :sm="2" :md="2" :lg="3" :xl="4">&nbsp;</el-col>
</el-row>
<hager-footer></hager-footer>
</div>
</template>
<script setup>
<script>
import hagerHeader from '@/components/common/hagerHeader.vue';
import hagerFooter from '@/components/common/hagerFooter.vue';
export default {
components: { hagerHeader, hagerFooter },
data () {
return {
}
},
mounted () {
},
methods: {
}
}
</script>
<style lang="less" scoped>
<style lang="less">
* {
outline: none;
}
html,
body {
font-size: 16px;
width: 100%;
height: 100%;
margin: 0;
padding: 0;
p {
margin: 0;
padding: 0;
}
}
.global-center {
position: relative;
top: 50%;
transform: translateY(-50%);
}
</style>
......
/*
* @Date: 2022-07-26 09:49:54
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-08-19 17:11:29
* @FilePath: /web/src/common/mixin.js
* @Description: 文件描述
*/
export default {
// 初始化设置
init: {
mounted () {
document.title = this.$route.meta.title;
},
methods: {
},
},
};
<!--
* @Date: 2024-09-26 13:42:22
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-09-26 14:36:26
* @FilePath: /hager/src/components/common/hagerFooter.vue
* @Description: 文件描述
-->
<template>
<div class="hager-footer">
<el-row class="hidden-xs-only">
<el-col :sm="2" :md="2" :lg="3" :xl="4">&nbsp;</el-col>
<el-col :sm="14" :md="14" :lg="13" :xl="12">
<div style="display: flex; background-color: gray;">
<div>图标</div>
<div>产品中心</div>
<div>解决方案</div>
<div>新闻中心</div>
<div>招聘信息</div>
<div>关于海格</div>
<div>联系我们</div>
<div>首页</div>
</div>
</el-col>
<el-col :sm="6" :md="6" :lg="5" :xl="4">
<div style="display: flex; background-color: blue;">
<div>搜索</div>
<div>地球仪</div>
<div>用户</div>
</div>
</el-col>
<el-col :sm="2" :md="2" :lg="3" :xl="4">&nbsp;</el-col>
</el-row>
</div>
</template>
<script>
import mixin from 'common/mixin';
export default {
mixins: [mixin.init],
data () {
return {
}
},
mounted () {
},
methods: {
}
}
</script>
<style lang="less" scoped>
.hager-footer {
}
</style>
<!--
* @Date: 2024-09-26 13:42:11
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-09-26 14:34:49
* @FilePath: /hager/src/components/common/hagerHeader.vue
* @Description: 文件描述
-->
<template>
<div class="hager-header">
<el-row class="hidden-xs-only">
<el-col :sm="2" :md="2" :lg="3" :xl="4">&nbsp;</el-col>
<el-col :sm="14" :md="14" :lg="13" :xl="12">
<div style="display: flex; background-color: gray;">
<div>图标</div>
<div>产品中心</div>
<div>解决方案</div>
<div>新闻中心</div>
<div>招聘信息</div>
<div>关于海格</div>
<div>联系我们</div>
<div>首页</div>
</div>
</el-col>
<el-col :sm="6" :md="6" :lg="5" :xl="4">
<div style="display: flex; background-color: blue;">
<div>搜索</div>
<div>地球仪</div>
<div>用户</div>
</div>
</el-col>
<el-col :sm="2" :md="2" :lg="3" :xl="4">&nbsp;</el-col>
</el-row>
</div>
</template>
<script>
import mixin from 'common/mixin';
export default {
mixins: [mixin.init],
data () {
return {
}
},
mounted () {
},
methods: {
}
}
</script>
<style lang="less" scoped>
.hager-header {
position: fixed;
top: 0;
left: 0;
right: 0;
}
</style>
/*
* @Date: 2024-08-26 10:42:15
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-08-26 10:53:44
* @FilePath: /vite-project/src/route.js
* @LastEditTime: 2024-09-26 14:44:17
* @FilePath: /hager/src/route.js
* @Description: 文件描述
*/
export default [{
......@@ -10,6 +10,7 @@ export default [{
name: '首页',
component: () => import('@/views/index'),
meta: {
title: '海格电器'
},
children: []
}]
......
<!--
* @Date: 2024-08-27 10:06:30
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-09-26 13:37:46
* @LastEditTime: 2024-09-26 14:42:54
* @FilePath: /hager/src/views/index.vue
* @Description: 文件描述
-->
<template>
<div></div>
<div>
<div v-for="(item, index) in 100" :key="index">
<div style="height: 5rem;">{{ index + 1 }}</div>
</div>
</div>
</template>
<script>
import mixin from '@/common/mixin'
export default {
mixins: [mixin.init],
components: {},
data () {
return {
}
},
async mounted () {
},
methods: {
......