优化共享文件操作
This commit is contained in:
parent
63914c1fb7
commit
bc78d3a692
|
|
@ -100,10 +100,10 @@ const SharedFilesModel = forwardRef((props: any, ref: any) => {
|
|||
</div>
|
||||
<div style={{ color: 'white' }}>
|
||||
<Input
|
||||
placeholder="搜索"
|
||||
placeholder="请输入文件名"
|
||||
style={{ width: '200px' }}
|
||||
prefix={<SearchOutlined style={{ color: 'white' }} />}
|
||||
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={
|
||||
<span
|
||||
style={{ color: '#47D3D0', cursor: 'pointer' }}
|
||||
onClick={() => {
|
||||
getRoomFile()
|
||||
}}
|
||||
>搜索
|
||||
</span>
|
||||
}
|
||||
/>
|
||||
<ReloadOutlined title='刷新' onClick={() => {
|
||||
if (fileList.pageIndex === 1) {
|
||||
|
|
@ -273,6 +295,7 @@ const SharedFilesModel = forwardRef((props: any, ref: any) => {
|
|||
<VerticalAlignBottomOutlined title='下载'
|
||||
style={{ color: '#5575F2', cursor: 'pointer' }}
|
||||
onClick={async () => {
|
||||
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)
|
||||
})
|
||||
}} />
|
||||
{/* <FolderOutlined title='文件' style={{ color: '#FFA000', cursor: 'pointer', marginLeft: '10px' }} /> */}
|
||||
|
|
|
|||
Loading…
Reference in New Issue