这个是数组为0是,初始化的swiper 对后续的swiper有影响了,加个 长度不等于零的判断
{
props.model.length>0 ? <Swiper
className='test-h'
indicatorColor='#5F7C99'
indicatorActiveColor='#297AF8'
vertical={false}
circular
style={{ height: `${props.height}px` }}
indicatorDots
autoplay>
{
props.model.map((item, index) => {
return <SwiperItem key={index}>
<Image src={item} className="img"></Image>
</SwiperItem>
})
}
</Swiper> : null
}