index-swipe.vue 998 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <template>
  2. <view class="swipe">
  3. <swiper class="swipe" :indicator-dots="pictures.length > 1" :autoplay="pictures.length > 1" :circular="pictures.length > 1">
  4. <swiper-item v-for="(item, index) in pictures" :key="index">
  5. <app-form-id>
  6. <image :lazy-load="true" :src="item.pic_url" class="image" @click="route_jump(item)"></image>
  7. </app-form-id>
  8. </swiper-item>
  9. </swiper>
  10. </view>
  11. </template>
  12. <script>
  13. export default {
  14. name: 'index-swipe',
  15. props: {
  16. pictures: {
  17. type: Array,
  18. default() {
  19. return [];
  20. }
  21. }
  22. },
  23. methods: {
  24. route_jump(data) {
  25. this.$jump({
  26. url: data.page_url,
  27. open_type: data.open_type,
  28. })
  29. }
  30. }
  31. }
  32. </script>
  33. <style scoped lang="scss">
  34. .swipe {
  35. width: #{750rpx};
  36. height: #{280rpx};
  37. .image {
  38. width: #{750rpx};
  39. height: #{280rpx};
  40. }
  41. }
  42. </style>