From c6230b5765eb0b8ac69f8a17c191cc5757d42b18 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期五, 18 十月 2024 12:56:49 +0800 Subject: [PATCH] # --- zy-acs-flow/src/map/insight/agv/useCoolHook.js | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/zy-acs-flow/src/map/insight/agv/useCoolHook.js b/zy-acs-flow/src/map/insight/agv/useCoolHook.js index f741bd7..263e831 100644 --- a/zy-acs-flow/src/map/insight/agv/useCoolHook.js +++ b/zy-acs-flow/src/map/insight/agv/useCoolHook.js @@ -32,11 +32,13 @@ const debouncedFetch = useCallback(debounce(fetchData, 300), [url]); useEffect(() => { - if (inputValue) { - debouncedFetch(inputValue); - } else { - setOptions([]); - } + // console.log(inputValue, url) + // if (inputValue) { + // debouncedFetch(inputValue); + // } else { + // setOptions([]); + // } + debouncedFetch(inputValue); }, [inputValue, debouncedFetch]); return { -- Gitblit v1.9.1