zhangzf преди 1 ден
родител
ревизия
bd8f76c956
променени са 1 файла, в които са добавени 6 реда и са изтрити 5 реда
  1. 6 5
      src/app/(public)/_components/Trending.tsx

+ 6 - 5
src/app/(public)/_components/Trending.tsx

@@ -135,11 +135,12 @@ const Trending = ({ trendingSection }: newArrivalSectionProps) => {
               <div className=" overflow-hidden  flex flex-col">
                 {/* 图片区域 + 中间播放按钮 */}
                 <div className="relative rounded-xl w-full aspect-[4/5] overflow-hidden rounded-xl">
-                  <img
-                    src={item.image_url}
-                    alt={item.name}
-                    className="w-full h-full object-cover"
-                  />
+                  <Image
+                      src={item.image_url}
+                      alt={item.name}
+                      fill
+                      style={{ objectFit: "cover" }}
+                    />
                   {/* 居中圆形播放按钮 */}
                   <button
                     onClick={() =>