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-10-21 16:41:32 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
2aa9e390063c23bcdcca4bdeafef0edbfd79e3fa
2aa9e390
1 parent
4fa99b93
fix 监听屏幕宽度逻辑优化,头部登录状态显示优化
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
src/common/mixin.js
src/components/common/hagerHeader.vue
src/common/mixin.js
View file @
2aa9e39
/*
* @Date: 2022-07-26 09:49:54
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-10-
16 10:55:5
5
* @LastEditTime: 2024-10-
21 16:35:2
5
* @FilePath: /hager/src/common/mixin.js
* @Description: 文件描述
*/
...
...
@@ -25,7 +25,7 @@ export default {
data
()
{
return
{
top_img_height
:
'38rem'
,
screenWidth
:
$
(
'.hagerBox'
).
width
(),
// 初始化屏幕宽度, xs <768px
screenWidth
:
$
(
window
).
width
(),
// 初始化屏幕宽度, xs <768px
};
},
computed
:
{
...
...
@@ -35,7 +35,7 @@ export default {
},
methods
:
{
handleResize
()
{
this
.
screenWidth
=
$
(
'.hagerBox'
).
width
();
// 更新屏幕宽度
this
.
screenWidth
=
$
(
window
).
width
();
// 更新屏幕宽度
if
(
this
.
screenWidth
<
768
)
{
this
.
top_img_height
=
'30vh'
;
}
else
{
...
...
src/components/common/hagerHeader.vue
View file @
2aa9e39
<!--
* @Date: 2024-09-26 13:42:11
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-10-21 1
3:42:16
* @LastEditTime: 2024-10-21 1
6:39:49
* @FilePath: /hager/src/components/common/hagerHeader.vue
* @Description: 文件描述
-->
...
...
@@ -36,7 +36,8 @@
</div>
<div @click="goToLogin" class="tooltip">
<el-tooltip class="item" effect="dark" content="用户登录" placement="bottom">
<el-image style="width: 1rem; height: 1rem" src="https://cdn.ipadbiz.cn/hager/icon/%E7%99%BB%E9%99%86@2x.png" fit="fit"></el-image>
<el-image v-if="!is_login" style="width: 1rem; height: 1rem" src="https://cdn.ipadbiz.cn/hager/icon/%E7%99%BB%E9%99%86@2x.png" fit="fit"></el-image>
<el-image v-else style="width: 1rem; height: 1rem" src="https://cdn.ipadbiz.cn/hager/icon/%E5%B7%B2%E7%99%BB%E5%BD%95@2x.png" fit="fit"></el-image>
<!-- <i class=el-icon-user style="font-size: 1.25rem;"></i> -->
</el-tooltip>
</div>
...
...
@@ -111,7 +112,8 @@
</div>
<div>
<el-image @click="goToWeb" style="width: 1rem; height: 1rem" src="https://cdn.ipadbiz.cn/hager/icon/%E8%AF%AD%E8%A8%80@2x.png" fit="fit"></el-image>
<el-image @click="goToLogin" style="width: 1rem; height: 1rem" src="https://cdn.ipadbiz.cn/hager/icon/%E7%99%BB%E9%99%86@2x.png" fit="fit"></el-image>
<el-image v-if="!is_login" @click="goToLogin" style="width: 1rem; height: 1rem" src="https://cdn.ipadbiz.cn/hager/icon/%E7%99%BB%E9%99%86@2x.png" fit="fit"></el-image>
<el-image v-else @click="goToLogin" style="width: 1rem; height: 1rem" src="https://cdn.ipadbiz.cn/hager/icon/%E5%B7%B2%E7%99%BB%E5%BD%95@2x.png" fit="fit"></el-image>
</div>
</div>
<div style="display: flex; align-items: center; border-radius: 1rem; border: 1px solid #f5f5f5; background-color: #e3f1f7; padding: 0.5rem 1rem; margin-top: 1rem;">
...
...
@@ -139,7 +141,6 @@ export default {
data () {
return {
show: false,
test1: true,
product_menu: [{
name: '配电产品',
icon: 'https://cdn.ipadbiz.cn/hager/icon/%E9%85%8D%E7%94%B5%E4%BA%A7%E5%93%81@2x.png',
...
...
@@ -292,6 +293,7 @@ export default {
margin_top: 0,
// choose_country: false, // 主动选择了国家地区
keyword: '',
is_login: true,
}
},
watch: {
...
...
Please
register
or
login
to post a comment