【发布时间】:2021-06-21 23:01:30
【问题描述】:
我的代码:
<Swiper
controlsProps={{
dotsTouchable: true,
dotsWrapperStyle: { backgroundColor: "lightblue" },
dotsPos: "top",
DotComponent: ({ index, isActive, onPress }) => (
<Button onPress={onPress} style={styles.DOT}></Button>
),
}}
loop
timeout={3}
>
{prefixData.length !== 1 ? (
prefixData?.map((e, i) => {
return _renderKenburnImg(e, i)
})
) : (
<></>
)}
</Swiper>
还有:
const _renderKenburnImg = (e: string, i: number) => (
<View style={styles.IMG_CONTAINER}>
<KenBurnsImage
tension={6}
friction={50}
imageWidth={Dimensions.get("window").width}
imageHeight={300}
sourceUri={{
uri: e,
}}
></KenBurnsImage>
</View>
)
转到最后一张图片后,RN 显示错误:TypeError: undefined is not an object (evalating 'spring.systemShouldAdvance')。请帮忙!谢谢。
【问题讨论】: