| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- <template>
- <div class="carousel">
- <div class="container">
- <p>已入驻商家,您也来加入吧!</p>
- <div v-swiper:mySwiper="swiperOption">
- <div class="swiper-wrapper">
- <div class="swiper-slide" v-for="banner in banners">
- <a href="#">
- <img :src="banner">
- </a>
- </div>
- </div>
- <div class="swiper-pagination swiper-pagination-bullets"></div>
- </div>
- </div>
- </div>
- </template>
- <script>
- export default {
- name: 'carousel',
- data () {
- return {
- banners: [
- '../img/ktv.jpg',
- '../img/ktv.jpg',
- '../img/ktv.jpg',
- '../img/ktv.jpg',
- '../img/ktv.jpg',
- '../img/ktv.jpg',
- '../img/ktv.jpg',
- '../img/ktv.jpg',
- '../img/ktv.jpg',
- '../img/ktv.jpg',
- '../img/ktv.jpg'
- ],
- swiperOption: {
- autoplay: {
- delay: 2000,
- disableOnInteraction: false
- },
- loop: true,
- lazyLoading: true,
- centeredSlides: true,
- mousewheel: true,
- slidesPerView: 5,
- pagination: {
- // el: '.swiper-pagination',
- // dynamicBullets: true,
- // clickable: true
- }
- }
- }
- },
- mounted () {
- }
- }
- </script>
- <style scoped type="text/scss" lang="scss">
- .carousel{
- background: #fae7ee;
- height:236px;
- padding-top:35px;
- .container{
- text-align: center;
- p{
- font-size: 24px;
- margin-bottom:40px;
- }
- img{
- width:100px;
- height:100px;
- border-radius:50%;
- }
- }
- }
- </style>
|