修改图片展示样式
This commit is contained in:
parent
650369d24b
commit
acb727927f
|
@ -1,7 +1,7 @@
|
||||||
import React, { useState, useEffect } from "react";
|
import React, { useState, useEffect } from "react";
|
||||||
import { Form, Input, Table, Image, Space, Button, Modal, message } from "antd";
|
import { Form, Input, Table, Image, Space, Button, Modal, message } from "antd";
|
||||||
import baseRequest from "../../utils/baseRequest";
|
import baseRequest from "../../utils/baseRequest";
|
||||||
import VideoPlayer from '../../components/VideoPlayer';
|
import VideoPlayer from "../../components/VideoPlayer";
|
||||||
export default function DeletedPostReview() {
|
export default function DeletedPostReview() {
|
||||||
//表头
|
//表头
|
||||||
const columns = [
|
const columns = [
|
||||||
|
@ -9,6 +9,7 @@ export default function DeletedPostReview() {
|
||||||
title: "动态信息",
|
title: "动态信息",
|
||||||
dataIndex: "info",
|
dataIndex: "info",
|
||||||
key: "info",
|
key: "info",
|
||||||
|
width: 300,
|
||||||
render: (data) => (
|
render: (data) => (
|
||||||
<div>
|
<div>
|
||||||
<p>
|
<p>
|
||||||
|
@ -32,13 +33,21 @@ export default function DeletedPostReview() {
|
||||||
title: "媒体",
|
title: "媒体",
|
||||||
dataIndex: "media",
|
dataIndex: "media",
|
||||||
key: "media",
|
key: "media",
|
||||||
|
width: 600,
|
||||||
render: (data) => (
|
render: (data) => (
|
||||||
<div>
|
<div
|
||||||
|
className={`grid ${
|
||||||
|
(data.media?.images[0]?.h <= data.media?.images[0]?.w &&
|
||||||
|
data.media?.images.length < 4) ||
|
||||||
|
data.media?.images.length === 0
|
||||||
|
? "grid-cols-2"
|
||||||
|
: "grid-cols-4"
|
||||||
|
} gap-2`}
|
||||||
|
>
|
||||||
{data?.images?.map((item, index) => (
|
{data?.images?.map((item, index) => (
|
||||||
<Image
|
<Image
|
||||||
key={index}
|
key={index}
|
||||||
src={item.urls[0]}
|
src={item.urls[0]}
|
||||||
width={150}
|
|
||||||
style={{ marginBottom: 10 }}
|
style={{ marginBottom: 10 }}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
|
@ -52,6 +61,7 @@ export default function DeletedPostReview() {
|
||||||
title: "操作",
|
title: "操作",
|
||||||
dataIndex: "opeartion",
|
dataIndex: "opeartion",
|
||||||
key: "opeartion",
|
key: "opeartion",
|
||||||
|
width: 200,
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<div>
|
<div>
|
||||||
<Space>
|
<Space>
|
||||||
|
|
|
@ -62,16 +62,32 @@ const EditSpacePostContent = (props) => {
|
||||||
<div className="flex flex-wrap gap-1">
|
<div className="flex flex-wrap gap-1">
|
||||||
<Image.PreviewGroup
|
<Image.PreviewGroup
|
||||||
items={data.media.images?.map((item) => item.urls[0])}
|
items={data.media.images?.map((item) => item.urls[0])}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
className={`grid ${
|
||||||
|
(data.media?.images[0]?.h <= data.media?.images[0]?.w &&
|
||||||
|
data.media?.images.length < 4) ||
|
||||||
|
data.media?.images.length === 0
|
||||||
|
? "grid-cols-2"
|
||||||
|
: "grid-cols-4"
|
||||||
|
} gap-2`}
|
||||||
>
|
>
|
||||||
{data.media.images.map((item, index) => (
|
{data.media.images.map((item, index) => (
|
||||||
<Image key={index} src={item.urls[0]} width={100} />
|
<Image key={index} src={item.urls[0]} width={100} />
|
||||||
))}
|
))}
|
||||||
|
</div>
|
||||||
</Image.PreviewGroup>
|
</Image.PreviewGroup>
|
||||||
|
<div
|
||||||
|
className={`grid ${
|
||||||
|
data[0]?.h <= data[0]?.w ? "grid-cols-2" : "grid-cols-4"
|
||||||
|
} gap-2`}
|
||||||
|
>
|
||||||
{data.media.videos.map((item, index) => (
|
{data.media.videos.map((item, index) => (
|
||||||
<VideoPlayer key={index} url={item.urls[0]} />
|
<VideoPlayer key={index} url={item.urls[0]} />
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -33,18 +33,26 @@ const FeedbackContent = (props) => {
|
||||||
title: "辅助材料",
|
title: "辅助材料",
|
||||||
dataIndex: "credentials",
|
dataIndex: "credentials",
|
||||||
key: "credentials",
|
key: "credentials",
|
||||||
|
width: 500,
|
||||||
render: (data) => (
|
render: (data) => (
|
||||||
<div>
|
<div
|
||||||
|
className={`grid ${
|
||||||
|
(data.media?.images[0]?.h <= data.media?.images[0]?.w &&
|
||||||
|
data.media?.images.length < 4) ||
|
||||||
|
data.media?.images.length === 0
|
||||||
|
? "grid-cols-2"
|
||||||
|
: "grid-cols-4"
|
||||||
|
} gap-2`}
|
||||||
|
>
|
||||||
{data.images?.map((item, index) => (
|
{data.images?.map((item, index) => (
|
||||||
<Image
|
<div className="self-start" key={index}>
|
||||||
key={index}
|
<Image src={item.urls[0]} style={{ marginBottom: 10 }} />
|
||||||
src={item.urls[0]}
|
</div>
|
||||||
width={150}
|
|
||||||
style={{ marginBottom: 10 }}
|
|
||||||
/>
|
|
||||||
))}
|
))}
|
||||||
{data.videos?.map((item, index) => (
|
{data.videos?.map((item, index) => (
|
||||||
<VideoPlayer key={index} url={item.urls[0]} />
|
<div className="self-start" key={index}>
|
||||||
|
<VideoPlayer url={item.urls[0]} />
|
||||||
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
|
|
|
@ -34,6 +34,7 @@ const PostMachineReviewContent = (props) => {
|
||||||
title: "动态内容",
|
title: "动态内容",
|
||||||
dataIndex: "newMedia",
|
dataIndex: "newMedia",
|
||||||
key: "newMedia",
|
key: "newMedia",
|
||||||
|
width: 500,
|
||||||
render: (data) => (
|
render: (data) => (
|
||||||
<div className="flex flex-col">
|
<div className="flex flex-col">
|
||||||
<div>
|
<div>
|
||||||
|
@ -42,12 +43,24 @@ const PostMachineReviewContent = (props) => {
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<p className="text-red-400">媒体:</p>
|
<p className="text-red-400">媒体:</p>
|
||||||
<div className="flex flex-wrap gap-1">
|
<div
|
||||||
|
className={`grid ${
|
||||||
|
(data.media?.images[0]?.h <= data.media?.images[0]?.w &&
|
||||||
|
data.media?.images.length < 4) ||
|
||||||
|
data.media?.images.length === 0
|
||||||
|
? "grid-cols-2"
|
||||||
|
: "grid-cols-4"
|
||||||
|
} gap-2`}
|
||||||
|
>
|
||||||
{data.media?.images?.map((item, index) => (
|
{data.media?.images?.map((item, index) => (
|
||||||
<Image key={index} src={item.urls[0]} width={100} />
|
<div className="self-start" key={index}>
|
||||||
|
<Image src={item.urls[0]} />
|
||||||
|
</div>
|
||||||
))}
|
))}
|
||||||
{data.media?.videos?.map((item, index) => (
|
{data.media?.videos?.map((item, index) => (
|
||||||
<VideoPlayer key={index} url={item.urls[0]} width={150} />
|
<div className="self-start" key={index}>
|
||||||
|
<VideoPlayer url={item.urls[0]} />
|
||||||
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -126,17 +126,25 @@ const StreamerInformationContent = () => {
|
||||||
title: "相册",
|
title: "相册",
|
||||||
dataIndex: "displayGallery",
|
dataIndex: "displayGallery",
|
||||||
key: "displayGallery",
|
key: "displayGallery",
|
||||||
|
width: 500,
|
||||||
render: (data) => (
|
render: (data) => (
|
||||||
<div>
|
<div>
|
||||||
<Image.PreviewGroup items={data?.map((item) => item.urls[0])}>
|
<Image.PreviewGroup items={data?.map((item) => item.urls[0])}>
|
||||||
|
<div
|
||||||
|
className={`grid ${
|
||||||
|
(data.media?.images[0]?.h <= data.media?.images[0]?.w &&
|
||||||
|
data.media?.images.length < 4) ||
|
||||||
|
data.media?.images.length === 0
|
||||||
|
? "grid-cols-2"
|
||||||
|
: "grid-cols-4"
|
||||||
|
} gap-2`}
|
||||||
|
>
|
||||||
{data.map((item) => (
|
{data.map((item) => (
|
||||||
<Image
|
<div key={item.urls[0]} className="self-start">
|
||||||
key={item.urls[0]}
|
<Image src={item.urls[0]} style={{ marginBottom: 10 }} />
|
||||||
src={item.urls[0]}
|
</div>
|
||||||
width={100}
|
|
||||||
style={{ marginBottom: 10 }}
|
|
||||||
/>
|
|
||||||
))}
|
))}
|
||||||
|
</div>
|
||||||
</Image.PreviewGroup>
|
</Image.PreviewGroup>
|
||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
|
|
|
@ -8,7 +8,7 @@ import {
|
||||||
useLocation,
|
useLocation,
|
||||||
} from "react-router-dom";
|
} from "react-router-dom";
|
||||||
import baseRequest from "../../utils/baseRequest";
|
import baseRequest from "../../utils/baseRequest";
|
||||||
import VideoPlayer from '../../components/VideoPlayer';
|
import VideoPlayer from "../../components/VideoPlayer";
|
||||||
const JoinContent = (props) => {
|
const JoinContent = (props) => {
|
||||||
const { TextArea } = Input;
|
const { TextArea } = Input;
|
||||||
const current = props.current;
|
const current = props.current;
|
||||||
|
@ -110,17 +110,21 @@ const JoinContent = (props) => {
|
||||||
title: "相册",
|
title: "相册",
|
||||||
dataIndex: "displayGallery",
|
dataIndex: "displayGallery",
|
||||||
key: "displayGallery",
|
key: "displayGallery",
|
||||||
|
width: 500,
|
||||||
render: (data) => (
|
render: (data) => (
|
||||||
<div>
|
<div>
|
||||||
<Image.PreviewGroup items={data?.map((item) => item.urls[0])}>
|
<Image.PreviewGroup items={data?.map((item) => item.urls[0])}>
|
||||||
|
<div
|
||||||
|
className={`grid ${
|
||||||
|
data[0]?.h <= data[0]?.w ? "grid-cols-2" : "grid-cols-4"
|
||||||
|
} gap-2`}
|
||||||
|
>
|
||||||
{data.map((item) => (
|
{data.map((item) => (
|
||||||
<Image
|
<div className="self-start" key={item.urls[0]}>
|
||||||
key={item.urls[0]}
|
<Image src={item.urls[0]} style={{ marginBottom: 10 }} />
|
||||||
src={item.urls[0]}
|
</div>
|
||||||
width={100}
|
|
||||||
style={{ marginBottom: 10 }}
|
|
||||||
/>
|
|
||||||
))}
|
))}
|
||||||
|
</div>
|
||||||
</Image.PreviewGroup>
|
</Image.PreviewGroup>
|
||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
|
@ -222,6 +226,7 @@ const JoinContent = (props) => {
|
||||||
title: "操作",
|
title: "操作",
|
||||||
dataIndex: "opeartion",
|
dataIndex: "opeartion",
|
||||||
key: "opeartion",
|
key: "opeartion",
|
||||||
|
fixed: "right",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<div>
|
<div>
|
||||||
<Space>
|
<Space>
|
||||||
|
|
|
@ -8,7 +8,7 @@ import {
|
||||||
useLocation,
|
useLocation,
|
||||||
} from "react-router-dom";
|
} from "react-router-dom";
|
||||||
import baseRequest from "../../utils/baseRequest";
|
import baseRequest from "../../utils/baseRequest";
|
||||||
import VideoPlayer from "../../components/VideoPlayer"
|
import VideoPlayer from "../../components/VideoPlayer";
|
||||||
const JoinContent = (props) => {
|
const JoinContent = (props) => {
|
||||||
const { TextArea } = Input;
|
const { TextArea } = Input;
|
||||||
const current = props.current;
|
const current = props.current;
|
||||||
|
@ -139,17 +139,25 @@ const JoinContent = (props) => {
|
||||||
title: "相册",
|
title: "相册",
|
||||||
dataIndex: "displayGallery",
|
dataIndex: "displayGallery",
|
||||||
key: "displayGallery",
|
key: "displayGallery",
|
||||||
|
width: 500,
|
||||||
render: (data) => (
|
render: (data) => (
|
||||||
<div>
|
<div>
|
||||||
<Image.PreviewGroup items={data?.map((item) => item.urls[0])}>
|
<Image.PreviewGroup items={data?.map((item) => item.urls[0])}>
|
||||||
|
<div
|
||||||
|
className={`grid ${
|
||||||
|
(data.media?.images[0]?.h <= data.media?.images[0]?.w &&
|
||||||
|
data.media?.images.length < 4) ||
|
||||||
|
data.media?.images.length === 0
|
||||||
|
? "grid-cols-2"
|
||||||
|
: "grid-cols-4"
|
||||||
|
} gap-2`}
|
||||||
|
>
|
||||||
{data.map((item) => (
|
{data.map((item) => (
|
||||||
<Image
|
<div key={item.urls[0]} className="self-start">
|
||||||
key={item.urls[0]}
|
<Image src={item.urls[0]} style={{ marginBottom: 10 }} />
|
||||||
src={item.urls[0]}
|
</div>
|
||||||
width={100}
|
|
||||||
style={{ marginBottom: 10 }}
|
|
||||||
/>
|
|
||||||
))}
|
))}
|
||||||
|
</div>
|
||||||
</Image.PreviewGroup>
|
</Image.PreviewGroup>
|
||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
|
|
|
@ -34,6 +34,7 @@ const ZonePostMachineReviewContent = (props) => {
|
||||||
title: "动态内容",
|
title: "动态内容",
|
||||||
dataIndex: "content",
|
dataIndex: "content",
|
||||||
key: "content",
|
key: "content",
|
||||||
|
width: 500,
|
||||||
render: (data) => (
|
render: (data) => (
|
||||||
<div className="flex flex-col">
|
<div className="flex flex-col">
|
||||||
<div>
|
<div>
|
||||||
|
@ -47,16 +48,28 @@ const ZonePostMachineReviewContent = (props) => {
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<p className="text-red-400">媒体:</p>
|
<p className="text-red-400">媒体:</p>
|
||||||
<div className="flex flex-wrap gap-1">
|
<div
|
||||||
|
className={`grid ${
|
||||||
|
(data.media?.images[0]?.h <= data.media?.images[0]?.w &&
|
||||||
|
data.media?.images.length < 4) ||
|
||||||
|
data.media?.images.length === 0
|
||||||
|
? "grid-cols-2"
|
||||||
|
: "grid-cols-4"
|
||||||
|
} gap-2`}
|
||||||
|
>
|
||||||
<Image.PreviewGroup
|
<Image.PreviewGroup
|
||||||
items={data.media.images?.map((item) => item.urls[0])}
|
items={data.media.images?.map((item) => item.urls[0])}
|
||||||
>
|
>
|
||||||
{data.media.images.map((item, index) => (
|
{data.media.images.map((item, index) => (
|
||||||
<Image key={index} src={item.urls[0]} width={100} />
|
<div className="self-start" key={index}>
|
||||||
|
<Image src={item.urls[0]} />
|
||||||
|
</div>
|
||||||
))}
|
))}
|
||||||
</Image.PreviewGroup>
|
</Image.PreviewGroup>
|
||||||
{data.media.videos.map((item, index) => (
|
{data.media.videos.map((item, index) => (
|
||||||
<VideoPlayer key={index} url={item.urls[0]} width={150} />
|
<div className="self-start" key={index}>
|
||||||
|
<VideoPlayer url={item.urls[0]} width={150} />
|
||||||
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue