Showing
1 changed file
with
2 additions
and
5 deletions
| 1 | /* | 1 | /* |
| 2 | * @Date: 2022-07-26 09:49:54 | 2 | * @Date: 2022-07-26 09:49:54 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-10-24 11:02:47 | 4 | + * @LastEditTime: 2024-10-25 18:28:35 |
| 5 | * @FilePath: /hager/src/common/mixin.js | 5 | * @FilePath: /hager/src/common/mixin.js |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | */ | 7 | */ |
| ... | @@ -17,8 +17,6 @@ export default { | ... | @@ -17,8 +17,6 @@ export default { |
| 17 | this.handleResize(); | 17 | this.handleResize(); |
| 18 | // 监听窗口的 resize 事件 | 18 | // 监听窗口的 resize 事件 |
| 19 | window.addEventListener('resize', this.handleResize); | 19 | window.addEventListener('resize', this.handleResize); |
| 20 | - // 高度监听 | ||
| 21 | - this.top_img_height = $(window).width()*0.38 + 'px'; | ||
| 22 | }, | 20 | }, |
| 23 | beforeDestroy() { | 21 | beforeDestroy() { |
| 24 | // 在组件销毁前移除监听器,防止内存泄漏 | 22 | // 在组件销毁前移除监听器,防止内存泄漏 |
| ... | @@ -41,9 +39,8 @@ export default { | ... | @@ -41,9 +39,8 @@ export default { |
| 41 | if (this.screenWidth < 768) { | 39 | if (this.screenWidth < 768) { |
| 42 | this.top_img_height = '20vh'; | 40 | this.top_img_height = '20vh'; |
| 43 | } else { | 41 | } else { |
| 44 | - this.top_img_height = '38rem'; | 42 | + this.top_img_height = $(window).width()*0.35 + 'px'; |
| 45 | } | 43 | } |
| 46 | - this.top_img_height = $(window).width()*0.38 + 'px'; | ||
| 47 | }, | 44 | }, |
| 48 | }, | 45 | }, |
| 49 | directives: { | 46 | directives: { | ... | ... |
-
Please register or login to post a comment