diff --git a/components/gemini-image-loading.tsx b/components/gemini-image-loading.tsx index d5ff5fc72..d98f04b55 100644 --- a/components/gemini-image-loading.tsx +++ b/components/gemini-image-loading.tsx @@ -119,7 +119,7 @@ export const GeminiImageLoading = memo(() => { {/* 提示文字 */} - Gemini 正在创作 2 张图片,请稍候... + NanoBananaPro 正在创作 2 张图片,请稍候... diff --git a/components/image-annotator.tsx b/components/image-annotator.tsx index d44f81123..702aa84ee 100644 --- a/components/image-annotator.tsx +++ b/components/image-annotator.tsx @@ -55,13 +55,19 @@ export function ImageAnnotator({ imageUrl, onConfirm, onCancel }: ImageAnnotator const [textPosition, setTextPosition] = useState<{ x: number; y: number } | null>(null); const [scale, setScale] = useState(1); const [offset, setOffset] = useState({ x: 0, y: 0 }); + const [isLoading, setIsLoading] = useState(true); // 加载图片 useEffect(() => { + setIsLoading(true); const img = new window.Image(); img.crossOrigin = "anonymous"; img.onload = () => { setImage(img); + setIsLoading(false); + }; + img.onerror = () => { + setIsLoading(false); }; img.src = imageUrl; }, [imageUrl]); @@ -428,17 +434,38 @@ export function ImageAnnotator({ imageUrl, onConfirm, onCancel }: ImageAnnotator {/* 画布区域 */}
- + {isLoading ? ( + /* 加载动画 */ +
+
+ + + +
+ 正在加载图片... +
+ ) : ( + + )}