

231116김하영 스와이퍼
@e7d0a4c8beccb2439519a1c3a7e1ae2530a4927e
--- client/views/pages/user/main/Main.vue
+++ client/views/pages/user/main/Main.vue
... | ... | @@ -10,10 +10,11 @@ |
10 | 10 |
<!-- 공지사항 배너 --> |
11 | 11 |
<div class="main-notice"> |
12 | 12 |
<h2> <i class="fa-solid fa-volume-high" style="color: #ffffff;"></i>공지사항</h2> |
13 |
- <swiper :direction="'vertical'" :loop="true" :spaceBetween="8" :slidesPerView="1" |
|
14 |
- :centeredSlides="false" :navigation="false" :modules="modules" |
|
15 |
- class="mySwiper swiper-notice" :autoplay="{ |
|
16 |
- delay: 2500, |
|
13 |
+ <swiper :direction="'vertical'" :pagination="{ |
|
14 |
+ clickable: true, |
|
15 |
+ }" :loop="true" :spaceBetween="8" :slidesPerView="1" :centeredSlides="false" |
|
16 |
+ :navigation="false" :modules="modules" class="mySwiper swiper-notice" :autoplay="{ |
|
17 |
+ delay: 1000, |
|
17 | 18 |
disableOnInteraction: false, |
18 | 19 |
}"> |
19 | 20 |
|
... | ... | @@ -363,9 +364,19 @@ |
363 | 364 |
}, |
364 | 365 |
noticeList: [], |
365 | 366 |
noticeListForBanner: [], |
367 |
+ swiper: null, |
|
366 | 368 |
} |
367 | 369 |
}, |
368 | 370 |
methods: { |
371 |
+ initSwiper() { |
|
372 |
+ this.swiper = new Swiper(this.$refs.swiperContainer, { |
|
373 |
+ // Swiper 옵션 설정 |
|
374 |
+ pagination: { |
|
375 |
+ el: '.swiper-pagination', |
|
376 |
+ }, |
|
377 |
+ }); |
|
378 |
+ console.log("2:::::::"); |
|
379 |
+ }, |
|
369 | 380 |
showAlert: function () { |
370 | 381 |
alert('페이지 준비중입니다.'); |
371 | 382 |
}, |
... | ... | @@ -431,6 +442,7 @@ |
431 | 442 |
}, |
432 | 443 |
}).then(function (response) { |
433 | 444 |
vm.noticeListForBanner = response.data; |
445 |
+ console.log("1:::::::"); |
|
434 | 446 |
|
435 | 447 |
}).catch(function (error) { |
436 | 448 |
alert('배너 공지사항 목록 조회 오류, 관리자에게 문의하세요.'); |
... | ... | @@ -482,6 +494,7 @@ |
482 | 494 |
this.postSelectList(); |
483 | 495 |
this.noticeListForMain(); |
484 | 496 |
this.noticeBannerListForMain(); |
497 |
+ this.initSwiper(); |
|
485 | 498 |
|
486 | 499 |
} |
487 | 500 |
} |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?