我正在尝试使用此人可能拥有的图像显示厨师的个人资料。我有一组厨师,其中包含一些信息,例如姓名和个人资料图片。Cooks 数组还包含一个图片数组。我想显示cook.profile 图片名称,然后显示链接到他们个人资料的照片列表。我可以显示姓名和个人资料图片,但我不确定如何在每个厨师的姓名下显示图片数组(水平滚动)。 这是厨师数组:
cooks = [{
"id": "1001",
"firstName": "Mike",
"profilePic": "Portrait.jpg",
"photos": [{
"url": "img.jpg"
},
{
"url": "img2.jpg"
},
{
"url": "img3.jpg"
},
{
"url": "img4.jpg"
}
]
},
{
"id": "1002",
"firstName": "Marla",
"profilePic": "profilePic.jpg",
"photos": [{
"url": "img1.jpg"
},
{
"url": "img2.jpeg"
},
{
"favorite": "true",
"url": "img3.jpg"
},
{
"url": "img4.jpeg"
}
]
}
]
Run Code Online (Sandbox Code Playgroud)
================================================== ================
<FlatList
data={this.props.cooks}
renderItem={({ item }) => (
<View>
<TouchableOpacity >
<CardSection>
<View style={thumbnailContainerStyle}>
<Image
style={thumbnailStyle}
source={{ uri: …Run Code Online (Sandbox Code Playgroud) 我想使用 micronaut 和 groovy 将可选参数传递给 url。我做了很多研究,但找不到任何相关的答案。
@Get('/product/{country}/?
Run Code Online (Sandbox Code Playgroud)
我想将排序和日期作为可选参数传递给此网址。感谢你的帮助。