<swiper :current="swiperIndex" circular :style="`height:100vh;background:#F5F5F5;` "
@change="handleChangeSwiperFn">
<swiper-item>
<view id="index0">
<scroll-view scroll-y="true" class="scroll-Y" :style="`height:calc(100vh - 0px);`">
<paipan :iconList="iconList" ref="paipans0" :ontTypeId="ontTypeId"></paipan>
</scroll-view>
</view>
</swiper-item>
<swiper-item>
<view id="index1">
<scroll-view scroll-y="true" class="scroll-Y" :style="`height:100vh;`">
<paipan :iconList="iconList" ref="paipans1" :ontTypeId="twoTypeId2"></paipan>
</scroll-view>
</view>
</swiper-item>
<swiper-item>
<view id="index2"> <scroll-view scroll-y="true" class="scroll-Y" :style="`height:100vh;`">
<paipan :iconList="iconList" ref="paipans2" :ontTypeId="ThreeTypeId3"></paipan>
</scroll-view>
</view>
</swiper-item>
<swiper-item>
<view id="index3"> <scroll-view scroll-y="true" class="scroll-Y" :style="`height:100vh;`">
<paipan :iconList="iconList" ref="paipans3" :ontTypeId="FourTypeId4"></paipan>
</scroll-view>
</view>
</swiper-item>
</swiper>
paipan 里
<template>
<view>
<shop1 v-if="ontTypeId==1"></shop1>
<shop2 v-if="ontTypeId==2"></shop2>
<shop3 v-if="ontTypeId==4"></shop3>
<shop4 v-if="ontTypeId==7"></shop4>
<shop5 v-if="ontTypeId==3"></shop5>
<shop6 v-if="ontTypeId==5"></shop6>
</view>
</template>
<script setup>
import {
onMounted,
ref,
watch,
defineProps
} from 'vue'
import shop1 from '/pages/index/shop1'
import shop2 from '/pages/index/shop2'
import shop3 from '/pages/index/shop3'
import shop4 from '/pages/index/shop4'
import shop5 from '/pages/index/shop5'
import shop6 from '/pages/index/shop6'
// 定义接收父组件传递过来的 props
const props = defineProps({
ontTypeId: Number, // 父组件传递的消息类型为 String
})
</script>
0 个回复