1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <template>
- <view>
- <view>
- <view class="home-main">
- <view class="custom-swiper">
- <up-swiper :list="list3" indicator indicatorMode="line" circular :height="'697rpx'" :indicatorStyle="{ bottom: '60px' }"></up-swiper>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script setup>
- import { ref, watch } from 'vue';
- import { onShow } from "@dcloudio/uni-app";
- // 接收volunteerPicture属性
- const props = defineProps({
- volunteerPicture: {
- type: String,
- default: ''
- }
- });
- const list3 = ref([]);//轮播图数据
- // 监听volunteerPicture变化并更新轮播图数据
- watch(() => props.volunteerPicture, (newVal) => {
- if (newVal) {
- list3.value = newVal.split(',');
- } else {
- list3.value = [];
- }
- }, { immediate: true });
- </script>
- <style scoped lang="scss">
- .custom-swiper {
- width: 750rpx;
- height: 697rpx;
- }
- </style>
|