- {isLoading || (
-
- )}
+
+
+ {!isLoading && (
+
+ )}
+
+
+
+
+
+
+
);
}
From 13f1f49638d11cb6e1088d10d430bcc517e100f8 Mon Sep 17 00:00:00 2001
From: master1lan <278457198@qq.com>
Date: Thu, 16 Mar 2023 13:15:16 +0800
Subject: [PATCH 2/3] =?UTF-8?q?:bug:=20fix(custom):=20=E4=BF=AE=E5=A4=8D?=
=?UTF-8?q?=E7=BD=91=E9=80=9F=E8=BF=87=E5=BF=AB=E5=AF=BC=E8=87=B4=E5=9B=BE?=
=?UTF-8?q?=E7=89=87=E5=BF=AB=E9=80=9F=E5=88=87=E6=8D=A2=E7=9A=84bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/routers/photo/item/index.tsx | 38 +++++++++++++++++++++++++++-----
src/routers/photo/masonry.tsx | 4 ++--
2 files changed, 35 insertions(+), 7 deletions(-)
diff --git a/src/routers/photo/item/index.tsx b/src/routers/photo/item/index.tsx
index e7ce952..32fca6c 100644
--- a/src/routers/photo/item/index.tsx
+++ b/src/routers/photo/item/index.tsx
@@ -1,5 +1,5 @@
import { PhotoRouterImageCardType } from "../phototype";
-import { useState } from "react";
+import { useEffect, useState, useMemo } from "react";
import ImgModals from "./modal";
import ChevronRightIcon from "@mui/icons-material/ChevronRight";
import { Link, styled } from "@mui/material";
@@ -7,25 +7,49 @@ import style from "./photo.module.less";
import { ImageBasic } from "@components/image";
import { Omit } from "@utils/index";
import CollectionsIcon from "@mui/icons-material/Collections";
+import { getImageSize } from "@components/image/tool";
+
type CardType = {
data: PhotoRouterImageCardType;
};
-
+const useLoading = (url: string) => {
+ const [isLoading, set] = useState