From 2f9453b227561b764b1750ced1847ddad29d2d10 Mon Sep 17 00:00:00 2001 From: zly Date: Thu, 19 Mar 2026 15:39:44 +0800 Subject: [PATCH] =?UTF-8?q?feat(componentDeployment):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E5=85=B3=E9=94=AE=E8=AF=8D=E9=98=B2=E6=8A=96?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../componentDevelopment/componentDeployment/index.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/pages/componentDevelopment/componentDeployment/index.tsx b/src/pages/componentDevelopment/componentDeployment/index.tsx index 0990a55..24e1278 100644 --- a/src/pages/componentDevelopment/componentDeployment/index.tsx +++ b/src/pages/componentDevelopment/componentDeployment/index.tsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import React, { useState, useEffect } from 'react'; import styles from './style/index.module.less'; import { Button, Input, Modal, Radio, Space } from '@arco-design/web-react'; import { IconSearch } from '@arco-design/web-react/icon'; @@ -8,6 +8,12 @@ import ConfigTutorial from '@/pages/componentDevelopment/componentEnv/configTuto const ComponentDeployment = () => { const [searchKeyword, setSearchKeyword] = useState(''); + const [debouncedKeyword, setDebouncedKeyword] = useState(''); + + useEffect(() => { + const timer = setTimeout(() => setDebouncedKeyword(searchKeyword), 500); + return () => clearTimeout(timer); + }, [searchKeyword]); const [selectedStatus, setSelectedStatus] = useState(undefined); const [tutorialVisible, setTutorialVisible] = useState(false); @@ -63,7 +69,7 @@ const ComponentDeployment = () => {
- +