修复图片轮播尺寸问题

This commit is contained in:
anln 2024-07-23 20:57:21 +08:00
parent 8983e84cf9
commit 0c273e4269
1 changed files with 3 additions and 3 deletions

View File

@ -67,7 +67,7 @@ export default function PersonSpace() {
})),
];
// console.log("photosArr", photosArr);
console.log("photosArr", photosArr);
setTopPhotos(photosArr);
setLoading(false);
} catch (error) {
@ -170,7 +170,7 @@ export default function PersonSpace() {
{topPhotos.map((photo, index) => (
<Swiper.Item key={index}>
<div
className="relative min-w-max"
className="relative min-w-full max-w-[100vw]"
key={index}
onClick={() => {
if (photo.type == "video") {
@ -183,7 +183,7 @@ export default function PersonSpace() {
} else {
showPhotos(
topPhotos.filter((it) => it.type == "img"),
index
topPhotos.filter((it) => it.type == "img").indexOf(photo)
);
}
}}