index.vue 732 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <template>
  2. <view>
  3. <u-swiper :height="390" :list="list" @change="change"></u-swiper>
  4. </view>
  5. </template>
  6. <script>
  7. export default {
  8. data() {
  9. return {
  10. list: [
  11. {
  12. image: require('@/static/images/diboot/diboot-lowcode.jpeg'),
  13. },
  14. {
  15. image: require('@/static/images/diboot/diboot-workflow2.png'),
  16. },
  17. {
  18. image: require('@/static/images/diboot/diboot-cloud.jpeg'),
  19. },
  20. {
  21. image: require('@/static/images/diboot/diboot-workflow.png'),
  22. }
  23. ],
  24. }
  25. },
  26. mounted() {
  27. this.$emit('setSwiperBgColor',this.list[0]['bgColor'])
  28. },
  29. methods: {
  30. change(index) {
  31. this.$emit('setSwiperBgColor',this.list[index]['bgColor'])
  32. }
  33. }
  34. }
  35. </script>
  36. <style>
  37. </style>