在图像卡拉苏中显示来自服务器的图像数组



嘿伙计们,我在其中使用反应原生ImageCarahousal。我想显示我的图像数组,它们可以是多个或多个.我需要在我的形象中表现出来...... 显示正常的静态图像,如下所示[{uri:'https://images.pexels.com/photos/889087/pexels-photo-889087.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260'}]如何基于多个图像的数组进行制作

<ImageCarousel
height={300}
delay={7000}
animate= "true"
indicatorSize={10}
indicatorColor="white"
images={
[this.props.navigation.state.params.itemimage.map
( ( item,i)=> {
{uri:item}
} ) ]
}
/>

试试这个:

const { params } = this.props.navigation.state;
<ImageCarousel
height={300}
delay={7000}
animate= "true"
indicatorSize={10}
indicatorColor="white"
images={params.itemimage && params.itemimage.map(item => {uri:item})}
/>

最新更新