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-26 14:30:20 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4f23cff93fe051f9b3d5ba7c36a922f0803d04e6
4f23cff9
1 parent
0ec5b825
fix 通用顶部图片高度修改
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
src/common/mixin.js
src/common/mixin.js
View file @
4f23cff
/*
* @Date: 2022-07-26 09:49:54
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-10-2
4 11:02:47
* @LastEditTime: 2024-10-2
5 18:28:35
* @FilePath: /hager/src/common/mixin.js
* @Description: 文件描述
*/
...
...
@@ -17,8 +17,6 @@ export default {
this
.
handleResize
();
// 监听窗口的 resize 事件
window
.
addEventListener
(
'resize'
,
this
.
handleResize
);
// 高度监听
this
.
top_img_height
=
$
(
window
).
width
()
*
0.38
+
'px'
;
},
beforeDestroy
()
{
// 在组件销毁前移除监听器,防止内存泄漏
...
...
@@ -41,9 +39,8 @@ export default {
if
(
this
.
screenWidth
<
768
)
{
this
.
top_img_height
=
'20vh'
;
}
else
{
this
.
top_img_height
=
'38rem
'
;
this
.
top_img_height
=
$
(
window
).
width
()
*
0.35
+
'px
'
;
}
this
.
top_img_height
=
$
(
window
).
width
()
*
0.38
+
'px'
;
},
},
directives
:
{
...
...
Please
register
or
login
to post a comment