From bc78d3a692e29e89d51c94b45f906febb3ae374a Mon Sep 17 00:00:00 2001 From: yj <1336058017@qq.com> Date: Tue, 17 Dec 2024 11:14:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=85=B1=E4=BA=AB=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/SharedFilesModel/index.tsx | 31 ++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/src/components/SharedFilesModel/index.tsx b/src/components/SharedFilesModel/index.tsx index 063161c..8a314a8 100644 --- a/src/components/SharedFilesModel/index.tsx +++ b/src/components/SharedFilesModel/index.tsx @@ -100,10 +100,10 @@ const SharedFilesModel = forwardRef((props: any, ref: any) => {
} - onChange={(e) => { + onPressEnter={(e: any) => { if (fileList.pageIndex === 1) { setFileList({ ...fileList, @@ -116,8 +116,30 @@ const SharedFilesModel = forwardRef((props: any, ref: any) => { pageIndex: 1 }) } - }} + onBlur={(e) => { + if (fileList.pageIndex === 1) { + setFileList({ + ...fileList, + keyword: e.target.value, + }) + } else { + setFileList({ + ...fileList, + keyword: e.target.value, + pageIndex: 1 + }) + } + }} + suffix={ + { + getRoomFile() + }} + >搜索 + + } /> { if (fileList.pageIndex === 1) { @@ -273,6 +295,7 @@ const SharedFilesModel = forwardRef((props: any, ref: any) => { { + storage.setItem('loading', true) GetRoomFileDwUrl(item.fileUrl, item.id).then(res => { if (res.code === 200) { axios({ @@ -341,6 +364,8 @@ const SharedFilesModel = forwardRef((props: any, ref: any) => { }, 2000) }) } + }).finally(() => { + storage.setItem('loading', false) }) }} /> {/* */}