From ec2ff921f953bc78027b3d822a717cef23b8e067 Mon Sep 17 00:00:00 2001 From: shiyu Date: Sun, 22 Jun 2025 17:24:50 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E9=80=BB=E8=BE=91=EF=BC=8C=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E6=95=B0=E9=87=8F=E5=B9=B6=E4=BD=BF=E7=94=A8?= =?UTF-8?q?ImageGrid=E7=BB=84=E4=BB=B6=E4=BC=98=E5=8C=96=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Web/src/pages/explore/Index.tsx | 86 ++++++++------------------------- 1 file changed, 21 insertions(+), 65 deletions(-) diff --git a/Web/src/pages/explore/Index.tsx b/Web/src/pages/explore/Index.tsx index 6690dd6..aef763b 100644 --- a/Web/src/pages/explore/Index.tsx +++ b/Web/src/pages/explore/Index.tsx @@ -1,7 +1,7 @@ import React, { useState, useEffect, useCallback } from 'react'; import { Card, Button, Space, Modal, message, Typography, - Row, Col, Image, Form, Input, Avatar, + Row, Col, Form, Input, Avatar, Tag, Tooltip, Spin, Empty, Statistic, Select, Grid } from 'antd'; @@ -17,6 +17,7 @@ import { type FaceClusterResponse, type UpdateClusterRequest } from '../../api'; import type { PictureResponse } from '../../api/pictureApi'; +import ImageGrid from '../../components/image/ImageGrid/ImageGrid'; const { Title, Text, Paragraph } = Typography; const { confirm } = Modal; @@ -69,7 +70,7 @@ const FaceExplore: React.FC = () => { const fetchClusterPictures = useCallback(async (clusterId: number) => { setPicturesLoading(true); try { - const response = await getMyPicturesByCluster(clusterId, 1, 50); + const response = await getMyPicturesByCluster(clusterId, 1, 100); // 增加获取数量 if (response.success) { const actualData = response.data?.data || response.data; setClusterPictures(Array.isArray(actualData) ? actualData : []); @@ -443,72 +444,27 @@ const FaceExplore: React.FC = () => { open={isPictureModalVisible} onCancel={() => setIsPictureModalVisible(false)} footer={null} - width={800} + width="90vw" + style={{ maxWidth: 1200 }} destroyOnClose > - - {clusterPictures.length > 0 ? ( -
- {clusterPictures.map(picture => ( -
- -
- {picture.name || `图片${picture.id}`} -
-
- - 查看大图 -
- ) - }} - /> -
-
- ))} - - ) : ( - - )} -
+
+ +
+ ); };