修改图片布局样式
This commit is contained in:
parent
f8160ecd42
commit
3e7359983b
|
@ -209,14 +209,14 @@ export default function Photos({
|
|||
return (
|
||||
<>
|
||||
<div
|
||||
className={`grid ${
|
||||
currentPhotos.length > 1 ? "grid-cols-3 gap-1.5 min-h-[24vw]" : "grid-cols-1 min-h-[38vw]"
|
||||
className={`${
|
||||
currentPhotos.length > 1 ? "grid grid-cols-3 gap-1.5 min-h-[24vw]" : "min-h-[38vw] w-max"
|
||||
}`}
|
||||
>
|
||||
{currentPhotos.map((item, index) => {
|
||||
return (
|
||||
<div
|
||||
className="relative w-max"
|
||||
className={`relative w-max ${currentPhotos.length > 1 ? "h-[24vw]" : ""} `}
|
||||
style={{ maxWidth: "calc(100vw - 72px)" }}
|
||||
key={index}
|
||||
onClick={() => {
|
||||
|
@ -242,7 +242,7 @@ export default function Photos({
|
|||
{
|
||||
<div
|
||||
className={`overflow-hidden inline-block rounded h-full max-h-80 ${
|
||||
currentPhotos.length > 1 ? "min-h-[24vw]" : "max-h-[38vw]"
|
||||
currentPhotos.length > 1 ? "h-[24vw]" : "auto"
|
||||
}`}
|
||||
>
|
||||
<Image
|
||||
|
@ -250,8 +250,8 @@ export default function Photos({
|
|||
placeholder={
|
||||
<div className="w-full h-full min-h-96 bg-[#1d1d1d] rounded"></div>
|
||||
}
|
||||
width={currentPhotos.length > 1 ? "24vw" : "auto"}
|
||||
height={currentPhotos.length > 1 ? "24vw" : "38vw"}
|
||||
width={currentPhotos.length > 1 ? "24vw" : "36vw"}
|
||||
height={currentPhotos.length > 1 ? "24vw" : "100%"}
|
||||
className={`rounded max-w-full ${
|
||||
item?.type == "hid" && type == "space" ? "imageBlur" : ""
|
||||
}`}
|
||||
|
|
Loading…
Reference in New Issue