From 60e5a682bda03efa2425e950c625d06b578b3e15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B6=85=E7=BA=A7=E8=80=81=E7=99=BD=E5=85=94?= Date: Sat, 16 Aug 2025 17:59:36 +0800 Subject: [PATCH] =?UTF-8?q?FEAT=20=3D>=20=E6=9C=AC=E6=AC=A1=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E9=A1=B9=E7=9B=AE=E4=B8=BA=EF=BC=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../list/components/SendRcrodModal.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cunkebao/src/pages/mobile/workspace/traffic-distribution/list/components/SendRcrodModal.tsx b/Cunkebao/src/pages/mobile/workspace/traffic-distribution/list/components/SendRcrodModal.tsx index e82d27e9..d74c5219 100644 --- a/Cunkebao/src/pages/mobile/workspace/traffic-distribution/list/components/SendRcrodModal.tsx +++ b/Cunkebao/src/pages/mobile/workspace/traffic-distribution/list/components/SendRcrodModal.tsx @@ -39,7 +39,7 @@ const SendRcrodModal: React.FC = ({ // 获取分发记录数据 const fetchSendRecords = async (page = 1, keyword = "") => { - if (!ruleId || !visible) return; + if (!ruleId) return; setLoading(true); try { @@ -74,16 +74,16 @@ const SendRcrodModal: React.FC = ({ // 搜索关键词变化时触发搜索 useEffect(() => { - if (!visible || !ruleId) return; + if (!visible || !ruleId || searchKeyword === "") return; setCurrentPage(1); fetchSendRecords(1, searchKeyword); - }, [searchKeyword, visible, ruleId]); + }, [searchKeyword]); // 页码变化 useEffect(() => { if (!visible || !ruleId || currentPage === 1) return; fetchSendRecords(currentPage, searchKeyword); - }, [currentPage, visible, ruleId]); + }, [currentPage]); // 处理页码变化 const handlePageChange = (page: number) => {