Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
hager
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2024-11-11 11:31:07 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d141eb1d80eb0b2b822c6ea8d9860ecddcf5cb5a
d141eb1d
1 parent
b07867d8
✨ feat: 点击logo跳转首页
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
src/components/common/hagerHeader.vue
src/components/common/hagerHeader.vue
View file @
d141eb1
<!--
* @Date: 2024-09-26 13:42:11
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-11-
07 18:09:1
1
* @LastEditTime: 2024-11-
11 11:30:3
1
* @FilePath: /hager/src/components/common/hagerHeader.vue
* @Description: 文件描述
-->
...
...
@@ -12,7 +12,7 @@
<el-col :sm="22" :md="22" :lg="18" :xl="16" style="position: relative;height: 5rem;">
<el-row>
<el-col :sm="6" :md="6" :lg="6" :xl="6">
<div class="nav-logo">
<div
@click="goToHome"
class="nav-logo">
<el-image style="width: 8rem; height: 2.5rem" src="https://cdn.ipadbiz.cn/hager/icon/logo@2x.png" fit="fit"></el-image>
</div>
</el-col>
...
...
@@ -111,7 +111,7 @@
<el-image v-if="!show_menu" style="width: auto; height: 0.65rem" src="https://cdn.ipadbiz.cn/hager/icon/%E8%8F%9C%E5%8D%95@2x.png" fit="fit"></el-image>
<i v-else class="el-icon-close" style="font-size: 1.15rem;"></i>
</div>
<div style="display: flex; align-items: center;">
<div
@click="goToHome"
style="display: flex; align-items: center;">
<img style="width: 5.3rem; height: 1.7rem" src="https://cdn.ipadbiz.cn/hager/icon/logo@2x.png">
</div>
<div>
...
...
@@ -240,6 +240,14 @@ export default {
window.removeEventListener('resize', this.handleHeightResize);
},
methods: {
goToHome () { // 跳转到首页
this.$router.push({
path: '/',
query: {
timestamp: Date.now()
}
});
},
handleHeightResize () {
// 高度监听
this.$nextTick(() => {
...
...
@@ -545,6 +553,9 @@ export default {
display: flex;
height: 5rem;
align-items: center;
&:hover {
cursor: pointer;
}
}
.nav-wrapper {
display: flex;
...
...
Please
register
or
login
to post a comment