mirror of
https://github.com/PlayEdu/backend
synced 2025-06-14 02:47:19 +08:00
图片列表优化
This commit is contained in:
parent
80388e6d54
commit
ffbf24a2b5
@ -29,6 +29,6 @@
|
|||||||
|
|
||||||
.imageItem{
|
.imageItem{
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 120px;
|
width: 150px;
|
||||||
height: 80px;
|
height: 150px;
|
||||||
}
|
}
|
@ -32,7 +32,7 @@ export const ResourceImagesPage = () => {
|
|||||||
const [imageList, setImageList] = useState<ImageItem[]>([]);
|
const [imageList, setImageList] = useState<ImageItem[]>([]);
|
||||||
const [refresh, setRefresh] = useState(false);
|
const [refresh, setRefresh] = useState(false);
|
||||||
const [page, setPage] = useState(1);
|
const [page, setPage] = useState(1);
|
||||||
const [size, setSize] = useState(12);
|
const [size, setSize] = useState(32);
|
||||||
const [total, setTotal] = useState(0);
|
const [total, setTotal] = useState(0);
|
||||||
const [category_ids, setCategoryIds] = useState<any>([]);
|
const [category_ids, setCategoryIds] = useState<any>([]);
|
||||||
|
|
||||||
@ -92,12 +92,7 @@ export const ResourceImagesPage = () => {
|
|||||||
></UploadImageSub>
|
></UploadImageSub>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
<Row
|
<Row gutter={[24, 24]}>
|
||||||
gutter={[
|
|
||||||
{ xs: 8, sm: 16, md: 24, lg: 32 },
|
|
||||||
{ xs: 4, sm: 8, md: 12, lg: 16 },
|
|
||||||
]}
|
|
||||||
>
|
|
||||||
{imageList.length === 0 && (
|
{imageList.length === 0 && (
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<Empty description="暂无图片" />
|
<Empty description="暂无图片" />
|
||||||
@ -105,12 +100,12 @@ export const ResourceImagesPage = () => {
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{imageList.map((item) => (
|
{imageList.map((item) => (
|
||||||
<Col key={item.id} span={6}>
|
<Col key={item.id} span={3}>
|
||||||
<div className={styles.imageItem}>
|
<div className={styles.imageItem}>
|
||||||
<Image
|
<Image
|
||||||
preview={false}
|
preview={true}
|
||||||
width={120}
|
width={150}
|
||||||
height={80}
|
height={150}
|
||||||
src={item.url}
|
src={item.url}
|
||||||
/>
|
/>
|
||||||
<Popconfirm
|
<Popconfirm
|
||||||
@ -141,6 +136,7 @@ export const ResourceImagesPage = () => {
|
|||||||
}}
|
}}
|
||||||
defaultCurrent={page}
|
defaultCurrent={page}
|
||||||
total={total}
|
total={total}
|
||||||
|
pageSize={size}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
)}
|
)}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user