From fc43d210ea6014173fd6c09196a03ba78c449937 Mon Sep 17 00:00:00 2001 From: SHEN <1014628363@qq.com> Date: Mon, 23 Dec 2024 11:24:09 +0800 Subject: [PATCH] Update ImageCapture.tsx --- .../react-hooks/src/components/ImageCapture/ImageCapture.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hello-world/react-hooks/src/components/ImageCapture/ImageCapture.tsx b/hello-world/react-hooks/src/components/ImageCapture/ImageCapture.tsx index d8c3a262..85f480b7 100644 --- a/hello-world/react-hooks/src/components/ImageCapture/ImageCapture.tsx +++ b/hello-world/react-hooks/src/components/ImageCapture/ImageCapture.tsx @@ -11,7 +11,7 @@ function ImageCapture() { let pCvRouter: MutableRefObject | null> = useRef(null); let isDestroyed = useRef(false); - const decodeImg = async (e: React.ChangeEvent) => { + const captureImage = async (e: React.ChangeEvent) => { let files = [...(e.target.files as any as File[])]; e.target.value = ""; // reset input setResultText(""); @@ -68,7 +68,7 @@ function ImageCapture() { return (
- +
{resultText}