修复图片轮播尺寸问题
This commit is contained in:
parent
8983e84cf9
commit
0c273e4269
|
@ -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)
|
||||
);
|
||||
}
|
||||
}}
|
||||
|
|
Loading…
Reference in New Issue