Brands.vue 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <template>
  2. <div class="brand-one">
  3. <div class="container">
  4. <div class="brand-one__carousel owl-carousel owl-theme">
  5. <div class="item" v-for="(item,index) in 18" :key="index">
  6. <img :src="`/assets/images/resources/合作商户${index+1}.png`" alt="">
  7. </div><!-- /.item -->
  8. </div><!-- /.brand-one__carousel owl-carousel owl-theme -->
  9. </div><!-- /.container -->
  10. </div>
  11. </template>
  12. <script>
  13. export default {
  14. name: "Brands",
  15. mounted() {
  16. if ($('.brand-one__carousel').length) {
  17. $('.brand-one__carousel').owlCarousel({
  18. loop: true,
  19. margin: 115,
  20. nav: false,
  21. dots: false,
  22. autoWidth: false,
  23. autoplay: true,
  24. smartSpeed: 700,
  25. autoplayTimeout: 5000,
  26. autoplayHoverPause: true,
  27. responsive: {
  28. 0: {
  29. items: 2,
  30. margin: 30
  31. },
  32. 480: {
  33. items: 3,
  34. margin: 30
  35. },
  36. 600: {
  37. items: 3,
  38. margin: 30
  39. },
  40. 991: {
  41. items: 5,
  42. margin: 30
  43. },
  44. 1000: {
  45. items: 5
  46. },
  47. 1200: {
  48. items: 5
  49. }
  50. }
  51. });
  52. }
  53. }
  54. }
  55. </script>
  56. <style scoped>
  57. </style>