Open forget1 opened 1 year ago
<Carousel
autoplay={true}
autoplayInterval={5000}
infinite
>
{categories.items.map((item, index) =>{
return (
<TouchableOpacity key={index} activeOpacity={1} style={{width: '100%', height: 150, position: 'relative', justifyContent: 'center', alignItems: 'center'}} onPress={() => Actions.bulletin({id: item.id, partnerCode: partners.currentPartner.code})}>
<Image style={{width:'100%',height:'100%'}} source={IMAGES[item.banner.content_id - 1]} resizeMethod='resize'></Image>
<Text style={{position: 'absolute', fontSize: 20, backgroundColor: 'transparent', color: `${item.banner.color}`, fontWeight: '500'}}>{item.title}</Text>
</TouchableOpacity>
)})}
</Carousel>
本地相关代码如上
Reproduction link
https://1uokun.github.io/ant-design-mobile-rn/index.html
Steps to reproduce
官网示例在移动端打开,打开自动切换。手动切换的时候在一轮结束到第一张的时候会卡一下,然后偶尔会从第三张图直接切到第5张
What is expected?
手动切换的时候,暂停自动切换逻辑
What is actually happening?
手动切换时,自动切换还在继续