mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-07-23 12:21:08 +00:00
fix: upload loading
This commit is contained in:
parent
37aed537ce
commit
d96e1ec75e
@ -43,9 +43,6 @@ export const renderUpload = (params: Props) => {
|
|||||||
console.log(error)
|
console.log(error)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const attr = convertKeysToCamelCase(data.ui?.attr || {});
|
const attr = convertKeysToCamelCase(data.ui?.attr || {});
|
||||||
@ -82,6 +79,7 @@ export const renderUpload = (params: Props) => {
|
|||||||
headers: {
|
headers: {
|
||||||
authorization: 'authorization-text',
|
authorization: 'authorization-text',
|
||||||
},
|
},
|
||||||
|
defaultFileList: fileList,
|
||||||
onChange(info) {
|
onChange(info) {
|
||||||
setUploading(true);
|
setUploading(true);
|
||||||
if (info.file.status !== 'uploading') {
|
if (info.file.status !== 'uploading') {
|
||||||
@ -104,7 +102,7 @@ export const renderUpload = (params: Props) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='p-2 text-sm text-center'>
|
<div className='p-2 text-sm text-center'>
|
||||||
<Upload fileList={fileList} onRemove={handleFileRemove} {...props} {...attr} multiple={data.is_list?true:false} accept={uploadType}>
|
<Upload onRemove={handleFileRemove} {...props} {...attr} multiple={data.is_list?true:false} accept={uploadType}>
|
||||||
<Button loading={uploading} icon={<UploadOutlined />}>
|
<Button loading={uploading} icon={<UploadOutlined />}>
|
||||||
{t('Upload_Data')}
|
{t('Upload_Data')}
|
||||||
</Button>
|
</Button>
|
||||||
|
Loading…
Reference in New Issue
Block a user