detiles.vue 891 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <template>
  2. <view>
  3. <view>
  4. <view class="home-main">
  5. <view class="custom-swiper">
  6. <up-swiper :list="list3" indicator indicatorMode="line" circular :height="'697rpx'" :indicatorStyle="{ bottom: '60px' }"></up-swiper>
  7. </view>
  8. </view>
  9. </view>
  10. </view>
  11. </template>
  12. <script setup>
  13. import { ref, watch } from 'vue';
  14. import { onShow } from "@dcloudio/uni-app";
  15. // 接收volunteerPicture属性
  16. const props = defineProps({
  17. volunteerPicture: {
  18. type: String,
  19. default: ''
  20. }
  21. });
  22. const list3 = ref([]);//轮播图数据
  23. // 监听volunteerPicture变化并更新轮播图数据
  24. watch(() => props.volunteerPicture, (newVal) => {
  25. if (newVal) {
  26. list3.value = newVal.split(',');
  27. } else {
  28. list3.value = [];
  29. }
  30. }, { immediate: true });
  31. </script>
  32. <style scoped lang="scss">
  33. .custom-swiper {
  34. width: 750rpx;
  35. height: 697rpx;
  36. }
  37. </style>