Showing
1 changed file
with
11 additions
and
3 deletions
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2024-10-18 13:45:53 | 2 | * @Date: 2024-10-18 13:45:53 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-11-07 14:58:09 | 4 | + * @LastEditTime: 2024-11-08 15:07:40 |
| 5 | * @FilePath: /hager/src/views/recruit.vue | 5 | * @FilePath: /hager/src/views/recruit.vue |
| 6 | * @Description: 招聘信息 | 6 | * @Description: 招聘信息 |
| 7 | --> | 7 | --> |
| ... | @@ -297,7 +297,11 @@ export default { | ... | @@ -297,7 +297,11 @@ export default { |
| 297 | this.designSlidesPerView = swiper.slidesPerView | 297 | this.designSlidesPerView = swiper.slidesPerView |
| 298 | }); | 298 | }); |
| 299 | // 高度监听 | 299 | // 高度监听 |
| 300 | - this.recruit_box_height = $('.job-img-wrapper').outerWidth() * 0.1 + 'px'; | 300 | + if (!this.is_xs) { |
| 301 | + this.recruit_box_height = $('.job-img-wrapper').outerWidth() * 0.1 + 'px'; | ||
| 302 | + } else { | ||
| 303 | + this.recruit_box_height = $('.job-img-wrapper').outerWidth() * 0.15 + 'px'; | ||
| 304 | + } | ||
| 301 | // 动态计算图片高度 | 305 | // 动态计算图片高度 |
| 302 | let img_box_width = $('.img-box').outerWidth(); | 306 | let img_box_width = $('.img-box').outerWidth(); |
| 303 | $('.img-box').css('height', img_box_width * 0.56 + 'px'); | 307 | $('.img-box').css('height', img_box_width * 0.56 + 'px'); |
| ... | @@ -311,7 +315,11 @@ export default { | ... | @@ -311,7 +315,11 @@ export default { |
| 311 | methods: { | 315 | methods: { |
| 312 | handleHeightResize () { | 316 | handleHeightResize () { |
| 313 | // 高度监听 | 317 | // 高度监听 |
| 314 | - this.recruit_box_height = $('.job-img-wrapper').outerWidth() * 0.1 + 'px'; | 318 | + if (!this.is_xs) { |
| 319 | + this.recruit_box_height = $('.job-img-wrapper').outerWidth() * 0.1 + 'px'; | ||
| 320 | + } else { | ||
| 321 | + this.recruit_box_height = $('.job-img-wrapper').outerWidth() * 0.15 + 'px'; | ||
| 322 | + } | ||
| 315 | // 动态计算图片高度 | 323 | // 动态计算图片高度 |
| 316 | let img_box_width = $('.img-box').outerWidth(); | 324 | let img_box_width = $('.img-box').outerWidth(); |
| 317 | $('.img-box').css('height', img_box_width * 0.56 + 'px') | 325 | $('.img-box').css('height', img_box_width * 0.56 + 'px') | ... | ... |
-
Please register or login to post a comment