添加多图片浏览功能

This commit is contained in:
al 2024-08-05 21:17:22 +08:00
parent 75f678ab84
commit 5ae64fcdd0
7 changed files with 21207 additions and 38 deletions

21154
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

View File

@ -53,9 +53,16 @@ const ImageMachineReviewContent = (props) => {
key: "newMedia", key: "newMedia",
render: (data) => ( render: (data) => (
<div className="flex flex-wrap gap-1"> <div className="flex flex-wrap gap-1">
{data?.map((item, index) => ( <Image.PreviewGroup items={data?.map((item) => item.urls[0])}>
<Image key={index} src={item.urls[0]} width={100} /> {data.map((item) => (
))} <Image
key={item.urls[0]}
src={item.urls[0]}
width={100}
style={{ marginBottom: 10 }}
/>
))}
</Image.PreviewGroup>
</div> </div>
), ),
}, },
@ -65,9 +72,9 @@ const ImageMachineReviewContent = (props) => {
key: "oldMedia", key: "oldMedia",
render: (data) => ( render: (data) => (
<div className="flex flex-wrap gap-1"> <div className="flex flex-wrap gap-1">
{data?.map((item, index) => ( <Image.PreviewGroup items={data?.map((item) => item.urls[0])}>
<Image key={index} src={item.urls[0]} width={100} /> <Image src={data[0].urls[0]} width={100} />
))} </Image.PreviewGroup>
</div> </div>
), ),
}, },

View File

@ -130,14 +130,16 @@ const StreamerInformationContent = () => {
key: "displayGallery", key: "displayGallery",
render: (data) => ( render: (data) => (
<div> <div>
{data.map((item) => ( <Image.PreviewGroup items={data?.map((item) => item.urls[0])}>
<Image {data.map((item) => (
key={item.urls[0]} <Image
src={item.urls[0]} key={item.urls[0]}
width={100} src={item.urls[0]}
style={{ marginBottom: 10 }} width={100}
/> style={{ marginBottom: 10 }}
))} />
))}
</Image.PreviewGroup>
</div> </div>
), ),
}; };

View File

@ -112,14 +112,16 @@ const JoinContent = (props) => {
key: "displayGallery", key: "displayGallery",
render: (data) => ( render: (data) => (
<div> <div>
{data.map((item) => ( <Image.PreviewGroup items={data?.map((item) => item.urls[0])}>
<Image {data.map((item) => (
key={item.urls[0]} <Image
src={item.urls[0]} key={item.urls[0]}
width={100} src={item.urls[0]}
style={{ marginBottom: 10 }} width={100}
/> style={{ marginBottom: 10 }}
))} />
))}
</Image.PreviewGroup>
</div> </div>
), ),
}, },

View File

@ -141,14 +141,16 @@ const JoinContent = (props) => {
key: "displayGallery", key: "displayGallery",
render: (data) => ( render: (data) => (
<div> <div>
{data.map((item) => ( <Image.PreviewGroup items={data?.map((item) => item.urls[0])}>
<Image {data.map((item) => (
key={item.urls[0]} <Image
src={item.urls[0]} key={item.urls[0]}
width={100} src={item.urls[0]}
style={{ marginBottom: 10 }} width={100}
/> style={{ marginBottom: 10 }}
))} />
))}
</Image.PreviewGroup>
</div> </div>
), ),
}, },

View File

@ -51,14 +51,16 @@ const VerificationContent = (props) => {
key: "ID_card_photos", key: "ID_card_photos",
render: (data) => ( render: (data) => (
<div> <div>
{data.map((item, index) => ( <Image.PreviewGroup items={data?.map((item) => item.urls[0])}>
<Image {data.map((item) => (
key={index} <Image
className="mb-2" key={item.urls[0]}
src={item.urls[0]} src={item.urls[0]}
width={100} width={100}
/> style={{ marginBottom: 10 }}
))} />
))}
</Image.PreviewGroup>
</div> </div>
), ),
}, },