PublishApply.vue 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <template>
  2. <div class="publish-apply">
  3. <div v-swiper:mySwiper="swiperOption" class="swiper-container">
  4. <div class="swiper-wrapper">
  5. <div class="swiper-slide" v-for="banner in banners">
  6. <a>
  7. <img :src="banner.pictureLink"/>
  8. </a>
  9. </div>
  10. <div v-if="banners.length === 0" class="swiper-button-prev"><i class="iconfont icon-swiper-left"></i></div>
  11. <div v-if="banners.length === 0"class="swiper-button-next"><i class="iconfont icon-swiper-right"></i></div>
  12. </div>
  13. <div v-if="banners.length === 0" class="swiper-pagination swiper-pagination-bullets"></div>
  14. </div>
  15. </div>
  16. </template>
  17. <script>
  18. export default {
  19. data () {
  20. return {
  21. swiperOption: {
  22. autoplay: 6000,
  23. pagination: '.swiper-pagination',
  24. paginationClickable: true,
  25. mousewheelControl: false,
  26. effect: 'fade',
  27. lazyLoading: true,
  28. loop: true,
  29. prevButton: '.swiper-button-prev',
  30. nextButton: '.swiper-button-next'
  31. }
  32. }
  33. },
  34. computed: {
  35. banners () {
  36. return this.$store.state.applyPurchase.purchaseBannerList.bannerList.data.data || []
  37. }
  38. }
  39. }
  40. </script>
  41. <style lang="scss">
  42. .publish-apply {
  43. border-radius: 5px;
  44. height: 400px;
  45. margin-bottom: 20px;
  46. .swiper-container {
  47. z-index: 2;
  48. width: 955px;
  49. height: 400px;
  50. .swiper-wrapper {
  51. width: 955px;
  52. height: 400px;
  53. margin: 0 auto;
  54. .swiper-slide {
  55. height: 400px;
  56. margin: 0 auto;
  57. display: flex;
  58. img {
  59. width: 955px;
  60. height: 400px;
  61. border-radius: 5px;
  62. }
  63. }
  64. .swiper-button-prev i, .swiper-button-next i {
  65. font-size: 26px;
  66. }
  67. }
  68. .swiper-pagination-bullets {
  69. .swiper-pagination-bullet {
  70. width: 10px!important;
  71. height: 10px!important;
  72. }
  73. }
  74. }
  75. }
  76. </style>