新增图库

This commit is contained in:
jiangh277
2025-08-04 16:56:39 +08:00
parent 56a0042011
commit 63ae33288d
25 changed files with 1184 additions and 38 deletions

View File

@@ -4,7 +4,7 @@ import { useEffect, useState } from 'react';
const useFetchImageUrl = (imageInstanceId: string) => {
const [imageUrl, setImageUrl] = useState("error");
const { data: response, run } = useRequest(
const { data: response, run, loading } = useRequest(
() => {
return fetchImage(imageInstanceId);
},
@@ -25,6 +25,6 @@ const useFetchImageUrl = (imageInstanceId: string) => {
run();
}
}, [imageInstanceId]);
return imageUrl;
return {imageUrl, loading};
};
export default useFetchImageUrl;